Commit 5d805895 authored by Ken Self's avatar Ken Self

BDA - additional DVB-S parameters added

parent 9b071a16
......@@ -88,13 +88,14 @@ static int Control( access_t *, int, va_list );
#define SRATE_LONGTEXT ""
#define LNB_LOF1_TEXT N_("Antenna lnb_lof1 (kHz)")
#define LNB_LOF1_LONGTEXT ""
#define LNB_LOF1_LONGTEXT N_("Low Band Local Osc Freq in kHz usually 9.75GHz")
#define LNB_LOF2_TEXT N_("Antenna lnb_lof2 (kHz)")
#define LNB_LOF2_LONGTEXT ""
#define LNB_LOF2_LONGTEXT N_("High Band Local Osc Freq in kHz usually 10.6GHz")
#define LNB_SLOF_TEXT N_("Antenna lnb_slof (kHz)")
#define LNB_SLOF_LONGTEXT ""
#define LNB_SLOF_LONGTEXT N_( \
"Low Noise Block switch freq in kHz usually 11.7GHz")
/* Cable */
#define MODULATION_TEXT N_("Modulation type")
......@@ -166,13 +167,13 @@ vlc_module_begin();
/* DVB-S (satellite) */
# if defined(WIN32) || defined(WINCE)
add_integer( "dvb-azimuth", 0, NULL, AZIMUTH_TEXT, AZIMUTH_LONGTEXT,
VLC_FALSE );
VLC_TRUE );
add_integer( "dvb-elevation", 0, NULL, ELEVATION_TEXT,
ELEVATION_LONGTEXT, VLC_FALSE );
ELEVATION_LONGTEXT, VLC_TRUE );
add_integer( "dvb-longitude", 0, NULL, LONGITUDE_TEXT,
LONGITUDE_LONGTEXT, VLC_FALSE );
LONGITUDE_LONGTEXT, VLC_TRUE );
add_string( "dvb-polarisation", NULL, NULL, POLARISATION_TEXT,
POLARISATION_LONGTEXT, VLC_FALSE );
POLARISATION_LONGTEXT, VLC_TRUE );
change_string_list( ppsz_polar_list, ppsz_polar_text, 0 );
/* Note: Polaristion H = voltage 18; V = voltage 13; */
# else
......@@ -184,13 +185,14 @@ vlc_module_begin();
HIGH_VOLTAGE_LONGTEXT, VLC_TRUE );
add_integer( "dvb-tone", -1, NULL, TONE_TEXT, TONE_LONGTEXT,
VLC_TRUE );
add_integer( "dvb-lnb-lof1", 0, NULL, LNB_LOF1_TEXT,
LNB_LOF1_LONGTEXT, VLC_TRUE );
add_integer( "dvb-lnb-lof2", 0, NULL, LNB_LOF2_TEXT,
LNB_LOF2_LONGTEXT, VLC_TRUE );
add_integer( "dvb-lnb-slof", 0, NULL, LNB_SLOF_TEXT,
LNB_SLOF_LONGTEXT, VLC_TRUE );
# endif
add_integer( "dvb-lnb-lof1", 0, NULL, LNB_LOF1_TEXT,
LNB_LOF1_LONGTEXT, VLC_TRUE );
add_integer( "dvb-lnb-lof2", 0, NULL, LNB_LOF2_TEXT,
LNB_LOF2_LONGTEXT, VLC_TRUE );
add_integer( "dvb-lnb-slof", 0, NULL, LNB_SLOF_TEXT,
LNB_SLOF_LONGTEXT, VLC_TRUE );
add_integer( "dvb-fec", 9, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_TRUE );
add_integer( "dvb-srate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT,
VLC_FALSE );
......@@ -242,14 +244,15 @@ static int Open( vlc_object_t *p_this )
access_t *p_access = (access_t*)p_this;
access_sys_t *p_sys;
const char* psz_module = "dvb";
const int i_param_count = 9;
const int i_param_count = 12;
const char* psz_param[] = { "frequency", "bandwidth",
"srate", "azimuth", "elevation", "longitude", "polarisation",
"modulation", "caching" };
"modulation", "caching", "lnb-lof1", "lnb-lof2", "lnb-slof" };
const int i_type[] = { VLC_VAR_INTEGER, VLC_VAR_INTEGER,
VLC_VAR_INTEGER, VLC_VAR_INTEGER, VLC_VAR_INTEGER, VLC_VAR_INTEGER,
VLC_VAR_STRING, VLC_VAR_INTEGER, VLC_VAR_INTEGER };
VLC_VAR_STRING, VLC_VAR_INTEGER, VLC_VAR_INTEGER, VLC_VAR_INTEGER,
VLC_VAR_INTEGER, VLC_VAR_INTEGER };
char psz_full_name[128];
int i_ret;
......
......@@ -29,8 +29,11 @@ class IComponentType;
class IComponentTypes;
class IDVBCLocator;
class IDVBSLocator;
class IDVBSTuningSpace;
class IDVBTLocator;
class IDVBTuneRequest;
class IDVBTuningSpace;
class IDVBTuningSpace2;
class IEnumComponents;
class IEnumComponentTypes;
class IEnumTuningSpaces;
......@@ -76,6 +79,13 @@ typedef enum ComponentStatus
StatusUnavailable,
} ComponentStatus;
typedef enum DVBSystemType
{
DVB_Cable,
DVB_Terrestrial,
DVB_Satellite,
} DVBSystemType;
typedef enum FECMethod
{
BDA_FEC_METHOD_NOT_SET = -1,
......@@ -150,6 +160,16 @@ typedef enum Polarisation
BDA_POLARISATION_MAX = 5
} Polarisation;
typedef enum SpectralInversion
{
BDA_SPECTRAL_INVERSION_NOT_SET = -1,
BDA_SPECTRAL_INVERSION_NOT_DEFINED = 0,
BDA_SPECTRAL_INVERSION_AUTOMATIC = 1,
BDA_SPECTRAL_INVERSION_NORMAL,
BDA_SPECTRAL_INVERSION_INVERTED,
BDA_SPECTRAL_INVERSION_MAX
} SpectralInversion;
typedef enum TransmissionMode
{
BDA_XMIT_MODE_NOT_SET = -1,
......@@ -453,6 +473,37 @@ public:
virtual HRESULT __stdcall Clone( ITuningSpace** p_p_tuning_space )=0;
};
class IDVBTuningSpace : public ITuningSpace
{
public:
virtual HRESULT __stdcall get_SystemType( DVBSystemType* p_sys_type )=0;
virtual HRESULT __stdcall put_SystemType( DVBSystemType sys_type )=0;
};
class IDVBTuningSpace2 : public IDVBTuningSpace
{
public:
virtual HRESULT __stdcall get_NetworkID( long* p_l_network_id )=0;
virtual HRESULT __stdcall put_NetworkID( long l_network_id )=0;
};
class IDVBSTuningSpace : public IDVBTuningSpace2
{
public:
virtual HRESULT __stdcall get_LowOscillator( long* p_l_low_osc )=0;
virtual HRESULT __stdcall put_LowOscillator( long l_low_osc )=0;
virtual HRESULT __stdcall get_HighOscillator( long* p_l_high_osc )=0;
virtual HRESULT __stdcall put_HighOscillator( long l_high_osc )=0;
virtual HRESULT __stdcall get_LNBSwitch( long* p_l_lnb_switch )=0;
virtual HRESULT __stdcall put_LNBSwitch( long l_lnb_switch )=0;
virtual HRESULT __stdcall get_InputRange( BSTR* p_bstr_input_range )=0;
virtual HRESULT __stdcall put_InputRange( BSTR bstr_input_range )=0;
virtual HRESULT __stdcall get_SpectralInversion(
SpectralInversion* p_spectral_inv )=0;
virtual HRESULT __stdcall put_SpectralInversion(
SpectralInversion spectral_inv )=0;
};
class ITuningSpaceContainer : public IDispatch
{
public:
......@@ -517,6 +568,8 @@ extern const GUID IID_IDVBCLocator;
extern const GUID IID_IDVBSLocator;
extern const GUID IID_IDVBSTuningSpace;
extern const GUID IID_IDVBTuneRequest;
extern const GUID IID_IDVBTuningSpace;
extern const GUID IID_IDVBTuningSpace2;
extern const GUID IID_IGraphBuilder;
extern const GUID IID_IMediaControl;
extern const GUID IID_IMpeg2Demultiplexer;
......
......@@ -435,9 +435,13 @@ int BDAGraph::SubmitDVBSTuneRequest()
public:
IDVBTuneRequest* p_dvbs_tune_request;
IDVBSLocator* p_dvbs_locator;
localComPtr(): p_dvbs_tune_request(NULL), p_dvbs_locator(NULL) {};
IDVBSTuningSpace* p_dvbs_tuning_space;
localComPtr(): p_dvbs_tune_request(NULL), p_dvbs_locator(NULL),
p_dvbs_tuning_space(NULL) {};
~localComPtr()
{
if( p_dvbs_tuning_space )
p_dvbs_tuning_space->Release();
if( p_dvbs_tune_request )
p_dvbs_tune_request->Release();
if( p_dvbs_locator )
......@@ -445,16 +449,21 @@ int BDAGraph::SubmitDVBSTuneRequest()
}
} l;
long l_frequency, l_symbolrate, l_azimuth, l_elevation, l_longitude;
long l_lnb_lof1, l_lnb_lof2, l_lnb_slof;
char* psz_polarisation;
Polarisation i_polar;
VARIANT_BOOL b_west;
l_frequency = l_symbolrate = l_azimuth = l_elevation = l_longitude = -1;
l_lnb_lof1 = l_lnb_lof2 = l_lnb_slof = -1;
l_frequency = var_GetInteger( p_access, "dvb-frequency" );
l_symbolrate = var_GetInteger( p_access, "dvb-srate" );
l_azimuth = var_GetInteger( p_access, "dvb-azimuth" );
l_elevation = var_GetInteger( p_access, "dvb-elevation" );
l_longitude = var_GetInteger( p_access, "dvb-longitude" );
l_lnb_lof1 = var_GetInteger( p_access, "dvb-lnb-lof1" );
l_lnb_lof2 = var_GetInteger( p_access, "dvb-lnb-lof2" );
l_lnb_slof = var_GetInteger( p_access, "dvb-lnb-slof" );
psz_polarisation = var_GetString( p_access, "dvb-polarisation" );
b_west = ( l_longitude < 0 ) ? TRUE : FALSE;
......@@ -499,6 +508,15 @@ int BDAGraph::SubmitDVBSTuneRequest()
return VLC_EGENERIC;
}
hr = p_tuning_space->QueryInterface( IID_IDVBSTuningSpace,
(void**)&l.p_dvbs_tuning_space );
if( FAILED( hr ) )
{
msg_Warn( p_access, "SubmitDVBSTuneRequest: "\
"Cannot QI for IDVBSTuningSpace: hr=0x%8lx", hr );
return VLC_EGENERIC;
}
hr = S_OK;
if( l_frequency > 0 )
hr = l.p_dvbs_locator->put_CarrierFrequency( l_frequency );
......@@ -514,6 +532,12 @@ int BDAGraph::SubmitDVBSTuneRequest()
hr = l.p_dvbs_locator->put_WestPosition( b_west );
if( SUCCEEDED( hr ) && i_polar != BDA_POLARISATION_NOT_SET )
hr = l.p_dvbs_locator->put_SignalPolarisation( i_polar );
if( SUCCEEDED( hr ) && l_lnb_lof1 > 0 )
hr = l.p_dvbs_tuning_space->put_LowOscillator( l_lnb_lof1 );
if( SUCCEEDED( hr ) && l_lnb_lof2 > 0 )
hr = l.p_dvbs_tuning_space->put_HighOscillator( l_lnb_lof2 );
if( SUCCEEDED( hr ) && l_lnb_slof > 0 )
hr = l.p_dvbs_tuning_space->put_HighOscillator( l_lnb_slof );
if( FAILED( hr ) )
{
msg_Warn( p_access, "SubmitDVBSTuneRequest: "\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment