[FFmpeg-cvslog] rtmp: Add a new option 'rtmp_buffer', for setting the client buffer time

Samuel Pitoiset git at videolan.org
Wed Jun 13 23:02:30 CEST 2012


ffmpeg | branch: master | Samuel Pitoiset <samuel.pitoiset at gmail.com> | Wed Jun 13 15:02:03 2012 +0200| [8517e9c476e8cf92d9ed25b6486bb43d3dc2c49d] | committer: Martin Storsjö

rtmp: Add a new option 'rtmp_buffer', for setting the client buffer time

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8517e9c476e8cf92d9ed25b6486bb43d3dc2c49d
---

 doc/protocols.texi      |    3 +++
 libavformat/rtmpproto.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/protocols.texi b/doc/protocols.texi
index 66beff6..8492033 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -198,6 +198,9 @@ Additionally, the following parameters can be set via command line options
 Name of application to connect on the RTMP server. This option
 overrides the parameter specified in the URI.
 
+ at item rtmp_buffer
+Set the client buffer time in milliseconds. The default is 3000.
+
 @item rtmp_conn
 Extra arbitrary AMF connection parameters, parsed from a string,
 e.g. like @code{B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0}.
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 0407ad3..e64e2a3 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -1219,7 +1219,6 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
     rt->bytes_read = 0;
     rt->last_bytes_read = 0;
     rt->server_bw = 2500000;
-    rt->client_buffer_time = 3000;
 
     av_log(s, AV_LOG_DEBUG, "Proto = %s, path = %s, app = %s, fname = %s\n",
            proto, path, rt->app, rt->playpath);
@@ -1366,6 +1365,7 @@ static int rtmp_write(URLContext *s, const uint8_t *buf, int size)
 
 static const AVOption rtmp_options[] = {
     {"rtmp_app", "Name of application to connect to on the RTMP server", OFFSET(app), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC|ENC},
+    {"rtmp_buffer", "Set buffer time in milliseconds. The default is 3000.", OFFSET(client_buffer_time), AV_OPT_TYPE_INT, {3000}, 0, INT_MAX, DEC|ENC},
     {"rtmp_conn", "Append arbitrary AMF data to the Connect message", OFFSET(conn), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC|ENC},
     {"rtmp_flashver", "Version of the Flash plugin used to run the SWF player.", OFFSET(flashver), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC|ENC},
     {"rtmp_live", "Specify that the media is a live stream.", OFFSET(live), AV_OPT_TYPE_INT, {-2}, INT_MIN, INT_MAX, DEC, "rtmp_live"},



More information about the ffmpeg-cvslog mailing list