Advertisement
Guest User

Untitled

a guest
Jun 12th, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.50 KB | None | 0 0
  1. tatic KSDATARANGE_MUSIC PinDataRangesStreamLegacy =
  2. {
  3.     {
  4.         sizeof(KSDATARANGE_MUSIC),
  5.         0,
  6.         0,
  7.         0,
  8.         STATICGUIDOF(KSDATAFORMAT_TYPE_MUSIC),
  9.         STATICGUIDOF(KSDATAFORMAT_SUBTYPE_MIDI),
  10.         STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
  11.     },
  12.     STATICGUIDOF(KSMUSIC_TECHNOLOGY_PORT),
  13.     0,
  14.     0,
  15.     0xFFFF
  16. };
  17.  
  18. static
  19. KSDATARANGE PinDataRangesBridge[] =
  20. {
  21.    {
  22.       sizeof(KSDATARANGE),
  23.       0,
  24.       0,
  25.       0,
  26.       STATICGUIDOF(KSDATAFORMAT_TYPE_MUSIC),
  27.       STATICGUIDOF(KSDATAFORMAT_SUBTYPE_MIDI_BUS),
  28.       STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
  29.    }
  30. };
  31.  
  32.  
  33. static PKSDATARANGE PinDataRangePointersStreamLegacy[] =
  34. {
  35.     PKSDATARANGE(&PinDataRangesStreamLegacy)
  36. };
  37.  
  38. static
  39. PKSDATARANGE PinDataRangePointersBridge[] =
  40. {
  41.     &PinDataRangesBridge[0]
  42. };
  43.  
  44. #define kMaxNumCaptureStreams       1
  45. #define kMaxNumLegacyRenderStreams  1
  46. #define kMaxNumDMusicRenderStreams  1
  47.  
  48.  
  49. /*****************************************************************************
  50.  * MiniportPins
  51.  *****************************************************************************
  52.  * List of pins.
  53.  */
  54. static
  55. PCPIN_DESCRIPTOR MiniportPins[] =
  56. {
  57.     {
  58.         kMaxNumCaptureStreams,kMaxNumCaptureStreams,0,    // InstanceCount
  59.         NULL,                                                       // AutomationTable
  60.         {                                                           // KsPinDescriptor
  61.             0,                                              // InterfacesCount
  62.             NULL,                                           // Interfaces
  63.             0,                                              // MediumsCount
  64.             NULL,                                           // Mediums
  65.             SIZEOF_ARRAY(PinDataRangePointersStreamLegacy), // DataRangesCount
  66.             PinDataRangePointersStreamLegacy,               // DataRanges
  67.             KSPIN_DATAFLOW_IN,                              // DataFlow
  68.             KSPIN_COMMUNICATION_SINK,                       // Communication
  69.             (GUID *) &KSCATEGORY_AUDIO,                     // Category
  70.             NULL,                               // Name
  71.             0                                               // Reserved
  72.         }
  73.     },
  74.     {
  75.         0,0,0,      // InstanceCount
  76.         NULL,                                               // AutomationTable
  77.         {                                                   // KsPinDescriptor
  78.             0,                                                // InterfacesCount
  79.             NULL,                                             // Interfaces
  80.             0,                                                // MediumsCount
  81.             NULL,                                             // Mediums
  82.             SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  83.             PinDataRangePointersBridge,               // DataRanges
  84.             KSPIN_DATAFLOW_IN,                               // DataFlow
  85.             KSPIN_COMMUNICATION_NONE,                         // Communication
  86.             (GUID *) &KSCATEGORY_AUDIO,                       // Category
  87.             NULL,                                    // Name
  88.             0                                                 // Reserved
  89.         }
  90.     },
  91.     {
  92.         kMaxNumCaptureStreams,kMaxNumCaptureStreams,0,    // InstanceCount
  93.         NULL,                                                       // AutomationTable
  94.         {                                                           // KsPinDescriptor
  95.             0,                                              // InterfacesCount
  96.             NULL,                                           // Interfaces
  97.             0,                                              // MediumsCount
  98.             NULL,                                           // Mediums
  99.             SIZEOF_ARRAY(PinDataRangePointersStreamLegacy), // DataRangesCount
  100.             PinDataRangePointersStreamLegacy,               // DataRanges
  101.             KSPIN_DATAFLOW_OUT,                              // DataFlow
  102.             KSPIN_COMMUNICATION_SINK,                       // Communication
  103.             (GUID *) &KSCATEGORY_AUDIO,                     // Category
  104.             NULL,                               // Name
  105.             0                                               // Reserved
  106.         }
  107.     },
  108.     {
  109.         0,0,0,      // InstanceCount
  110.         NULL,                                               // AutomationTable
  111.         {                                                   // KsPinDescriptor
  112.             0,                                                // InterfacesCount
  113.             NULL,                                             // Interfaces
  114.             0,                                                // MediumsCount
  115.             NULL,                                             // Mediums
  116.             SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  117.             PinDataRangePointersBridge,               // DataRanges
  118.             KSPIN_DATAFLOW_OUT,                               // DataFlow
  119.             KSPIN_COMMUNICATION_NONE,                         // Communication
  120.             (GUID *) &KSCATEGORY_AUDIO,                       // Category
  121.             NULL,                                    // Name
  122.             0                                                 // Reserved
  123.         }
  124.     },
  125. };
  126.  
  127. /*****************************************************************************
  128.  * MiniportNodes
  129.  *****************************************************************************
  130.  * List of nodes.
  131.  */
  132. #define CONST_PCNODE_DESCRIPTOR(n)          { 0, NULL, &n, NULL }
  133. #define CONST_PCNODE_DESCRIPTOR_AUTO(n,a)   { 0, &a, &n, NULL }
  134. static
  135. PCNODE_DESCRIPTOR MiniportNodes[] =
  136. {
  137.       CONST_PCNODE_DESCRIPTOR(KSNODETYPE_SYNTHESIZER)
  138. };
  139.  
  140. /*****************************************************************************
  141.  * MiniportConnections
  142.  *****************************************************************************
  143.  * List of connections.
  144.  */
  145.  
  146.  
  147. enum {
  148.       InputPin = 0,
  149.       InputPinBridge,
  150.       OutputPin,
  151.       OutputPinBridge,
  152. };
  153.  
  154. static
  155. PCCONNECTION_DESCRIPTOR MiniportConnections[] =
  156. {
  157.   { PCFILTER_NODE,  InputPin,               eSynthNode,     KSNODEPIN_STANDARD_IN },
  158.   { eSynthNode,     KSNODEPIN_STANDARD_OUT, PCFILTER_NODE,  OutputPinBridge }
  159. };
  160.  
  161. /*****************************************************************************
  162.  * MiniportCategories
  163.  *****************************************************************************
  164.  * List of categories.
  165.  */
  166. static
  167. GUID MiniportCategories[] =
  168. {
  169.     STATICGUIDOF(KSCATEGORY_AUDIO),
  170.     STATICGUIDOF(KSCATEGORY_RENDER),
  171.     STATICGUIDOF(KSCATEGORY_CAPTURE)
  172. };
  173.  
  174. /*****************************************************************************
  175.  * MiniportFilterDescriptor
  176.  *****************************************************************************
  177.  * Complete miniport filter description.
  178.  */
  179. static
  180. PCFILTER_DESCRIPTOR MiniportFilterDescriptor =
  181. {
  182.     0,                                  // Version
  183.     NULL,                               // AutomationTable
  184.     sizeof(PCPIN_DESCRIPTOR),           // PinSize
  185.     SIZEOF_ARRAY(MiniportPins),         // PinCount
  186.     MiniportPins,                       // Pins
  187.     sizeof(PCNODE_DESCRIPTOR),          // NodeSize
  188.     SIZEOF_ARRAY(MiniportNodes),        // NodeCount
  189.     MiniportNodes,                      // Nodes
  190.     SIZEOF_ARRAY(MiniportConnections),  // ConnectionCount
  191.     MiniportConnections,                // Connections
  192.     SIZEOF_ARRAY(MiniportCategories),   // CategoryCount
  193.     MiniportCategories                  // Categories
  194. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement