[FFmpeg-devel] Realmedia patch

Ronald S. Bultje rsbultje
Sun Aug 31 00:05:01 CEST 2008


On Thu, Aug 21, 2008 at 12:05 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Mon, Aug 18, 2008 at 10:21:35AM -0400, Ronald S. Bultje wrote:
>> +extern AVInputFormat rm_demuxer;
>
> shouldnt that be in some header?
>
>
>> +static void *
>> +rdt_new_extradata (void)
>> +{
>> +    static AVInputFormat rdt_demuxer = {
>> +        "rdt",
>> +        NULL_IF_CONFIG_SMALL("RDT demuxer"),
>> +        sizeof(RMContext),
>> +        NULL, NULL, NULL, NULL, NULL, NULL
>> +    };
>> +    rdt_data *rdt = av_mallocz (sizeof (rdt_data) +
>> +        FF_INPUT_BUFFER_PADDING_SIZE);
>> +
>> +    if (!rdt_demuxer.read_close)
>> +       rdt_demuxer.read_close = rm_demuxer.read_close;
>> +    av_open_input_stream(&rdt->rmctx, NULL, "", &rdt_demuxer, NULL);
>> +    rdt->first = 1;
>> +    rdt->prev_ts = -1;
>> +    rdt->prev_sn = -1;
>> +
>> +    return rdt;
>> +}
>
> i do not know what this is supposed to do but it does not look very
> much like it would be the cleanest way for it.
> the way read_close is set alone is scary ...
> So please elaborate ...

Attached is a basic version that uses the RTPDynamicPayloadHandler
system to implement RDT-specific SDP parsing and stream handling. It
doesn't actually do the packet handling, that'll come in the next
patch, but it reads the relevant SDP lines to be able to setup a
stream. I hope above comments are sufficiently taken care of in this
code.

My intentions for the next patches would then be:
- one that subscribes to stream 0 in rtsp.c
- one that implements RDT-specific packet handling (rtsp.c -> rdt.c)
At that point, ffplay should be able to play Realmedia/RTSP streams.

The next few patches would then implement stream selection:
- ASM rulebook parsing
- multiple AVStream creation
- implement handling of AVDiscard in rtsp.c
With all that, ffplay -ast X would work.

Anyway, that'll probably take another year or so... :-).

Ronald
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rtsp-dynamic_rdt_handler.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080830/a4764b74/attachment.asc>



More information about the ffmpeg-devel mailing list