"Caching value for RTMP streams. This " \
"value should be set in milliseconds." )
+#define SWFURL_TEXT N_("Default SWF Referrer URL")
+#define SWFURL_LONGTEXT N_("The SFW URL to use as referrer when connecting to"\
+ "the server. This is the SWF file that contained" \
+ "the stream.")
+
+#define PAGEURL_TEXT N_("Page Referrer URL")
+#define PAGEURL_LONGTEXT N_("Page URL to use as referrer when connecting to" \
+ "the server. This is the page housing the SWF" \
+ "file.")
+
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
add_integer( "rtmp-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
CACHING_LONGTEXT, true )
+ add_string( "rtmp-swfurl", "file:///mac.flv", NULL, SWFURL_TEXT,
+ SWFURL_LONGTEXT, true )
+ add_string( "rtmp-pageurl", "file:///mac.html", NULL, PAGEURL_TEXT,
+ PAGEURL_LONGTEXT, true )
set_capability( "access", 0 )
set_callbacks( Open, Close )
p_sys->p_thread->psz_application = strndup( p_sys->p_thread->url.psz_path + 1, length_path - length_media_name - 2 );
p_sys->p_thread->psz_media = strdup( p_sys->p_thread->url.psz_path + ( length_path - length_media_name ) );
+ p_sys->p_thread->psz_swf_url = var_CreateGetString( p_access, "rtmp-swfurl" );
+ p_sys->p_thread->psz_page_url = var_CreateGetString( p_access, "rtmp-pageurl" );
+
msg_Dbg( p_access, "rtmp: host='%s' port=%d path='%s'",
p_sys->p_thread->url.psz_host, p_sys->p_thread->url.i_port, p_sys->p_thread->url.psz_path );
free( p_sys->p_thread->psz_application );
free( p_sys->p_thread->psz_media );
+ free( p_sys->p_thread->psz_swf_url );
+ free( p_sys->p_thread->psz_page_url );
net_Close( p_sys->p_thread->fd );
error:
vlc_UrlClean( &p_sys->p_thread->url );
free( p_sys->p_thread->psz_application );
free( p_sys->p_thread->psz_media );
+ free( p_sys->p_thread->psz_swf_url );
+ free( p_sys->p_thread->psz_page_url );
vlc_object_detach( p_sys->p_thread );
vlc_object_release( p_sys->p_thread );
free( tmp_buffer );
tmp_buffer = amf_encode_object_variable( "swfUrl",
- AMF_DATATYPE_STRING, "file:///mac.flv" );
+ AMF_DATATYPE_STRING, p_thread->psz_swf_url );
rtmp_body_append( rtmp_body, tmp_buffer,
AMF_DATATYPE_SIZE_OBJECT_VARIABLE + strlen( "swfUrl" ) +
- AMF_DATATYPE_SIZE_STRING + strlen( "file:///mac.flv" ) );
+ AMF_DATATYPE_SIZE_STRING + strlen( p_thread->psz_swf_url ) );
free( tmp_buffer );
if( asprintf( &tmp_url, "rtmp://%s", p_thread->url.psz_buffer ) == -1 )
free( tmp_buffer );
tmp_buffer = amf_encode_object_variable( "pageUrl",
- AMF_DATATYPE_STRING, "file:///mac.html" );
+ AMF_DATATYPE_STRING, p_thread->psz_page_url );
rtmp_body_append( rtmp_body, tmp_buffer,
AMF_DATATYPE_SIZE_OBJECT_VARIABLE + strlen( "pageUrl" ) +
- AMF_DATATYPE_SIZE_STRING + strlen( "file:///mac.html" ) );
+ AMF_DATATYPE_SIZE_STRING + strlen( p_thread->psz_page_url ) );
free( tmp_buffer );
tmp_buffer = amf_encode_object_variable( "objectEncoding",