diff allformats.c @ 3902:5f9bec099c69 libavformat

Add dynamic payload handlers to rdt.c. These follow the same API as the ones in rtpdec.c, so that they can be shared and used in the same way in rtsp.c. The handlers, since they are specific for RDT, are registered in rdt.c and a new registration function is thus called from allformats.c. The dynamic payload handler also implements RDT-specific SDP-line parsing for OpaqueData and StartTime, which are specific for RDT and needed for proper playback. OpaqueData contains one or a list ("MLTI") of "MDPR" chunks that can be parsed by the rmdec.c function ff_rm_read_mdpr_codecdata(). To use this function, we create a new rdt_demuxer, which has the same private data as the rm_demuxer. The resulting AVFormatContext created with _open_stream() can thus be used to call functions in the RM demuxer. See discussion in "Realmedia patch" thread on ML.
author rbultje
date Sun, 07 Sep 2008 01:21:24 +0000
parents c11ff84634b2
children ffb410d82ad3
line wrap: on
line diff
--- a/allformats.c	Sun Sep 07 01:19:26 2008 +0000
+++ b/allformats.c	Sun Sep 07 01:21:24 2008 +0000
@@ -20,6 +20,7 @@
  */
 #include "avformat.h"
 #include "rtp_internal.h"
+#include "rdt.h"
 
 #define REGISTER_MUXER(X,x) { \
           extern AVOutputFormat x##_muxer; \
@@ -165,6 +166,7 @@
     REGISTER_DEMUXER  (SDP, sdp);
 #ifdef CONFIG_SDP_DEMUXER
     av_register_rtp_dynamic_payload_handlers();
+    av_register_rdt_dynamic_payload_handlers();
 #endif
     REGISTER_DEMUXER  (SEGAFILM, segafilm);
     REGISTER_DEMUXER  (SHORTEN, shorten);