[FFmpeg-soc] [PATCH] rtsp tunneling

Josh Allmann joshua.allmann at gmail.com
Fri Jun 4 11:38:01 CEST 2010


Five patches in this series, addressing comments from everyone.

My soc repo is also updated. I've pulled against the latest ffmpeg
trunk, so we can use the av_base64_size macro and the interleaving fix
Martin made.

http://github.com/j0sh/ffmpeg-soc/tree/rtsp-tunneling

On 3 June 2010 11:51, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> Hi,
>
> On Wed, Jun 2, 2010 at 6:59 PM, Josh Allmann <joshua.allmann at gmail.com> wrote:
>> First three are related to http, the last adds actual tunnelling
>> support to rtsp.
>
> HTTP doesn't need the new flag, you can always open delayed.

Done. Also, after talking with Martin about this on IRC, I also
special-cased the size parameter to force a header fetch. However, I
can just add a separate ff_http_connect function along the lines of my
first patchset if that's preferable.

>
> For RTSP/HTTP.
>
>
>> +    /* base64 encode rtsp if tunnelling */
>> +    if (rt->rtsp_hd_out != rt->rtsp_hd) {
>> +        if (!av_base64_encode(base64buf, sizeof(base64buf), buf, strlen(buf))) {
>> +            av_log(s, AV_LOG_ERROR, "Unable to base64 encode RTSP.\n");
>> +            return;
>> +        }
>> +        out_buf = base64buf;
>> +    }
>> +
>
> I don't like the if at the top, I'd add a rtsp_protocol_mode with an
> enum (like the transport enums in rtsp.h), using
> RTSP_PROTOCOL_MODE_PLAIN or RTSP_PROTOCOL_MODE_HTTP. You can also call
> it tunnel_mode or so.

Done.

>
>> -    url_write(rt->rtsp_hd, buf, strlen(buf));
>> +    url_write(rt->rtsp_hd_out, out_buf, strlen(out_buf));
>>      if (send_content_length > 0 && send_content)
>> -        url_write(rt->rtsp_hd, send_content, send_content_length);
>> +        url_write(rt->rtsp_hd_out, send_content, send_content_length);
>
> I'd prefer if you'd do the patch that splits rtsp_hd into hd_in/out separately.
>
> +                 "Content-Length: 32767\r\n"
> +                 "Expires: Sun, 9 Jan 1972 00:00:00 GMT\r\n",
>
> ??

So quoth the spec. They're there to prevent proxies from caching stuff.

>
> The rest is pretty, well done!
>

Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Modified-behavior-of-http_open-to-implicitly-delay-c.patch
Type: text/x-patch
Size: 2656 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100604/771a0bca/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Added-in-capability-to-write-custom-HTTP-headers.patch
Type: text/x-patch
Size: 4721 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100604/771a0bca/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Added-support-for-disabling-chunked-transfer-encodin.patch
Type: text/x-patch
Size: 3236 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100604/771a0bca/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Adds-in-a-second-RTSP-handle-for-outgoing-messages.patch
Type: text/x-patch
Size: 4394 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100604/771a0bca/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Added-in-RTSP-tunneling-over-HTTP.patch
Type: text/x-patch
Size: 6185 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100604/771a0bca/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Propagated-errors-up-ff_rtsp_send_cmd.patch
Type: text/x-patch
Size: 5808 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100604/771a0bca/attachment-0005.bin>


More information about the FFmpeg-soc mailing list