static int pi_tuner_input[] = { 0, 1, 2 };
static char *ppsz_tuner_input_text[] =
{N_("Default"), N_("Cable"), N_("Antenna")};
+static int pi_amtuner_mode[] = { AMTUNER_MODE_DEFAULT,
+ AMTUNER_MODE_TV,
+ AMTUNER_MODE_FM_RADIO,
+ AMTUNER_MODE_AM_RADIO,
+ AMTUNER_MODE_DSS };
+static char *ppsz_amtuner_mode_text[] = { N_("Default"),
+ N_("TV"),
+ N_("FM radio"),
+ N_("AM radio"),
+ N_("DSS") };
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
#define AUDIO_OUT_LONGTEXT N_( \
"Select the audio output type. See the \"video input\" option." )
+#define AMTUNER_MODE_TEXT N_("AM Tuner mode")
+#define AMTUNER_MODE_LONGTEST N_( \
+ "AM Tuner mode. Can be one of DEFAULT, TV, AM_RADIO, FM_RADIO or DSS.")
+
static int CommonOpen ( vlc_object_t *, access_sys_t *, vlc_bool_t );
static void CommonClose( vlc_object_t *, access_sys_t * );
add_integer( "dshow-audio-output", -1, NULL, AUDIO_OUT_TEXT,
AUDIO_OUT_LONGTEXT, VLC_TRUE );
+ add_string( "dshow-amtuner-mode", AMTUNER_MODE_TV, NULL,
+ AMTUNER_MODE_TEXT, AMTUNER_MODE_LONGTEXT, VLC_FALSE);
+ change_integer_list( pi_amtuner_mode, ppsz_amtuner_mode_text, 0 );
+
add_shortcut( "dshow" );
set_capability( "access_demux", 0 );
set_callbacks( DemuxOpen, DemuxClose );
var_Create( p_this, "dshow-tuner-input",
VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
+ var_Create( p_this, "dshow-amtuner-mode",
+ VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
+
var_Create( p_this, "dshow-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_this, "dshow-video-input", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
static void ConfigTuner( vlc_object_t *p_this, ICaptureGraphBuilder2 *p_graph,
IBaseFilter *p_device_filter )
{
- int i_channel, i_country, i_input;
+ int i_channel, i_country, i_input, i_amtuner_mode;
long l_modes = 0;
IAMTVTuner *p_TV;
HRESULT hr;
i_channel = var_GetInteger( p_this, "dshow-tuner-channel" );
i_country = var_GetInteger( p_this, "dshow-tuner-country" );
i_input = var_GetInteger( p_this, "dshow-tuner-input" );
+ i_amtuner_mode = var_GetInteger( p_this, "dshow-amtuner-mode" );
if( !i_channel && !i_country && !i_input ) return; /* Nothing to do */
}
hr = p_TV->GetAvailableModes( &l_modes );
- if( SUCCEEDED(hr) && (l_modes & AMTUNER_MODE_TV) )
+ if( SUCCEEDED(hr) && (l_modes & i_amtuner_mode) )
{
- hr = p_TV->put_Mode( AMTUNER_MODE_TV );
+ hr = p_TV->put_Mode( i_amtuner_mode );
}
if( i_input == 1 ) p_TV->put_InputType( 0, TunerInputCable );