(and thus preparing for the introduction of RDTDemuxContext) in a next patch.
See discussion in "RDT/Realmedia patches #2" thread on ML.
Originally committed as revision 15542 to svn://svn.ffmpeg.org/ffmpeg/trunk
#include "libavcodec/avcodec.h"
#include "avformat.h"
+typedef struct PayloadContext PayloadContext;
+typedef struct RTPDynamicProtocolHandler_s RTPDynamicProtocolHandler;
+
#define RTP_MIN_PACKET_LENGTH 12
#define RTP_MAX_PACKET_LENGTH 1500 /* XXX: suppress this define */
typedef struct RTPDemuxContext RTPDemuxContext;
typedef struct rtp_payload_data_s rtp_payload_data_s;
RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, rtp_payload_data_s *rtp_payload_data);
+void rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx,
+ RTPDynamicProtocolHandler *handler);
int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
const uint8_t *buf, int len);
void rtp_parse_close(RTPDemuxContext *s);
uint32_t jitter; ///< estimated jitter.
} RTPStatistics;
-typedef struct PayloadContext PayloadContext;
/**
* Packet parsing for "private" payloads in the RTP specs.
*
const uint8_t * buf,
int len, int flags);
-typedef struct RTPDynamicProtocolHandler_s {
+struct RTPDynamicProtocolHandler_s {
// fields from AVRtpDynamicPayloadType_s
const char enc_name[50]; /* XXX: still why 50 ? ;-) */
enum CodecType codec_type;
DynamicPayloadPacketHandlerProc parse_packet; ///< parse handler for this dynamic packet.
struct RTPDynamicProtocolHandler_s *next;
-} RTPDynamicProtocolHandler;
+};
// moved out of rtp.c, because the h264 decoder needs to know about this structure..
struct RTPDemuxContext {
return s;
}
+void
+rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx,
+ RTPDynamicProtocolHandler *handler)
+{
+ s->dynamic_protocol_context = ctx;
+ s->parse_packet = handler->parse_packet;
+}
+
static int rtp_parse_mp4_au(RTPDemuxContext *s, const uint8_t *buf)
{
int au_headers_length, au_header_size, i;
return AVERROR(ENOMEM);
} else {
if(rtsp_st->dynamic_handler) {
- rtsp_st->rtp_ctx->dynamic_protocol_context= rtsp_st->dynamic_protocol_context;
- rtsp_st->rtp_ctx->parse_packet= rtsp_st->dynamic_handler->parse_packet;
+ rtp_parse_set_dynamic_protocol(rtsp_st->rtp_ctx,
+ rtsp_st->dynamic_protocol_context,
+ rtsp_st->dynamic_handler);
}
}