[FFmpeg-devel] [PATCH] rtsp - alternate protocol
Luca Abeni
lucabe72
Wed Jan 2 10:38:18 CET 2008
Hi Michael,
first of all, thanks for the feedback.
Michael Niedermayer wrote:
[...]
> [...]
>> -#ifdef CONFIG_RTSP_DEMUXER
>> static void opt_rtp_tcp(void)
>> {
>> /* only tcp protocol */
>> - rtsp_default_protocols = (1 << RTSP_PROTOCOL_RTP_TCP);
>> + rtsp_default_protocols = AVTRANSPORT_TCP;
>> }
>> -#endif
>
> this would be unneeded if ffplay would use AVOptions, but thats seperate
> and belongs in some future patch
I did not know much about AVOptions... I am looking at them right now,
and I'll update the patch to use AVOptions.
> ... if you want to volunteer to implement it :)
I see that the whole ffplay.c has to be converted, right? I'll have a
look, and see if I can find some time for this conversion.
[...]
>> enum CodecID subtitle_codec_id;
>> + /**
>> + * Forced network protocol.
>> + * demuxing: set by user
>> + */
>> + enum AVTransportProtocol transport_protocol;
>> } AVFormatContext;
>>
>
> you are forgetting to bump the minor version num
Opss... I knew I was forgetting something... Sorry about that; I'll fix
the patch and resend.
> and you have to add an entry to AVOption in utils.c
Ok. I now understand this... I'm going to fix this problem.
>
> [...]
>> + switch (s->transport_protocol) {
>> + case AVTRANSPORT_UDP: protocol_mask = (1<< RTSP_PROTOCOL_RTP_UDP); break;
>> + case AVTRANSPORT_TCP: protocol_mask = (1<< RTSP_PROTOCOL_RTP_TCP); break;
>> + case AVTRANSPORT_MULTICAST: protocol_mask = (1<< RTSP_PROTOCOL_RTP_UDP_MULTICAST); break;
>> }
>
> vertical align, and is this remapping needed? cant u use the AVTRANSPORT
> values in RTSP too?
I was under the impression that protocol_mask wants to be a bitmask,
while transport_protocol is a simple constant... Anyway, I see that
there are some patches changing this code; I'll redo my patch after they
are applied, and if possible I'll directly use AVTRANSPORT_*, removing
the RTSP_PROTOCOL_* constants.
Thanks,
Luca
More information about the ffmpeg-devel
mailing list