1 /*****************************************************************************
2 * bdadefs.h : DirectShow BDA headers for vlc
3 *****************************************************************************
4 * Copyright (C) 2007 the VideoLAN team
6 * Author: Ken Self <kenself(at)optusnet(dot)com(dot)au>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
23 class IDigitalCableTuneRequest;
24 class IDigitalCableLocator;
25 class IATSCChannelTuneRequest;
27 class IBDA_DeviceControl;
28 class IBDA_FrequencyFilter;
29 class IBDA_SignalStatistics;
31 class IChannelTuneRequest;
35 class IComponentTypes;
38 class IDVBSTuningSpace;
40 class IDVBTuneRequest;
41 class IDVBTuningSpace;
42 class IDVBTuningSpace2;
43 class IEnumComponents;
44 class IEnumComponentTypes;
45 class IEnumTuningSpaces;
48 class ISampleGrabberCB;
53 class ITuningSpaceContainer;
57 class IGuideDataEvent;
59 class IEnumTuneRequests;
60 class IEnumGuideDataProperties;
61 class IGuideDataProperty;
64 typedef enum BinaryConvolutionCodeRate
66 BDA_BCC_RATE_NOT_SET = -1,
67 BDA_BCC_RATE_NOT_DEFINED=0,
77 } BinaryConvolutionCodeRate;
79 typedef enum ComponentCategory
89 typedef enum ComponentStatus
96 typedef enum DVBSystemType
103 typedef enum FECMethod
105 BDA_FEC_METHOD_NOT_SET = -1,
106 BDA_FEC_METHOD_NOT_DEFINED=0,
112 typedef enum GuardInterval
114 BDA_GUARD_NOT_SET = -1,
115 BDA_GUARD_NOT_DEFINED=0,
123 typedef enum HierarchyAlpha
125 BDA_HALPHA_NOT_SET = -1,
126 BDA_HALPHA_NOT_DEFINED=0,
133 typedef enum ModulationType
135 BDA_MOD_NOT_SET = -1,
136 BDA_MOD_NOT_DEFINED=0,
161 BDA_MOD_ANALOG_AMPLITUDE,
162 BDA_MOD_ANALOG_FREQUENCY,
166 typedef enum Polarisation
168 BDA_POLARISATION_NOT_SET = -1,
169 BDA_POLARISATION_NOT_DEFINED = 0,
170 BDA_POLARISATION_LINEAR_H = 1,
171 BDA_POLARISATION_LINEAR_V = 2,
172 BDA_POLARISATION_CIRCULAR_L = 3,
173 BDA_POLARISATION_CIRCULAR_R = 4,
174 BDA_POLARISATION_MAX = 5
177 typedef enum SpectralInversion
179 BDA_SPECTRAL_INVERSION_NOT_SET = -1,
180 BDA_SPECTRAL_INVERSION_NOT_DEFINED = 0,
181 BDA_SPECTRAL_INVERSION_AUTOMATIC = 1,
182 BDA_SPECTRAL_INVERSION_NORMAL,
183 BDA_SPECTRAL_INVERSION_INVERTED,
184 BDA_SPECTRAL_INVERSION_MAX
187 typedef enum TransmissionMode
189 BDA_XMIT_MODE_NOT_SET = -1,
190 BDA_XMIT_MODE_NOT_DEFINED=0,
191 BDA_XMIT_MODE_2K = 1,
196 typedef struct _BDANODE_DESCRIPTOR
201 } BDANODE_DESCRIPTOR, *PBDANODE_DESCRIPTOR;
203 typedef struct _BDA_TEMPLATE_CONNECTION
206 ULONG FromNodePinType;
209 } BDA_TEMPLATE_CONNECTION, *PBDA_TEMPLATE_CONNECTION;
211 typedef struct _BDA_TEMPLATE_PIN_JOINT
213 ULONG uliTemplateConnection;
214 ULONG ulcInstancesMax;
215 } BDA_TEMPLATE_PIN_JOINT, *PBDA_TEMPLATE_PIN_JOINT;
217 class IComponent : public IDispatch
220 virtual HRESULT __stdcall get_Type( IComponentType** p_p_cpt_type )=0;
221 virtual HRESULT __stdcall put_Type( IComponentType* p_cpt_type )=0;
222 virtual HRESULT __stdcall get_DescLangID( long* p_l_language )=0;
223 virtual HRESULT __stdcall put_DescLangID( long l_language )=0;
224 virtual HRESULT __stdcall get_Status( ComponentStatus* p_status )=0;
225 virtual HRESULT __stdcall put_Status( ComponentStatus status )=0;
226 virtual HRESULT __stdcall get_Description( BSTR* p_bstr_desc )=0;
227 virtual HRESULT __stdcall put_Description( BSTR bstr_desc )=0;
228 virtual HRESULT __stdcall Clone( IComponent** p_p_component )=0;
231 class IComponents : public IDispatch
234 virtual HRESULT __stdcall get_Count( long* pl_count )=0;
235 virtual HRESULT __stdcall get__NewEnum( IEnumVARIANT** p_p_enum )=0;
236 virtual HRESULT __stdcall EnumComponents( IEnumComponents** p_p_enum )=0;
237 virtual HRESULT __stdcall get_Item( VARIANT Index,
238 IComponent** p_p_component )=0;
239 virtual HRESULT __stdcall Add( IComponent* p_component,
240 VARIANT* v_index )=0;
241 virtual HRESULT __stdcall Remove( VARIANT v_index )=0;
242 virtual HRESULT __stdcall Clone( IComponents** p_p_cpts )=0;
245 class IComponentType : public IDispatch
248 virtual HRESULT __stdcall get_Category( ComponentCategory* p_category )=0;
249 virtual HRESULT __stdcall put_Category( ComponentCategory category )=0;
250 virtual HRESULT __stdcall get_MediaMajorType( BSTR* p_bstr_major_type )=0;
251 virtual HRESULT __stdcall put_MediaMajorType( BSTR bstr_major_type )=0;
252 virtual HRESULT __stdcall get__MediaMajorType( GUID* p_guid_major_type )=0;
253 virtual HRESULT __stdcall put__MediaMajorType( REFCLSID guid_major_type )=0;
254 virtual HRESULT __stdcall get_MediaSubType( BSTR* p_bstr_sub_type )=0;
255 virtual HRESULT __stdcall put_MediaSubType( BSTR bstr_sub_type )=0;
256 virtual HRESULT __stdcall get__MediaSubType( GUID* p_guid_sub_type )=0;
257 virtual HRESULT __stdcall put__MediaSubType( REFCLSID guid_sub_type )=0;
258 virtual HRESULT __stdcall get_MediaFormatType( BSTR* p_bstr_format_type )=0;
259 virtual HRESULT __stdcall put_MediaFormatType( BSTR bstr_format_type )=0;
260 virtual HRESULT __stdcall get__MediaFormatType(
261 GUID* p_guid_format_type )=0;
262 virtual HRESULT __stdcall put__MediaFormatType(
263 REFCLSID guid_format_type )=0;
264 virtual HRESULT __stdcall get_MediaType( AM_MEDIA_TYPE* p_media_type )=0;
265 virtual HRESULT __stdcall put_MediaType( AM_MEDIA_TYPE* p_media_type )=0;
266 virtual HRESULT __stdcall Clone( IComponentType** p_p_cpt_type )=0;
269 class IComponentTypes : public IDispatch
272 virtual HRESULT __stdcall get_Count( long* l_count )=0;
273 virtual HRESULT __stdcall get__NewEnum( IEnumVARIANT** p_p_enum )=0;
274 virtual HRESULT __stdcall EnumComponentTypes(
275 IEnumComponentTypes** p_p_enum )=0;
276 virtual HRESULT __stdcall get_Item( VARIANT v_index,
277 IComponentType** p_p_cpt_type )=0;
278 virtual HRESULT __stdcall put_Item( VARIANT v_index,
279 IComponentType* p_cpt_type )=0;
280 virtual HRESULT __stdcall Add( IComponentType* p_cpt_type,
281 VARIANT* v_index )=0;
282 virtual HRESULT __stdcall Remove( VARIANT v_index )=0;
283 virtual HRESULT __stdcall Clone( IComponentTypes** p_p_cpt_types )=0;
286 class IEnumComponents : public IUnknown
289 virtual HRESULT __stdcall Next( ULONG num_elem, IComponent** p_p_elem,
290 ULONG* p_num_elem_fetch )=0;
291 virtual HRESULT __stdcall Skip( ULONG num_elem )=0;
292 virtual HRESULT __stdcall Reset( void )=0;
293 virtual HRESULT __stdcall Clone( IEnumComponents** p_p_enum )=0;
296 class IEnumComponentTypes : public IUnknown
299 virtual HRESULT __stdcall Next( ULONG num_elem, IComponentType** p_p_elem,
300 ULONG* p_num_elem_fetch )=0;
301 virtual HRESULT __stdcall Skip( ULONG num_elem )=0;
302 virtual HRESULT __stdcall Reset( void )=0;
303 virtual HRESULT __stdcall Clone( IEnumComponentTypes** p_p_enum )=0;
306 class IEnumTuningSpaces : public IUnknown
309 virtual HRESULT __stdcall Next( ULONG l_num_elem,
310 ITuningSpace** p_p_tuning_space, ULONG* pl_num_elem_fetched )=0;
311 virtual HRESULT __stdcall Skip( ULONG l_num_elem )=0;
312 virtual HRESULT __stdcall Reset( void )=0;
313 virtual HRESULT __stdcall Clone( IEnumTuningSpaces** p_p_enum )=0;
316 class ITuner : public IUnknown
319 virtual HRESULT __stdcall get_TuningSpace(
320 ITuningSpace** p_p_tuning_space )=0;
321 virtual HRESULT __stdcall put_TuningSpace( ITuningSpace* p_tuning_space )=0;
322 virtual HRESULT __stdcall EnumTuningSpaces(
323 IEnumTuningSpaces** p_p_enum )=0;
324 virtual HRESULT __stdcall get_TuneRequest(
325 ITuneRequest** p_p_tune_request )=0;
326 virtual HRESULT __stdcall put_TuneRequest( ITuneRequest* p_tune_request )=0;
327 virtual HRESULT __stdcall Validate( ITuneRequest* p_tune_request )=0;
328 virtual HRESULT __stdcall get_PreferredComponentTypes(
329 IComponentTypes** p_p_cpt_types )=0;
330 virtual HRESULT __stdcall put_PreferredComponentTypes(
331 IComponentTypes* p_cpt_types )=0;
332 virtual HRESULT __stdcall get_SignalStrength( long* l_sig_strength )=0;
333 virtual HRESULT __stdcall TriggerSignalEvents( long l_interval )=0;
336 class ISampleGrabber : public IUnknown
339 virtual HRESULT __stdcall SetOneShot( BOOL b_one_shot )=0;
340 virtual HRESULT __stdcall SetMediaType(
341 const AM_MEDIA_TYPE* p_media_type )=0;
342 virtual HRESULT __stdcall GetConnectedMediaType(
343 AM_MEDIA_TYPE* p_media_type )=0;
344 virtual HRESULT __stdcall SetBufferSamples( BOOL b_buffer_samples )=0;
345 virtual HRESULT __stdcall GetCurrentBuffer( long* p_buff_size,
347 virtual HRESULT __stdcall GetCurrentSample( IMediaSample** p_p_sample )=0;
348 virtual HRESULT __stdcall SetCallback( ISampleGrabberCB* pf_callback,
349 long l_callback_type )=0;
352 class ISampleGrabberCB : public IUnknown
355 virtual HRESULT __stdcall SampleCB( double d_sample_time,
356 IMediaSample* p_sample )=0;
357 virtual HRESULT __stdcall BufferCB( double d_sample_time, BYTE *p_buffer,
358 long l_bufferLen )=0;
361 class IScanningTuner : public ITuner
364 virtual HRESULT __stdcall SeekUp( void )=0;
365 virtual HRESULT __stdcall SeekDown( void )=0;
366 virtual HRESULT __stdcall ScanDown( long l_pause )=0;
367 virtual HRESULT __stdcall ScanUp( long l_pause )=0;
368 virtual HRESULT __stdcall AutoProgram( void )=0;
371 class ITuneRequest : public IDispatch
374 virtual HRESULT __stdcall get_TuningSpace(
375 ITuningSpace** p_p_tuning_space )=0;
376 virtual HRESULT __stdcall get_Components( IComponents** p_p_components )=0;
377 virtual HRESULT __stdcall Clone( ITuneRequest** p_p_tune_request )=0;
378 virtual HRESULT __stdcall get_Locator( ILocator** p_p_locator )=0;
379 virtual HRESULT __stdcall put_Locator( ILocator* p_locator )=0;
382 class IChannelTuneRequest : public ITuneRequest
385 virtual HRESULT __stdcall get_Channel( long* pl_channel )=0;
386 virtual HRESULT __stdcall put_Channel( long l_channel )=0;
389 class IATSCChannelTuneRequest : public IChannelTuneRequest
392 virtual HRESULT __stdcall get_MinorChannel( long* pl_minor_channel )=0;
393 virtual HRESULT __stdcall put_MinorChannel( long l_minor_channel )=0;
396 class IDigitalCableTuneRequest : public IATSCChannelTuneRequest
399 virtual HRESULT __stdcall get_MajorChannel( long* pl_major_channel )=0;
400 virtual HRESULT __stdcall put_MajorChannel( long l_major_channel )=0;
401 virtual HRESULT __stdcall get_SourceID( long* pl_source_id )=0;
402 virtual HRESULT __stdcall put_SourceID( long l_source_id )=0;
405 class IDVBTuneRequest : public ITuneRequest
408 virtual HRESULT __stdcall get_ONID( long* pl_onid )=0;
409 virtual HRESULT __stdcall put_ONID( long l_onid )=0;
410 virtual HRESULT __stdcall get_TSID( long* pl_tsid )=0;
411 virtual HRESULT __stdcall put_TSID( long l_tsid )=0;
412 virtual HRESULT __stdcall get_SID( long* pl_sid )=0;
413 virtual HRESULT __stdcall put_SID( long l_sid )=0;
416 class ILocator : public IDispatch
419 virtual HRESULT __stdcall get_CarrierFrequency( long* pl_frequency )=0;
420 virtual HRESULT __stdcall put_CarrierFrequency( long l_frequency )=0;
421 virtual HRESULT __stdcall get_InnerFEC( FECMethod* FEC )=0;
422 virtual HRESULT __stdcall put_InnerFEC( FECMethod FEC )=0;
423 virtual HRESULT __stdcall get_InnerFECRate(
424 BinaryConvolutionCodeRate* FEC )=0;
425 virtual HRESULT __stdcall put_InnerFECRate(
426 BinaryConvolutionCodeRate FEC )=0;
427 virtual HRESULT __stdcall get_OuterFEC( FECMethod* FEC )=0;
428 virtual HRESULT __stdcall put_OuterFEC( FECMethod FEC )=0;
429 virtual HRESULT __stdcall get_OuterFECRate(
430 BinaryConvolutionCodeRate* FEC )=0;
431 virtual HRESULT __stdcall put_OuterFECRate(
432 BinaryConvolutionCodeRate FEC )=0;
433 virtual HRESULT __stdcall get_Modulation( ModulationType* p_modulation )=0;
434 virtual HRESULT __stdcall put_Modulation( ModulationType modulation )=0;
435 virtual HRESULT __stdcall get_SymbolRate( long* pl_rate )=0;
436 virtual HRESULT __stdcall put_SymbolRate( long l_rate )=0;
437 virtual HRESULT __stdcall Clone( ILocator** p_p_locator )=0;
440 class IATSCLocator : public ILocator
443 virtual HRESULT __stdcall get_PhysicalChannel( long* pl_phys_channel )=0;
444 virtual HRESULT __stdcall put_PhysicalChannel( long l_phys_channel )=0;
445 virtual HRESULT __stdcall get_TSID( long* pl_tsid )=0;
446 virtual HRESULT __stdcall put_TSID( long l_tsid )=0;
449 class IATSCLocator2 : public IATSCLocator
452 virtual HRESULT __stdcall get_ProgramNumber( long* pl_prog_number )=0;
453 virtual HRESULT __stdcall put_ProgramNumber( long l_prog_number )=0;
456 class IDigitalCableLocator : public IATSCLocator2
461 class IDVBCLocator : public ILocator
466 class IDVBSLocator : public ILocator
469 virtual HRESULT __stdcall get_SignalPolarisation(
470 Polarisation* p_polarisation )=0;
471 virtual HRESULT __stdcall put_SignalPolarisation(
472 Polarisation polarisation )=0;
473 virtual HRESULT __stdcall get_WestPosition( VARIANT_BOOL* pb_west )=0;
474 virtual HRESULT __stdcall put_WestPosition( VARIANT_BOOL b_west )=0;
475 virtual HRESULT __stdcall get_OrbitalPosition( long* pl_longitude )=0;
476 virtual HRESULT __stdcall put_OrbitalPosition( long l_longitude )=0;
477 virtual HRESULT __stdcall get_Azimuth( long* pl_azimuth )=0;
478 virtual HRESULT __stdcall put_Azimuth( long l_azimuth )=0;
479 virtual HRESULT __stdcall get_Elevation( long* pl_elevation )=0;
480 virtual HRESULT __stdcall put_Elevation( long l_elevation )=0;
483 class IDVBTLocator : public ILocator
486 virtual HRESULT __stdcall get_Bandwidth( long* pl_bandwidth )=0;
487 virtual HRESULT __stdcall put_Bandwidth( long l_bandwidth )=0;
488 virtual HRESULT __stdcall get_LPInnerFEC( FECMethod* FEC )=0;
489 virtual HRESULT __stdcall put_LPInnerFEC( FECMethod FEC )=0;
490 virtual HRESULT __stdcall get_LPInnerFECRate(
491 BinaryConvolutionCodeRate* FEC )=0;
492 virtual HRESULT __stdcall put_LPInnerFECRate(
493 BinaryConvolutionCodeRate FEC )=0;
494 virtual HRESULT __stdcall get_HAlpha( HierarchyAlpha* Alpha )=0;
495 virtual HRESULT __stdcall put_HAlpha( HierarchyAlpha Alpha )=0;
496 virtual HRESULT __stdcall get_Guard( GuardInterval* GI )=0;
497 virtual HRESULT __stdcall put_Guard( GuardInterval GI )=0;
498 virtual HRESULT __stdcall get_Mode( TransmissionMode* mode )=0;
499 virtual HRESULT __stdcall put_Mode( TransmissionMode mode )=0;
500 virtual HRESULT __stdcall get_OtherFrequencyInUse(
501 VARIANT_BOOL* OtherFrequencyInUseVal )=0;
502 virtual HRESULT __stdcall put_OtherFrequencyInUse(
503 VARIANT_BOOL OtherFrequencyInUseVal )=0;
506 class ITuningSpace : public IDispatch
509 virtual HRESULT __stdcall get_UniqueName( BSTR* p_bstr_name )=0;
510 virtual HRESULT __stdcall put_UniqueName( BSTR Name )=0;
511 virtual HRESULT __stdcall get_FriendlyName( BSTR* p_bstr_name )=0;
512 virtual HRESULT __stdcall put_FriendlyName( BSTR bstr_name )=0;
513 virtual HRESULT __stdcall get_CLSID( BSTR* bstr_clsid )=0;
514 virtual HRESULT __stdcall get_NetworkType( BSTR* p_bstr_network_guid )=0;
515 virtual HRESULT __stdcall put_NetworkType( BSTR bstr_network_guid )=0;
516 virtual HRESULT __stdcall get__NetworkType( GUID* p_guid_network_guid )=0;
517 virtual HRESULT __stdcall put__NetworkType( REFCLSID clsid_network_guid )=0;
518 virtual HRESULT __stdcall CreateTuneRequest(
519 ITuneRequest** p_p_tune_request )=0;
520 virtual HRESULT __stdcall EnumCategoryGUIDs( IEnumGUID** p_p_enum )=0;
521 virtual HRESULT __stdcall EnumDeviceMonikers( IEnumMoniker** p_p_enum )=0;
522 virtual HRESULT __stdcall get_DefaultPreferredComponentTypes(
523 IComponentTypes** p_p_cpt_types )=0;
524 virtual HRESULT __stdcall put_DefaultPreferredComponentTypes(
525 IComponentTypes* p_cpt_types )=0;
526 virtual HRESULT __stdcall get_FrequencyMapping( BSTR* p_bstr_mapping )=0;
527 virtual HRESULT __stdcall put_FrequencyMapping( BSTR bstr_mapping )=0;
528 virtual HRESULT __stdcall get_DefaultLocator( ILocator** p_p_locator )=0;
529 virtual HRESULT __stdcall put_DefaultLocator( ILocator* p_locator )=0;
530 virtual HRESULT __stdcall Clone( ITuningSpace** p_p_tuning_space )=0;
533 class IDVBTuningSpace : public ITuningSpace
536 virtual HRESULT __stdcall get_SystemType( DVBSystemType* p_sys_type )=0;
537 virtual HRESULT __stdcall put_SystemType( DVBSystemType sys_type )=0;
540 class IDVBTuningSpace2 : public IDVBTuningSpace
543 virtual HRESULT __stdcall get_NetworkID( long* p_l_network_id )=0;
544 virtual HRESULT __stdcall put_NetworkID( long l_network_id )=0;
547 class IDVBSTuningSpace : public IDVBTuningSpace2
550 virtual HRESULT __stdcall get_LowOscillator( long* p_l_low_osc )=0;
551 virtual HRESULT __stdcall put_LowOscillator( long l_low_osc )=0;
552 virtual HRESULT __stdcall get_HighOscillator( long* p_l_high_osc )=0;
553 virtual HRESULT __stdcall put_HighOscillator( long l_high_osc )=0;
554 virtual HRESULT __stdcall get_LNBSwitch( long* p_l_lnb_switch )=0;
555 virtual HRESULT __stdcall put_LNBSwitch( long l_lnb_switch )=0;
556 virtual HRESULT __stdcall get_InputRange( BSTR* p_bstr_input_range )=0;
557 virtual HRESULT __stdcall put_InputRange( BSTR bstr_input_range )=0;
558 virtual HRESULT __stdcall get_SpectralInversion(
559 SpectralInversion* p_spectral_inv )=0;
560 virtual HRESULT __stdcall put_SpectralInversion(
561 SpectralInversion spectral_inv )=0;
564 class ITuningSpaceContainer : public IDispatch
567 virtual HRESULT __stdcall get_Count( long* l_count )=0;
568 virtual HRESULT __stdcall get__NewEnum( IEnumVARIANT** p_p_enum )=0;
569 virtual HRESULT __stdcall get_Item( VARIANT v_index,
570 ITuningSpace** p_p_tuning_space )=0;
571 virtual HRESULT __stdcall put_Item( VARIANT v_index,
572 ITuningSpace* p_tuning_space )=0;
573 virtual HRESULT __stdcall TuningSpacesForCLSID( BSTR bstr_clsid,
574 ITuningSpaces** p_p_tuning_spaces )=0;
575 virtual HRESULT __stdcall _TuningSpacesForCLSID( REFCLSID clsid,
576 ITuningSpaces** p_p_tuning_spaces )=0;
577 virtual HRESULT __stdcall TuningSpacesForName( BSTR bstr_name,
578 ITuningSpaces** p_p_tuning_spaces )=0;
579 virtual HRESULT __stdcall FindID( ITuningSpace* p_tuning_space,
581 virtual HRESULT __stdcall Add( ITuningSpace* p_tuning_space,
582 VARIANT* v_index )=0;
583 virtual HRESULT __stdcall get_EnumTuningSpaces(
584 IEnumTuningSpaces** p_p_enum )=0;
585 virtual HRESULT __stdcall Remove( VARIANT v_index )=0;
586 virtual HRESULT __stdcall get_MaxCount( long* l_maxcount )=0;
587 virtual HRESULT __stdcall put_MaxCount( long l_maxcount )=0;
590 class ITuningSpaces : public IDispatch
593 virtual HRESULT __stdcall get_Count( long* l_count )=0;
594 virtual HRESULT __stdcall get__NewEnum( IEnumVARIANT** p_p_enum )=0;
595 virtual HRESULT __stdcall get_Item( VARIANT v_index,
596 ITuningSpace** p_p_tuning_space )=0;
597 virtual HRESULT __stdcall get_EnumTuningSpaces(
598 IEnumTuningSpaces** p_p_enum )=0;
601 class IBDA_DeviceControl : public IUnknown
604 virtual HRESULT __stdcall StartChanges( void )=0;
605 virtual HRESULT __stdcall CheckChanges( void )=0;
606 virtual HRESULT __stdcall CommitChanges( void )=0;
607 virtual HRESULT __stdcall GetChangeState( ULONG *pState )=0;
610 class IBDA_FrequencyFilter : public IUnknown
613 virtual HRESULT __stdcall put_Autotune( ULONG ulTransponder )=0;
614 virtual HRESULT __stdcall get_Autotune( ULONG *pulTransponder )=0;
615 virtual HRESULT __stdcall put_Frequency( ULONG ulFrequency )=0;
616 virtual HRESULT __stdcall get_Frequency( ULONG *pulFrequency )=0;
617 virtual HRESULT __stdcall put_Polarity( Polarisation Polarity )=0;
618 virtual HRESULT __stdcall get_Polarity( Polarisation *pPolarity )=0;
619 virtual HRESULT __stdcall put_Range( ULONG ulRange )=0;
620 virtual HRESULT __stdcall get_Range( ULONG *pulRange )=0;
621 virtual HRESULT __stdcall put_Bandwidth( ULONG ulBandwidth )=0;
622 virtual HRESULT __stdcall get_Bandwidth( ULONG *pulBandwidth )=0;
623 virtual HRESULT __stdcall put_FrequencyMultiplier( ULONG ulMultiplier )=0;
624 virtual HRESULT __stdcall get_FrequencyMultiplier(
625 ULONG *pulMultiplier )=0;
628 class IBDA_SignalStatistics : public IUnknown
631 virtual HRESULT __stdcall put_SignalStrength( LONG lDbStrength )=0;
632 virtual HRESULT __stdcall get_SignalStrength( LONG *plDbStrength )=0;
633 virtual HRESULT __stdcall put_SignalQuality( LONG lPercentQuality )=0;
634 virtual HRESULT __stdcall get_SignalQuality( LONG *plPercentQuality )=0;
635 virtual HRESULT __stdcall put_SignalPresent( BOOLEAN fPresent )=0;
636 virtual HRESULT __stdcall get_SignalPresent( BOOLEAN *pfPresent )=0;
637 virtual HRESULT __stdcall put_SignalLocked( BOOLEAN fLocked )=0;
638 virtual HRESULT __stdcall get_SignalLocked( BOOLEAN *pfLocked )=0;
639 virtual HRESULT __stdcall put_SampleTime( LONG lmsSampleTime )=0;
640 virtual HRESULT __stdcall get_SampleTime( LONG *plmsSampleTime )=0;
643 class IBDA_Topology : public IUnknown
646 virtual HRESULT __stdcall GetNodeTypes( ULONG *pulcNodeTypes,
647 ULONG ulcNodeTypesMax, ULONG rgulNodeTypes[] )=0;
648 virtual HRESULT __stdcall GetNodeDescriptors( ULONG *ulcNodeDescriptors,
649 ULONG ulcNodeDescriptorsMax,
650 BDANODE_DESCRIPTOR rgNodeDescriptors[] )=0;
651 virtual HRESULT __stdcall GetNodeInterfaces( ULONG ulNodeType,
652 ULONG *pulcInterfaces, ULONG ulcInterfacesMax,
653 GUID rgguidInterfaces[] )=0;
654 virtual HRESULT __stdcall GetPinTypes( ULONG *pulcPinTypes,
655 ULONG ulcPinTypesMax, ULONG rgulPinTypes[] )=0;
656 virtual HRESULT __stdcall GetTemplateConnections( ULONG *pulcConnections,
657 ULONG ulcConnectionsMax, BDA_TEMPLATE_CONNECTION rgConnections[] )=0;
658 virtual HRESULT __stdcall CreatePin( ULONG ulPinType, ULONG *pulPinId )=0;
659 virtual HRESULT __stdcall DeletePin( ULONG ulPinId )=0;
660 virtual HRESULT __stdcall SetMediaType( ULONG ulPinId,
661 AM_MEDIA_TYPE *pMediaType )=0;
662 virtual HRESULT __stdcall SetMedium( ULONG ulPinId,
663 REGPINMEDIUM *pMedium )=0;
664 virtual HRESULT __stdcall CreateTopology( ULONG ulInputPinId,
665 ULONG ulOutputPinId )=0;
666 virtual HRESULT __stdcall GetControlNode( ULONG ulInputPinId,
667 ULONG ulOutputPinId, ULONG ulNodeType, IUnknown **ppControlNode )=0;
670 typedef struct _MPEG_HEADER_BITS_MIDL
673 } MPEG_HEADER_BITS_MIDL;
675 typedef struct _MPEG_HEADER_VERSION_BITS_MIDL
678 } MPEG_HEADER_VERSION_BITS_MIDL;
684 typedef struct _SECTION
689 MPEG_HEADER_BITS_MIDL S;
692 BYTE SectionData[ 1 ];
693 } SECTION, *PSECTION;
695 typedef struct _LONG_SECTION
700 MPEG_HEADER_BITS_MIDL S;
703 WORD TableIdExtension;
706 MPEG_HEADER_VERSION_BITS_MIDL S;
710 BYTE LastSectionNumber;
711 BYTE RemainingData[ 1 ];
714 typedef struct _MPEG_BCS_DEMUX
719 typedef struct _MPEG_WINSOC
726 MPEG_CONTEXT_BCS_DEMUX = 0,
727 MPEG_CONTEXT_WINSOCK = MPEG_CONTEXT_BCS_DEMUX + 1
730 typedef struct _MPEG_RQST_PACKET
734 } MPEG_RQST_PACKET, *PMPEG_RQST_PACKET;
736 typedef struct _MPEG_PACKET_LIST
739 PMPEG_RQST_PACKET PacketList[ 1 ];
740 } MPEG_PACKET_LIST, *PMPEG_PACKET_LIST;
742 typedef struct _DSMCC_FILTER_OPTIONS
744 BOOL fSpecifyProtocol;
748 BOOL fSpecifyMessageId;
750 BOOL fSpecifyTransactionId;
751 BOOL fUseTrxIdMessageIdMask;
753 BOOL fSpecifyModuleVersion;
755 BOOL fSpecifyBlockNumber;
758 WORD NumberOfBlocksInModule;
759 } DSMCC_FILTER_OPTIONS;
761 typedef struct _ATSC_FILTER_OPTIONS
765 } ATSC_FILTER_OPTIONS;
767 typedef struct _MPEG_STREAM_BUFFER
770 DWORD dwDataBufferSize;
771 DWORD dwSizeOfDataRead;
773 } MPEG_STREAM_BUFFER, *PMPEG_STREAM_BUFFER;
775 typedef struct _MPEG_CONTEXT
777 MPEG_CONTEXT_TYPE Type;
780 MPEG_BCS_DEMUX Demux;
781 MPEG_WINSOCK Winsock;
783 } MPEG_CONTEXT, *PMPEG_CONTEXT;
787 MPEG_RQST_UNKNOWN = 0,
788 MPEG_RQST_GET_SECTION = MPEG_RQST_UNKNOWN + 1,
789 MPEG_RQST_GET_SECTION_ASYNC = MPEG_RQST_GET_SECTION + 1,
790 MPEG_RQST_GET_TABLE = MPEG_RQST_GET_SECTION_ASYNC + 1,
791 MPEG_RQST_GET_TABLE_ASYNC = MPEG_RQST_GET_TABLE + 1,
792 MPEG_RQST_GET_SECTIONS_STREAM = MPEG_RQST_GET_TABLE_ASYNC + 1,
793 MPEG_RQST_GET_PES_STREAM = MPEG_RQST_GET_SECTIONS_STREAM + 1,
794 MPEG_RQST_GET_TS_STREAM = MPEG_RQST_GET_PES_STREAM + 1,
795 MPEG_RQST_START_MPE_STREAM = MPEG_RQST_GET_TS_STREAM + 1
798 typedef struct _MPEG2_FILTER
802 BOOL fUseRawFilteringBits;
805 BOOL fSpecifyTableIdExtension;
806 WORD TableIdExtension;
807 BOOL fSpecifyVersion;
809 BOOL fSpecifySectionNumber;
811 BOOL fSpecifyCurrentNext;
813 BOOL fSpecifyDsmccOptions;
814 DSMCC_FILTER_OPTIONS Dsmcc;
815 BOOL fSpecifyAtscOptions;
816 ATSC_FILTER_OPTIONS Atsc;
817 } MPEG2_FILTER, *PMPEG2_FILTER;
819 typedef struct _MPEG_HEADER_BITS
821 WORD SectionLength : 12;
823 WORD PrivateIndicator : 1;
824 WORD SectionSyntaxIndicator : 1;
825 } MPEG_HEADER_BITS, *PMPEG_HEADER_BITS;
827 typedef struct _MPEG_HEADER_VERSION_BITS
829 BYTE CurrentNextIndicator : 1;
830 BYTE VersionNumber : 5;
832 } MPEG_HEADER_VERSION_BITS, *PMPEG_HEADER_VERSION_BITS;
834 class IMpeg2Data : public IUnknown
837 virtual HRESULT __stdcall GetSection( PID pid, TID tid,
838 PMPEG2_FILTER pFilter, DWORD dwTimeout,
839 ISectionList **ppSectionList )=0;
840 virtual HRESULT __stdcall GetTable( PID pid, TID tid, PMPEG2_FILTER pFilter,
841 DWORD dwTimeout, ISectionList **ppSectionList )=0;
842 virtual HRESULT __stdcall GetStreamOfSections( PID pid, TID tid,
843 PMPEG2_FILTER pFilter, HANDLE hDataReadyEvent,
844 IMpeg2Stream **ppMpegStream )=0;
847 class IGuideData : public IUnknown
850 virtual HRESULT __stdcall GetServices(
851 IEnumTuneRequests **ppEnumTuneRequestslass )=0;
852 virtual HRESULT __stdcall GetServiceProperties(
853 ITuneRequest *pTuneRequest,
854 IEnumGuideDataProperties **ppEnumProperties )=0;
855 virtual HRESULT __stdcall GetGuideProgramIDs(
856 IEnumVARIANT **pEnumPrograms )=0;
857 virtual HRESULT __stdcall GetProgramProperties(
858 VARIANT varProgramDescriptionID,
859 IEnumGuideDataProperties **ppEnumProperties )=0;
860 virtual HRESULT __stdcall GetScheduleEntryIDs(
861 IEnumVARIANT **pEnumScheduleEntries )=0;
862 virtual HRESULT __stdcall GetScheduleEntryProperties(
863 VARIANT varScheduleEntryDescriptionID,
864 IEnumGuideDataProperties **ppEnumProperties )=0;
867 class IGuideDataEvent : public IUnknown
870 virtual HRESULT __stdcall GuideDataAcquired( void )=0;
871 virtual HRESULT __stdcall ProgramChanged(
872 VARIANT varProgramDescriptionID )=0;
873 virtual HRESULT __stdcall ServiceChanged(
874 VARIANT varServiceDescriptionID )=0;
875 virtual HRESULT __stdcall ScheduleEntryChanged(
876 VARIANT varScheduleEntryDescriptionID )=0;
877 virtual HRESULT __stdcall ProgramDeleted(
878 VARIANT varProgramDescriptionID )=0;
879 virtual HRESULT __stdcall ServiceDeleted(
880 VARIANT varServiceDescriptionID )=0;
881 virtual HRESULT __stdcall ScheduleDeleted(
882 VARIANT varScheduleEntryDescriptionID )=0;
885 class IGuideDataProperty : public IUnknown
888 virtual HRESULT __stdcall get_Name( BSTR *pbstrName )=0;
889 virtual HRESULT __stdcall get_Language( long *idLang )=0;
890 virtual HRESULT __stdcall get_Value( VARIANT *pvar )=0;
893 class IMpeg2Stream : public IUnknown
896 virtual HRESULT __stdcall Initialize( MPEG_REQUEST_TYPE requestType,
897 IMpeg2Data *pMpeg2Data, PMPEG_CONTEXT pContext, PID pid, TID tid,
898 PMPEG2_FILTER pFilter, HANDLE hDataReadyEvent )=0;
899 virtual HRESULT __stdcall SupplyDataBuffer(
900 PMPEG_STREAM_BUFFER pStreamBuffer )=0;
903 class ISectionList : public IUnknown
906 virtual HRESULT __stdcall Initialize( MPEG_REQUEST_TYPE requestType,
907 IMpeg2Data *pMpeg2Data, PMPEG_CONTEXT pContext, PID pid, TID tid,
908 PMPEG2_FILTER pFilter, DWORD timeout, HANDLE hDoneEvent )=0;
909 virtual HRESULT __stdcall InitializeWithRawSections(
910 PMPEG_PACKET_LIST pmplSections )=0;
911 virtual HRESULT __stdcall CancelPendingRequest( void )=0;
912 virtual HRESULT __stdcall GetNumberOfSections( WORD *pCount )=0;
913 virtual HRESULT __stdcall GetSectionData( WORD sectionNumber,
914 DWORD *pdwRawPacketLength, PSECTION *ppSection )=0;
915 virtual HRESULT __stdcall GetProgramIdentifier( PID *pPid )=0;
916 virtual HRESULT __stdcall GetTableIdentifier( TID *pTableId )=0;
919 class IEnumGuideDataProperties : public IUnknown
922 virtual HRESULT __stdcall Next( unsigned long celt,
923 IGuideDataProperty **ppprop, unsigned long *pcelt )=0;
924 virtual HRESULT __stdcall Skip( unsigned long celt )=0;
925 virtual HRESULT __stdcall Reset( void )=0;
926 virtual HRESULT __stdcall Clone( IEnumGuideDataProperties **ppenum )=0;
929 class IEnumTuneRequests : public IUnknown
932 virtual HRESULT __stdcall Next( unsigned long celt, ITuneRequest **ppprop,
933 unsigned long *pcelt )=0;
934 virtual HRESULT __stdcall Skip( unsigned long celt )=0;
935 virtual HRESULT __stdcall Reset( void )=0;
936 virtual HRESULT __stdcall Clone( IEnumTuneRequests **ppenum )=0;
940 /* Following GUIDs are for the new windows 7 interfaces */
941 /* windows 7 universal provider applies to all networks */
942 const CLSID CLSID_NetworkProvider =
943 {0xB2F3A67C,0x29DA,0x4C78,{0x88,0x31,0x09,0x1E,0xD5,0x09,0xA4,0x75}};
945 /* Win 7 - Digital Cable - North America Clear QAM */
946 const CLSID CLSID_DigitalCableTuningSpace =
947 {0xD9BB4CEE,0xB87A,0x47F1,{0xAC,0xF1,0xB0,0x8D,0x9C,0x78,0x13,0xFC}};
948 const CLSID CLSID_DigitalCableLocator =
949 {0x03C06416,0xD127,0x407A,{0xAB,0x4C,0xFD,0xD2,0x79,0xAB,0xBE,0x5D}};
950 const CLSID CLSID_DigitalCableNetworkType =
951 {0x143827AB,0xF77B,0x498d,{0x81,0xCA,0x5A,0x00,0x7A,0xEC,0x28,0xBF}};
952 const IID IID_IDigitalCableTuneRequest =
953 {0xBAD7753B,0x6B37,0x4810,{0xAE,0x57,0x3C,0xE0,0xC4,0xA9,0xE6,0xCB}};
954 const IID IID_IDigitalCableLocator =
955 {0x48F66A11,0x171A,0x419A,{0x95,0x25,0xBE,0xEE,0xCD,0x51,0x58,0x4C}};
957 extern const CLSID CLSID_ATSCLocator;
958 extern const CLSID CLSID_ATSCNetworkProvider;
959 extern const CLSID CLSID_ATSCTuningSpace;
960 extern const CLSID CLSID_DVBCLocator;
961 extern const CLSID CLSID_DVBCNetworkProvider;
962 extern const CLSID CLSID_DVBSLocator;
963 extern const CLSID CLSID_DVBSNetworkProvider;
964 extern const CLSID CLSID_DVBSTuningSpace;
965 extern const CLSID CLSID_DVBTuningSpace;
966 extern const CLSID CLSID_DVBTLocator;
967 extern const CLSID CLSID_DVBTNetworkProvider;
968 extern const CLSID CLSID_FilterGraph;
969 extern const CLSID CLSID_InfTee;
970 extern const CLSID CLSID_MPEG2Demultiplexer;
971 extern const CLSID CLSID_NullRenderer;
972 extern const CLSID CLSID_SampleGrabber;
973 extern const CLSID CLSID_SystemDeviceEnum;
974 extern const CLSID CLSID_SystemTuningSpaces;
976 extern const IID IID_IATSCChannelTuneRequest;
977 extern const IID IID_IATSCLocator;
978 extern const IID IID_IBaseFilter;
979 extern const IID IID_IBDA_DeviceControl;
980 extern const IID IID_IBDA_FrequencyFilter;
981 extern const IID IID_IBDA_SignalStatistics;
982 /* Following symbol does not exist in library
983 extern const IID IID_IBDA_Topology; */
984 const IID IID_IBDA_Topology =
985 {0x79B56888,0x7FEA,0x4690,{0xB4,0x5D,0x38,0xFD,0x3C,0x78,0x49,0xBE}};
986 extern const IID IID_ICreateDevEnum;
987 extern const IID IID_IDVBTLocator;
988 extern const IID IID_IDVBCLocator;
989 extern const IID IID_IDVBSLocator;
990 extern const IID IID_IDVBSTuningSpace;
991 extern const IID IID_IDVBTuneRequest;
992 extern const IID IID_IDVBTuningSpace;
993 extern const IID IID_IDVBTuningSpace2;
994 extern const IID IID_IGraphBuilder;
995 extern const IID IID_IMediaControl;
996 extern const IID IID_IMpeg2Demultiplexer;
997 extern const IID IID_ISampleGrabber;
998 extern const IID IID_IScanningTuner;
999 extern const IID IID_ITuner;
1000 extern const IID IID_ITuningSpace;
1001 extern const IID IID_ITuningSpaceContainer;
1002 /* Following symbol does not exist in library
1003 extern const IID IID_IMpeg2Data; */
1004 const IID IID_IMpeg2Data =
1005 {0x9B396D40,0xF380,0x4e3c,{0xA5,0x14,0x1A,0x82,0xBF,0x6E,0xBF,0xE6}};
1006 extern const IID IID_IGuideData;
1007 extern const IID IID_ISectionList;
1008 extern const IID IID_IEnumTuneRequests;
1009 extern const IID IID_IEnumGuideDataProperties;
1010 extern const IID IID_IGuideDataProperty;
1011 extern const IID IID_IMpeg2Stream;
1012 extern const IID IID_IGuideDataEvent;
1014 extern const GUID MEDIATYPE_MPEG2_SECTIONS;
1015 extern const GUID MEDIASUBTYPE_None;
1016 extern const GUID FORMAT_None;
1018 const GUID KSCATEGORY_BDA_TRANSPORT_INFORMATION =
1019 {0xa2e3074f,0x6c3d,0x11d3,{0xb6,0x53,0x00,0xc0,0x4f,0x79,0x49,0x8e}};
1020 const GUID KSCATEGORY_BDA_RECEIVER_COMPONENT =
1021 {0xFD0A5AF4,0xB41D,0x11d2,{0x9c,0x95,0x00,0xc0,0x4f,0x79,0x71,0xe0}};
1022 const GUID KSCATEGORY_BDA_NETWORK_TUNER =
1023 {0x71985f48,0x1ca1,0x11d3,{0x9c,0xc8,0x00,0xc0,0x4f,0x79,0x71,0xe0}};
1024 const GUID KSDATAFORMAT_SUBTYPE_BDA_MPEG2_TRANSPORT =
1025 {0xF4AEB342,0x0329,0x4fdd,{0xA8,0xFD,0x4A,0xFF,0x49,0x26,0xC9,0x78}};