⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crossbarpinset.h

📁 完整的基于Conxant平台的USB电视棒的WIN驱动程序。
💻 H
字号:
/*+++ *******************************************************************\ 
* 
*  Copyright and Disclaimer: 
*  
*     --------------------------------------------------------------- 
*     This software is provided "AS IS" without warranty of any kind, 
*     either expressed or implied, including but not limited to the 
*     implied warranties of noninfringement, merchantability and/or 
*     fitness for a particular purpose.
*     --------------------------------------------------------------- 
*   
*     Copyright (c) 2008 Conexant Systems, Inc. 
*     All rights reserved. 
*
\******************************************************************* ---*/ 

#ifndef _CROSSBAR_PIN_SET_H_
#define _CROSSBAR_PIN_SET_H_

#include "crossbarprop.h"

typedef struct _PIN_ENTRY
{
    LIST_ENTRY                  link;
    CROSSBAR_PIN_PROPERTIES     properties;
    PIN_INPUT_TYPE              pin_type;
    DWORD                       input_mux;
    DWORD                       input_mux2;
    DWORD                       gpio_mask;
    DWORD                       gpio_setting;
}PIN_ENTRY, *PPIN_ENTRY;

/////////////////////////////////////////////////////////////////////////////////////////
//Class CrossbarPinSet
//
// This is a child class of CrossbarProperties, defining a generic crossbar pin set
// defined in the registry.
//
// Child classes of CrossbarProperties define a set of input pins.  Output pins are fixed
// at video decoder out and audio decoder out in the current implementation.
//
// The child class must define a set of input pins and override the following virtual 
// functions with the input pin information:
//
//  getNumInputPins() - Returns the number of input pins we are defining
//  getInputPinInfo() - Returns information about a specific input pin
//  setRoute() - sets a crossbar route with the selected input and  output pins
//  isAudioPin() - Returns TRUE if an input pin is an audio pin
//  isVideoPin() - Returns TRUE if an input pin is a video pin
//

class CrossbarPinSet : public CrossbarProperties
{
public:
    CrossbarPinSet(
        Device* p_device,
        PDEVICE_OBJECT pdo);
    virtual ~CrossbarPinSet();

    virtual ULONG getNumInputPins();

    virtual BOOLEAN isAudioPin(ULONG pin_index);
    virtual BOOLEAN isVideoPin(ULONG pin_index);

    virtual NTSTATUS getInputPinInfo(
        ULONG index, 
        PCROSSBAR_PIN_PROPERTIES p_pin_info);

    virtual NTSTATUS setRoute(
        ULONG input_pin_index, 
        ULONG output_pin_index);

protected:
    VOID getPinsFromRegistry(PDEVICE_OBJECT pdo);
    PPIN_ENTRY findPin(DWORD index);

    VOID setPinRoute(PPIN_ENTRY p_pin_entry);

protected:

private:
    Device*                 _p_device;
    LIST_ENTRY              _pin_list_head;
    DWORD                   _num_inpins;
    DWORD                   _force_audio_with_video_pin;
};

#endif

⌨️ 快捷键说明

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