//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// The use and distribution terms for this software are covered by the
// Microsoft Limited Public License (Ms-LPL)
// which can be found in the file MS-LPL.txt at the root of this distribution.
// By using this software in any fashion, you are agreeing to be bound by
// the terms of this license.
//
// The software is licensed “as-is.”
//
// You must not remove this notice, or any other, from this software.
//
//
//
// Demux code for Windows CE
//
//-------------------------------------------------------------------------
//======================================================================
// Demux code for Windows CE
//======================================================================
/*++
Module Name:
bdademux.h
Abstract:
This module contains the class declarations for the BDA-specific
interface implementation object, in the demux
Revision History:
02-Sept-1999 created
--*/
#ifndef __mp2demux_bdademux_h
#define __mp2demux_bdademux_h
// forward declarations
class CMPEG2Demultiplexer ;
class CBDAMPEG2Demux :
public IBDA_DeviceControl,
public IBDA_SignalProperties,
public IBDA_Topology
{
// pin 0 is always the input pin
enum {
INPUT_PIN_ID = 0,
OUTPUT_PIN_FIRST_ID = INPUT_PIN_ID + 1
} ;
// we have just 1 node type
enum {
NODE_TYPE_PID_MAPPER,
NODE_TYPE_COUNT // the count should always be last
} ;
CMPEG2Demultiplexer * m_pMPEG2Demux ;
GUID m_guidNetworkType ;
ULONG m_ulSignalSource ;
GUID m_guidTuningSpace ;
ULONG m_NextPinID ;
ULONG m_ulRegistrationContext ; // get this when we register with the NP
IBDA_NetworkProvider * m_pINetworkProvider ;
HRESULT
DeleteInputPinLocked_ (
) ;
public :
CBDAMPEG2Demux (
IN CMPEG2Demultiplexer * punk // controlling unknown, always the filter
) ;
~CBDAMPEG2Demux (
) ;
// IUnknown
STDMETHODIMP
QueryInterface (
IN REFIID riid,
OUT void ** ppv
) ;
STDMETHODIMP_(ULONG)
AddRef (
) ;
STDMETHODIMP_(ULONG)
Release (
) ;
// -------------------------------------------------------------------
// all COM interface stubs are implemented in stubs.cpp
// IBDA_DeviceControl
STDMETHODIMP
StartChanges (
void
) ;
STDMETHODIMP
CheckChanges (
void
) ;
STDMETHODIMP
CommitChanges (
void
) ;
STDMETHODIMP
GetChangeState (
IN OUT ULONG * pState
) ;
// IBDA_SignalProperties
STDMETHODIMP
PutNetworkType (
IN REFGUID guidNetworkType
) ;
STDMETHODIMP
GetNetworkType (
IN OUT GUID * pguidNetworkType
) ;
STDMETHODIMP
PutSignalSource (
IN ULONG ulSignalSource
) ;
STDMETHODIMP
GetSignalSource (
IN OUT ULONG * pulSignalSource
) ;
STDMETHODIMP
PutTuningSpace (
IN REFGUID guidTuningSpace
) ;
STDMETHODIMP
GetTuningSpace (
IN OUT GUID * pguidTuingSpace
) ;
// IBDA_Topology
STDMETHODIMP
GetNodeTypes (
IN OUT ULONG * pulcNodeTypes,
IN ULONG ulcNodeTypesMax,
IN OUT ULONG pulNodeTypes []
) ;
STDMETHODIMP
GetNodeDescriptors (
IN OUT ULONG * pulcNodeDescriptors,
IN ULONG ulcNodeDescriptorsMax,
IN OUT BDANODE_DESCRIPTOR pNodeDescriptors []
) ;
STDMETHODIMP
GetNodeInterfaces (
IN ULONG ulNodeType,
IN OUT ULONG * pulcInterfaces,
IN ULONG ulcInterfacesMax,
IN OUT GUID pguidInterfaces []
) ;
STDMETHODIMP
GetPinTypes (
IN OUT ULONG * pulcPinTypes,
IN ULONG ulcPinTypesMax,
IN OUT ULONG pulPinTypes []
) ;
STDMETHODIMP
GetTemplateConnections (
IN OUT ULONG * pulcConnections,
IN ULONG ulcConnectionsMax,
IN OUT BDA_TEMPLATE_CONNECTION pConnections []
) ;
STDMETHODIMP
CreatePin (
IN ULONG ulPinType,
IN OUT ULONG * pulPinId
) ;
STDMETHODIMP
DeletePin (
IN ULONG ulPinId
) ;
STDMETHODIMP
SetMediaType (
IN ULONG ulPinId,
IN AM_MEDIA_TYPE * pMediaType
) ;
STDMETHODIMP
SetMedium (
IN ULONG ulPinId,
IN REGPINMEDIUM * pMedium
) ;
STDMETHODIMP
CreateTopology (
IN ULONG ulInputPinId,
IN ULONG ulOutputPinId
) ;
STDMETHODIMP
GetControlNode (
IN ULONG ulInputPinId,
IN ULONG ulOutputPinId,
IN ULONG ulNodeType,
IN OUT IUnknown ** ppControlNode
) ;
// -------------------------------------------------------------------
void
RegisterWithNetworkProvider (
) ;
void
UnregisterWithNetworkProvider (
) ;
BOOL
IsBDA (
)
{
return (m_pINetworkProvider ? TRUE : FALSE) ;
}
} ;
#endif // __mp2demux_bdademux_h