- enum CodecID codec_id;
-
- // may be null
- int (*parse_sdp_a_line) (AVFormatContext *s,
- int st_index,
- PayloadContext *priv_data,
- const char *line); ///< Parse the a= line from the sdp field
- PayloadContext *(*open) (void); ///< allocate any data needed by the rtp parsing for this dynamic data.
- void (*close)(PayloadContext *protocol_data); ///< free any data needed by the rtp parsing for this dynamic data.
- DynamicPayloadPacketHandlerProc parse_packet; ///< parse handler for this dynamic packet.
-
- struct RTPDynamicProtocolHandler_s *next;
+ enum AVCodecID codec_id;
+ int static_payload_id; /* 0 means no payload id is set. 0 is a valid
+ * payload ID (PCMU), too, but that format doesn't
+ * require any custom depacketization code. */
+
+ /** Initialize dynamic protocol handler, called after the full rtpmap line is parsed, may be null */
+ int (*init)(AVFormatContext *s, int st_index, PayloadContext *priv_data);
+ /** Parse the a= line from the sdp field */
+ int (*parse_sdp_a_line)(AVFormatContext *s, int st_index,
+ PayloadContext *priv_data, const char *line);
+ /** Allocate any data needed by the rtp parsing for this dynamic data. */
+ PayloadContext *(*alloc)(void);
+ /** Free any data needed by the rtp parsing for this dynamic data. */
+ void (*free)(PayloadContext *protocol_data);
+ /** Parse handler for this dynamic packet */
+ DynamicPayloadPacketHandlerProc parse_packet;
+ int (*need_keyframe)(PayloadContext *context);
+
+ struct RTPDynamicProtocolHandler *next;