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@gmail.com> wrote:
Hi,
On Wed, Jun 2, 2010 at 6:59 PM, Josh Allmann <joshua.allmann@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!