mintopotables.hpp

来自「ReactOS是一些高手根据Windows XP的内核编写出的类XP。内核实现机」· HPP 代码 · 共 538 行 · 第 1/2 页

HPP
538
字号
/*
Copyright (c) 2006-2007 dogbert <dogber1@gmail.com>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
   derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef _TABLES_HPP_
#define _TABLES_HPP_

#include "mintopo.hpp"

#ifndef STATIC_KSDATAFORMAT_SUBTYPE_DOLBY_AC3_SPDIF
#define STATIC_KSDATAFORMAT_SUBTYPE_DOLBY_AC3_SPDIF\
    DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_DOLBY_AC3_SPDIF)
DEFINE_GUIDSTRUCT("00000092-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_DOLBY_AC3_SPDIF);
#define KSDATAFORMAT_SUBTYPE_DOLBY_AC3_SPDIF DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DOLBY_AC3_SPDIF)
#endif


static KSDATARANGE PinDataRangesBridge[] =
{
   {
      sizeof(KSDATARANGE),
      0,
      0,
      0,
      STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
      STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
      STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
   }
};

static PKSDATARANGE PinDataRangePointersBridge[] =
{
    &PinDataRangesBridge[0]
};

static KSDATARANGE WavePinDataRangesAC3Bridge[] =
{
	{
        sizeof(KSDATARANGE),
        0,
        0,
        0,
        STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
        STATICGUIDOF(KSDATAFORMAT_SUBTYPE_AC3_AUDIO),
        STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
    }
};

static PKSDATARANGE WavePinDataRangePointersAC3Bridge[] =
{
    &WavePinDataRangesAC3Bridge[0]
};

static PCPIN_DESCRIPTOR MiniportPins[] =
{
    // WAVEOUT_SOURCE - 0
    {
        0,0,0,                                          // InstanceCount
        NULL,                                           // AutomationTable
        {                                               // KsPinDescriptor
            0,                                          // InterfacesCount
            NULL,                                       // Interfaces
            0,                                          // MediumsCount
            NULL,                                       // Mediums
            SIZEOF_ARRAY(PinDataRangePointersBridge),   // DataRangesCount
            PinDataRangePointersBridge,                 // DataRanges
            KSPIN_DATAFLOW_IN,                          // DataFlow
            KSPIN_COMMUNICATION_NONE,                   // Communication
            &KSCATEGORY_AUDIO,                          // Category
            NULL,                                       // Name
            0                                           // Reserved
        }
    },

    // SPDIF_IN_SOURCE - 1
    {
        0,0,0,                                          // InstanceCount
        NULL,                                           // AutomationTable
        {                                               // KsPinDescriptor
            0,                                          // InterfacesCount
            NULL,                                       // Interfaces
            0,                                          // MediumsCount
            NULL,                                       // Mediums
            SIZEOF_ARRAY(PinDataRangePointersBridge),   // DataRangesCount
            PinDataRangePointersBridge,                 // DataRanges
            KSPIN_DATAFLOW_IN,                          // DataFlow
            KSPIN_COMMUNICATION_NONE,                   // Communication
            &KSNODETYPE_SPDIF_INTERFACE,                // Category
            NULL,                                       // Name
            0                                           // Reserved
        }
    },

    // MIC_SOURCE - 2
	{
		0,0,0,											// InstanceCount
		NULL,											// AutomationTable
		{												// KsPinDescriptor
			0,											// InterfacesCount
			NULL,										// Interfaces
			0,											// MediumsCount
			NULL,										// Mediums
			SIZEOF_ARRAY(PinDataRangePointersBridge),	// DataRangesCount
			PinDataRangePointersBridge,					// DataRanges
			KSPIN_DATAFLOW_IN,							// DataFlow
			KSPIN_COMMUNICATION_NONE,					// Communication
			&KSNODETYPE_MICROPHONE,						// Category
			NULL,										// Name
			0											// Reserved
		}
	},

    // CD_SOURCE - 3
	{
		0,0,0,											// InstanceCount
		NULL,											// AutomationTable
		{												// KsPinDescriptor
			0,											// InterfacesCount
			NULL,										// Interfaces
			0,											// MediumsCount
			NULL,										// Mediums
			SIZEOF_ARRAY(PinDataRangePointersBridge),	// DataRangesCount
			PinDataRangePointersBridge,					// DataRanges
			KSPIN_DATAFLOW_IN,							// DataFlow
			KSPIN_COMMUNICATION_NONE,					// Communication
			&KSNODETYPE_CD_PLAYER,						// Category
			NULL,										// Name
			0											// Reserved
		}
	},

    // LINEIN_SOURCE - 4
	{
		0,0,0,											// InstanceCount
		NULL,											// AutomationTable
		{												// KsPinDescriptor
			0,											// InterfacesCount
			NULL,										// Interfaces
			0,											// MediumsCount
			NULL,										// Mediums
			SIZEOF_ARRAY(PinDataRangePointersBridge),	// DataRangesCount
			PinDataRangePointersBridge,					// DataRanges
			KSPIN_DATAFLOW_IN,							// DataFlow
			KSPIN_COMMUNICATION_NONE,					// Communication
			&KSNODETYPE_LINE_CONNECTOR,					// Category
			NULL,										// Name
			0											// Reserved
		}
	},

    // AUX_SOURCE - 5
	{
		0,0,0,											// InstanceCount
		NULL,											// AutomationTable
		{												// KsPinDescriptor
			0,											// InterfacesCount
			NULL,										// Interfaces
			0,											// MediumsCount
			NULL,										// Mediums
			SIZEOF_ARRAY(PinDataRangePointersBridge),	// DataRangesCount
			PinDataRangePointersBridge,					// DataRanges
			KSPIN_DATAFLOW_IN,							// DataFlow
			KSPIN_COMMUNICATION_NONE,					// Communication
			&KSNODETYPE_ANALOG_CONNECTOR,				// Category
			NULL,										// Name
			0											// Reserved
		}
	},

    // DAC_SOURCE - 6
	{
		0,0,0,											// InstanceCount
		NULL,											// AutomationTable
		{												// KsPinDescriptor
			0,											// InterfacesCount
			NULL,										// Interfaces
			0,											// MediumsCount
			NULL,										// Mediums
			SIZEOF_ARRAY(PinDataRangePointersBridge),	// DataRangesCount
			PinDataRangePointersBridge,					// DataRanges
			KSPIN_DATAFLOW_IN,							// DataFlow
			KSPIN_COMMUNICATION_NONE,					// Communication
			&KSNODETYPE_ANALOG_CONNECTOR,				// Category
			&CMINAME_DAC,								// Name
			0											// Reserved
		}
	},

    // LINEOUT_DEST - 7
    {
        0,0,0,                                          // InstanceCount
        NULL,                                           // AutomationTable
        {                                               // KsPinDescriptor
            0,                                          // InterfacesCount
            NULL,                                       // Interfaces
            0,                                          // MediumsCount
            NULL,                                       // Mediums
            SIZEOF_ARRAY(PinDataRangePointersBridge),   // DataRangesCount
            PinDataRangePointersBridge,                 // DataRanges
            KSPIN_DATAFLOW_OUT,                         // DataFlow
            KSPIN_COMMUNICATION_NONE,                   // Communication
            &KSNODETYPE_SPEAKER,                        // Category
            NULL,                                       // Name
            0                                           // Reserved
        }
    },

    // WAVEIN_DEST - 8
    {
        0,0,0,                                          // InstanceCount
        NULL,                                           // AutomationTable
        {                                               // KsPinDescriptor
            0,                                          // InterfacesCount
            NULL,                                       // Interfaces
            0,                                          // MediumsCount
            NULL,                                       // Mediums
            SIZEOF_ARRAY(PinDataRangePointersBridge),   // DataRangesCount
            PinDataRangePointersBridge,                 // DataRanges
            KSPIN_DATAFLOW_OUT,                         // DataFlow
            KSPIN_COMMUNICATION_NONE,                   // Communication
            &KSCATEGORY_AUDIO,                          // Category
            NULL,                                       // Name
            0                                           // Reserved
        }
    },

    // SPDIF_AC3_SOURCE - 9
    {
        0,0,0,                                          // InstanceCount
        NULL,                                           // AutomationTable
        {                                               // KsPinDescriptor
            0,                                          // InterfacesCount
            NULL,                                       // Interfaces
            0,                                          // MediumsCount
            NULL,                                       // Mediums
            SIZEOF_ARRAY(WavePinDataRangePointersAC3Bridge),   // DataRangesCount
            WavePinDataRangePointersAC3Bridge,                 // DataRanges
            KSPIN_DATAFLOW_IN,                          // DataFlow
            KSPIN_COMMUNICATION_NONE,                   // Communication
            &KSCATEGORY_AUDIO,                          // Category
            NULL,                                       // Name
            0                                           // Reserved
        }
    },

    // SPDIF_AC3_DEST - 10

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?