-
Notifications
You must be signed in to change notification settings - Fork 25
/
crossbar.h
85 lines (68 loc) · 2.64 KB
/
crossbar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//------------------------------------------------------------------------------
// File: Crossbar.h
//
// Desc: DirectShow sample code - definition of class for controlling
// video crossbars.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __Crossbar_h__
#define __Crossbar_h__
//------------------------------------------------------------------------------
// Name: class CClass
// Desc: This class contains routing information for the capture data
//------------------------------------------------------------------------------
class CRouting {
public:
class CRouting *pLeftRouting;
class CRouting *pRightRouting;
LONG VideoInputIndex;
LONG VideoOutputIndex;
LONG AudioInputIndex;
LONG AudioOutputIndex;
IAMCrossbar *pXbar;
LONG InputPhysicalType;
LONG OutputPhysicalType;
LONG Depth;
CRouting () {};
~CRouting () {};
};
typedef CGenericList<CRouting> CRoutingList;
//------------------------------------------------------------------------------
// Name: class CCrossbar
// Desc: The actual helper class for Crossbars
//------------------------------------------------------------------------------
class CCrossbar
{
private:
IPin *m_pStartingPin;
CRouting m_RoutingRoot;
CRoutingList *m_RoutingList;
int m_CurrentRoutingIndex;
HRESULT BuildRoutingList (
IPin *pStartingInputPin,
CRouting *pCRouting,
int Depth);
HRESULT SaveRouting (CRouting *pRoutingNew);
HRESULT DestroyRoutingList();
BOOL StringFromPinType (TCHAR *pc, int nSize, long lType);
HRESULT GetCrossbarIPinAtIndex(
IAMCrossbar *pXbar,
LONG PinIndex,
BOOL IsInputPin,
IPin ** ppPin);
HRESULT GetCrossbarIndexFromIPin (
IAMCrossbar * pXbar,
LONG * PinIndex,
BOOL IsInputPin,
IPin * pPin);
public:
CCrossbar (IPin *pPin, HRESULT *phr);
~CCrossbar();
HRESULT GetInputCount (LONG *pCount);
HRESULT GetInputType (LONG Index, LONG * PhysicalType);
HRESULT GetInputName (LONG Index, TCHAR * pName, LONG NameSize);
HRESULT SetInputIndex (LONG Index);
HRESULT GetInputIndex (LONG *Index);
};
#endif // __Crossbar_h__