]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec.h
Combine deprecation guards where appropriate
[ffmpeg] / libavformat / rtpdec.h
index 46b08ce925f0404f863258ad67c882e6e2b97bb0..a0c5f778b29287b56ce270c5ab1527143634db63 100644 (file)
@@ -35,7 +35,7 @@ typedef struct RTPDynamicProtocolHandler RTPDynamicProtocolHandler;
 #define RTP_MIN_PACKET_LENGTH 12
 #define RTP_MAX_PACKET_LENGTH 8192
 
-#define RTP_REORDER_QUEUE_DEFAULT_SIZE 10
+#define RTP_REORDER_QUEUE_DEFAULT_SIZE 500
 
 #define RTP_NOTS_VALUE ((uint32_t)-1)
 
@@ -113,22 +113,24 @@ typedef int (*DynamicPayloadPacketHandlerProc)(AVFormatContext *ctx,
                                                int len, uint16_t seq, int flags);
 
 struct RTPDynamicProtocolHandler {
-    const char enc_name[50];
+    const char *enc_name;
     enum AVMediaType codec_type;
     enum AVCodecID codec_id;
+    enum AVStreamParseType need_parsing;
     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. */
+    int priv_data_size;
 
     /** 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);
+    /** Free any data needed by the rtp parsing for this dynamic data.
+      * Don't free the protocol_data pointer itself, that is freed by the
+      * caller. This is called even if the init method failed. */
+    void (*close)(PayloadContext *protocol_data);
     /** Parse handler for this dynamic packet */
     DynamicPayloadPacketHandlerProc parse_packet;
     int (*need_keyframe)(PayloadContext *context);
@@ -205,7 +207,7 @@ int ff_parse_fmtp(AVFormatContext *s,
                   int (*parse_fmtp)(AVFormatContext *s,
                                     AVStream *stream,
                                     PayloadContext *data,
-                                    char *attr, char *value));
+                                    const char *attr, const char *value));
 
 void ff_register_rtp_dynamic_payload_handlers(void);