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 ); ...@@ -88,13 +88,14 @@ static int Control( access_t *, int, va_list );
#define SRATE_LONGTEXT "" #define SRATE_LONGTEXT ""
#define LNB_LOF1_TEXT N_("Antenna lnb_lof1 (kHz)") #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_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_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 */ /* Cable */
#define MODULATION_TEXT N_("Modulation type") #define MODULATION_TEXT N_("Modulation type")
...@@ -166,13 +167,13 @@ vlc_module_begin(); ...@@ -166,13 +167,13 @@ vlc_module_begin();
/* DVB-S (satellite) */ /* DVB-S (satellite) */
# if defined(WIN32) || defined(WINCE) # if defined(WIN32) || defined(WINCE)
add_integer( "dvb-azimuth", 0, NULL, AZIMUTH_TEXT, AZIMUTH_LONGTEXT, add_integer( "dvb-azimuth", 0, NULL, AZIMUTH_TEXT, AZIMUTH_LONGTEXT,
VLC_FALSE ); VLC_TRUE );
add_integer( "dvb-elevation", 0, NULL, ELEVATION_TEXT, add_integer( "dvb-elevation", 0, NULL, ELEVATION_TEXT,
ELEVATION_LONGTEXT, VLC_FALSE ); ELEVATION_LONGTEXT, VLC_TRUE );
add_integer( "dvb-longitude", 0, NULL, LONGITUDE_TEXT, add_integer( "dvb-longitude", 0, NULL, LONGITUDE_TEXT,
LONGITUDE_LONGTEXT, VLC_FALSE ); LONGITUDE_LONGTEXT, VLC_TRUE );
add_string( "dvb-polarisation", NULL, NULL, POLARISATION_TEXT, 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 ); change_string_list( ppsz_polar_list, ppsz_polar_text, 0 );
/* Note: Polaristion H = voltage 18; V = voltage 13; */ /* Note: Polaristion H = voltage 18; V = voltage 13; */
# else # else
...@@ -184,13 +185,14 @@ vlc_module_begin(); ...@@ -184,13 +185,14 @@ vlc_module_begin();
HIGH_VOLTAGE_LONGTEXT, VLC_TRUE ); HIGH_VOLTAGE_LONGTEXT, VLC_TRUE );
add_integer( "dvb-tone", -1, NULL, TONE_TEXT, TONE_LONGTEXT, add_integer( "dvb-tone", -1, NULL, TONE_TEXT, TONE_LONGTEXT,
VLC_TRUE ); 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 # 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-fec", 9, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_TRUE );
add_integer( "dvb-srate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT, add_integer( "dvb-srate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT,
VLC_FALSE ); VLC_FALSE );
...@@ -242,14 +244,15 @@ static int Open( vlc_object_t *p_this ) ...@@ -242,14 +244,15 @@ static int Open( vlc_object_t *p_this )
access_t *p_access = (access_t*)p_this; access_t *p_access = (access_t*)p_this;
access_sys_t *p_sys; access_sys_t *p_sys;
const char* psz_module = "dvb"; const char* psz_module = "dvb";
const int i_param_count = 9; const int i_param_count = 12;
const char* psz_param[] = { "frequency", "bandwidth", const char* psz_param[] = { "frequency", "bandwidth",
"srate", "azimuth", "elevation", "longitude", "polarisation", "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, const int i_type[] = { VLC_VAR_INTEGER, VLC_VAR_INTEGER,
VLC_VAR_INTEGER, VLC_VAR_INTEGER, 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]; char psz_full_name[128];
int i_ret; int i_ret;
......
...@@ -29,8 +29,11 @@ class IComponentType; ...@@ -29,8 +29,11 @@ class IComponentType;
class IComponentTypes; class IComponentTypes;
class IDVBCLocator; class IDVBCLocator;
class IDVBSLocator; class IDVBSLocator;
class IDVBSTuningSpace;
class IDVBTLocator; class IDVBTLocator;
class IDVBTuneRequest; class IDVBTuneRequest;
class IDVBTuningSpace;
class IDVBTuningSpace2;
class IEnumComponents; class IEnumComponents;
class IEnumComponentTypes; class IEnumComponentTypes;
class IEnumTuningSpaces; class IEnumTuningSpaces;
...@@ -76,6 +79,13 @@ typedef enum ComponentStatus ...@@ -76,6 +79,13 @@ typedef enum ComponentStatus
StatusUnavailable, StatusUnavailable,
} ComponentStatus; } ComponentStatus;
typedef enum DVBSystemType
{
DVB_Cable,
DVB_Terrestrial,
DVB_Satellite,
} DVBSystemType;
typedef enum FECMethod typedef enum FECMethod
{ {
BDA_FEC_METHOD_NOT_SET = -1, BDA_FEC_METHOD_NOT_SET = -1,
...@@ -150,6 +160,16 @@ typedef enum Polarisation ...@@ -150,6 +160,16 @@ typedef enum Polarisation
BDA_POLARISATION_MAX = 5 BDA_POLARISATION_MAX = 5
} Polarisation; } 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 typedef enum TransmissionMode
{ {
BDA_XMIT_MODE_NOT_SET = -1, BDA_XMIT_MODE_NOT_SET = -1,
...@@ -453,6 +473,37 @@ public: ...@@ -453,6 +473,37 @@ public:
virtual HRESULT __stdcall Clone( ITuningSpace** p_p_tuning_space )=0; 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 class ITuningSpaceContainer : public IDispatch
{ {
public: public:
...@@ -517,6 +568,8 @@ extern const GUID IID_IDVBCLocator; ...@@ -517,6 +568,8 @@ extern const GUID IID_IDVBCLocator;
extern const GUID IID_IDVBSLocator; extern const GUID IID_IDVBSLocator;
extern const GUID IID_IDVBSTuningSpace; extern const GUID IID_IDVBSTuningSpace;
extern const GUID IID_IDVBTuneRequest; extern const GUID IID_IDVBTuneRequest;
extern const GUID IID_IDVBTuningSpace;
extern const GUID IID_IDVBTuningSpace2;
extern const GUID IID_IGraphBuilder; extern const GUID IID_IGraphBuilder;
extern const GUID IID_IMediaControl; extern const GUID IID_IMediaControl;
extern const GUID IID_IMpeg2Demultiplexer; extern const GUID IID_IMpeg2Demultiplexer;
......
...@@ -435,9 +435,13 @@ int BDAGraph::SubmitDVBSTuneRequest() ...@@ -435,9 +435,13 @@ int BDAGraph::SubmitDVBSTuneRequest()
public: public:
IDVBTuneRequest* p_dvbs_tune_request; IDVBTuneRequest* p_dvbs_tune_request;
IDVBSLocator* p_dvbs_locator; 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() ~localComPtr()
{ {
if( p_dvbs_tuning_space )
p_dvbs_tuning_space->Release();
if( p_dvbs_tune_request ) if( p_dvbs_tune_request )
p_dvbs_tune_request->Release(); p_dvbs_tune_request->Release();
if( p_dvbs_locator ) if( p_dvbs_locator )
...@@ -445,16 +449,21 @@ int BDAGraph::SubmitDVBSTuneRequest() ...@@ -445,16 +449,21 @@ int BDAGraph::SubmitDVBSTuneRequest()
} }
} l; } l;
long l_frequency, l_symbolrate, l_azimuth, l_elevation, l_longitude; long l_frequency, l_symbolrate, l_azimuth, l_elevation, l_longitude;
long l_lnb_lof1, l_lnb_lof2, l_lnb_slof;
char* psz_polarisation; char* psz_polarisation;
Polarisation i_polar; Polarisation i_polar;
VARIANT_BOOL b_west; VARIANT_BOOL b_west;
l_frequency = l_symbolrate = l_azimuth = l_elevation = l_longitude = -1; 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_frequency = var_GetInteger( p_access, "dvb-frequency" );
l_symbolrate = var_GetInteger( p_access, "dvb-srate" ); l_symbolrate = var_GetInteger( p_access, "dvb-srate" );
l_azimuth = var_GetInteger( p_access, "dvb-azimuth" ); l_azimuth = var_GetInteger( p_access, "dvb-azimuth" );
l_elevation = var_GetInteger( p_access, "dvb-elevation" ); l_elevation = var_GetInteger( p_access, "dvb-elevation" );
l_longitude = var_GetInteger( p_access, "dvb-longitude" ); 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" ); psz_polarisation = var_GetString( p_access, "dvb-polarisation" );
b_west = ( l_longitude < 0 ) ? TRUE : FALSE; b_west = ( l_longitude < 0 ) ? TRUE : FALSE;
...@@ -499,6 +508,15 @@ int BDAGraph::SubmitDVBSTuneRequest() ...@@ -499,6 +508,15 @@ int BDAGraph::SubmitDVBSTuneRequest()
return VLC_EGENERIC; 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; hr = S_OK;
if( l_frequency > 0 ) if( l_frequency > 0 )
hr = l.p_dvbs_locator->put_CarrierFrequency( l_frequency ); hr = l.p_dvbs_locator->put_CarrierFrequency( l_frequency );
...@@ -514,6 +532,12 @@ int BDAGraph::SubmitDVBSTuneRequest() ...@@ -514,6 +532,12 @@ int BDAGraph::SubmitDVBSTuneRequest()
hr = l.p_dvbs_locator->put_WestPosition( b_west ); hr = l.p_dvbs_locator->put_WestPosition( b_west );
if( SUCCEEDED( hr ) && i_polar != BDA_POLARISATION_NOT_SET ) if( SUCCEEDED( hr ) && i_polar != BDA_POLARISATION_NOT_SET )
hr = l.p_dvbs_locator->put_SignalPolarisation( i_polar ); 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 ) ) if( FAILED( hr ) )
{ {
msg_Warn( p_access, "SubmitDVBSTuneRequest: "\ 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