This option specifies the URL of the web page in which the media
was embedded.
Signed-off-by: Martin Storsjö <martin@martin.st>
... | ... |
@@ -229,6 +229,10 @@ playpath. If a live stream of that name is not found, it plays the |
229 | 229 |
recorded stream. The other possible values are @code{live} and |
230 | 230 |
@code{recorded}. |
231 | 231 |
|
232 |
+@item rtmp_pageurl |
|
233 |
+URL of the web page in which the media was embedded. By default no |
|
234 |
+value will be sent. |
|
235 |
+ |
|
232 | 236 |
@item rtmp_playpath |
233 | 237 |
Stream identifier to play or to publish. This option overrides the |
234 | 238 |
parameter specified in the URI. |
... | ... |
@@ -90,6 +90,7 @@ typedef struct RTMPContext { |
90 | 90 |
char* tcurl; ///< url of the target stream |
91 | 91 |
char* flashver; ///< version of the flash plugin |
92 | 92 |
char* swfurl; ///< url of the swf player |
93 |
+ char* pageurl; ///< url of the web page |
|
93 | 94 |
int server_bw; ///< server bandwidth |
94 | 95 |
int client_buffer_time; ///< client buffer time in ms |
95 | 96 |
int flush_interval; ///< number of packets flushed in the same request (RTMPT only) |
... | ... |
@@ -232,6 +233,11 @@ static int gen_connect(URLContext *s, RTMPContext *rt) |
232 | 232 |
ff_amf_write_number(&p, 252.0); |
233 | 233 |
ff_amf_write_field_name(&p, "videoFunction"); |
234 | 234 |
ff_amf_write_number(&p, 1.0); |
235 |
+ |
|
236 |
+ if (rt->pageurl) { |
|
237 |
+ ff_amf_write_field_name(&p, "pageUrl"); |
|
238 |
+ ff_amf_write_string(&p, rt->pageurl); |
|
239 |
+ } |
|
235 | 240 |
} |
236 | 241 |
ff_amf_write_object_end(&p); |
237 | 242 |
|
... | ... |
@@ -1498,6 +1504,7 @@ static const AVOption rtmp_options[] = { |
1498 | 1498 |
{"any", "both", 0, AV_OPT_TYPE_CONST, {-2}, 0, 0, DEC, "rtmp_live"}, |
1499 | 1499 |
{"live", "live stream", 0, AV_OPT_TYPE_CONST, {-1}, 0, 0, DEC, "rtmp_live"}, |
1500 | 1500 |
{"recorded", "recorded stream", 0, AV_OPT_TYPE_CONST, {0}, 0, 0, DEC, "rtmp_live"}, |
1501 |
+ {"rtmp_pageurl", "URL of the web page in which the media was embedded. By default no value will be sent.", OFFSET(pageurl), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC}, |
|
1501 | 1502 |
{"rtmp_playpath", "Stream identifier to play or to publish", OFFSET(playpath), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC|ENC}, |
1502 | 1503 |
{"rtmp_swfurl", "URL of the SWF player. By default no value will be sent", OFFSET(swfurl), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC|ENC}, |
1503 | 1504 |
{"rtmp_tcurl", "URL of the target stream. Defaults to proto://host[:port]/app.", OFFSET(tcurl), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC|ENC}, |