add_submodule();
set_description( _("FFmpeg muxer" ) );
set_capability( "sout mux", 2 );
+ add_string( "ffmpeg-mux", NULL, NULL, MUX_TEXT,
+ MUX_LONGTEXT, VLC_TRUE );
set_callbacks( E_(OpenMux), E_(CloseMux) );
#if defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)
/* Version checking */
#if defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE)
+static const char *ppsz_mux_options[] = {
+ "mux", NULL
+};
+
/*****************************************************************************
* mux_sys_t: mux descriptor
*****************************************************************************/
*****************************************************************************/
int E_(OpenMux)( vlc_object_t *p_this )
{
- AVOutputFormat *file_oformat;
+ AVOutputFormat *file_oformat;
sout_mux_t *p_mux = (sout_mux_t*)p_this;
sout_mux_sys_t *p_sys;
AVFormatParameters params, *ap = ¶ms;
+ char *psz_mux;
/* Should we call it only once ? */
av_register_all();
+ config_ChainParse( p_mux, "ffmpeg-", ppsz_mux_options, p_mux->p_cfg );
+
/* Find the requested muxer */
- file_oformat =
- guess_format(NULL, p_mux->p_access->psz_path, NULL);
+ psz_mux = var_GetNonEmptyString( p_mux, "ffmpeg-mux" );
+ if( psz_mux )
+ {
+ file_oformat = guess_format( psz_mux, NULL, NULL );
+ }
+ else
+ {
+ file_oformat =
+ guess_format(NULL, p_mux->p_access->psz_path, NULL);
+ }
if (!file_oformat)
{
msg_Err( p_mux, "unable for find a suitable output format" );