亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? capmain.c

?? 一個視頻采集驅動程序的源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:

            DbgLogInfo(("Testcap: This is a VBIINFOHEADER format pin.\n" ));

            pKSVBIDataFormat = (PKS_DATAFORMAT_VBIINFOHEADER)pKSDataFormatToVerify;

            //
            // Check VideoStandard, we only support NTSC_M
            //
            if (KS_AnalogVideo_NTSC_M
                == pKSVBIDataFormat->VBIInfoHeader.VideoStandard)
            {
                fOK = TRUE;
                break;
            }
            else
            {
                DbgLogError(
                ("Testcap: AdapterVerifyFormat : VideoStandard(%d) != NTSC_M\n",
                 pKSVBIDataFormat->VBIInfoHeader.VideoStandard));
            }
        }

        // -------------------------------------------------------------------
        // Type FORMAT_NABTS for NABTS pin
        // -------------------------------------------------------------------

        else if (IsEqualGUID (&pKSDataFormatToVerify->SubFormat,
                &KSDATAFORMAT_SUBTYPE_NABTS))
        {
            fOK = TRUE;
            break;
        }

        // -------------------------------------------------------------------
        // for CC pin
        // -------------------------------------------------------------------

        else if (IsEqualGUID (&pKSDataFormatToVerify->SubFormat,
                &KSDATAFORMAT_SUBTYPE_CC))
        {
            fOK = TRUE;
            break;
        }

    } // End of loop on all formats for this stream

    return fOK;
}

/*
** AdapterFormatFromRange()
**
**   Produces a DATAFORMAT given a DATARANGE.
**
**   Think of a DATARANGE as a multidimensional space of all of the possible image
**       sizes, cropping, scaling, and framerate possibilities.  Here, the caller
**       is saying "Out of this set of possibilities, could you verify that my
**       request is acceptable?".  The resulting singular output is a DATAFORMAT.
**       Note that each different colorspace (YUV vs RGB8 vs RGB24)
**       must be represented as a separate DATARANGE.
**
**   Generally, the resulting DATAFORMAT will be immediately used to open a stream
**       in that format.
**
** Arguments:
**
**         IN PHW_STREAM_REQUEST_BLOCK pSrb
**
** Returns:
**
**   TRUE if the format is supported
**   FALSE if the format cannot be suppored
**
** Side Effects:  none
*/

BOOL
STREAMAPI
AdapterFormatFromRange(
    IN PHW_STREAM_REQUEST_BLOCK pSrb
    )
{
    PSTREAM_DATA_INTERSECT_INFO IntersectInfo;
    PKSDATARANGE                DataRange;
    BOOL                        OnlyWantsSize;
    BOOL                        MatchFound = FALSE;
    ULONG                       FormatSize;
    ULONG                       StreamNumber;
    ULONG                       j;
    ULONG                       NumberOfFormatArrayEntries;
    PKSDATAFORMAT               *pAvailableFormats;

    IntersectInfo = pSrb->CommandData.IntersectInfo;
    StreamNumber = IntersectInfo->StreamNumber;
    DataRange = IntersectInfo->DataRange;

    //
    // Check that the stream number is valid
    //

    if (StreamNumber >= DRIVER_STREAM_COUNT) {
        pSrb->Status = STATUS_NOT_IMPLEMENTED;
        TRAP;
        return FALSE;
    }

    NumberOfFormatArrayEntries =
            Streams[StreamNumber].hwStreamInfo.NumberOfFormatArrayEntries;

    //
    // Get the pointer to the array of available formats
    //

    pAvailableFormats = Streams[StreamNumber].hwStreamInfo.StreamFormatsArray;

    //
    // Is the caller trying to get the format, or the size of the format?
    //

    OnlyWantsSize = (IntersectInfo->SizeOfDataFormatBuffer == sizeof(ULONG));

    //
    // Walk the formats supported by the stream searching for a match
    // of the three GUIDs which together define a DATARANGE
    //

    for (j = 0; j < NumberOfFormatArrayEntries; j++, pAvailableFormats++) {

        if (!AdapterCompareGUIDsAndFormatSize(
                        DataRange,
                        *pAvailableFormats,
                        TRUE /* CompareFormatSize */)) {
            continue;
        }

        //
        // Now that the three GUIDs match, do a further type-specific check
        //

        // -------------------------------------------------------------------
        // Specifier FORMAT_VideoInfo for VIDEOINFOHEADER
        // -------------------------------------------------------------------

        if (IsEqualGUID (&DataRange->Specifier,
                &KSDATAFORMAT_SPECIFIER_VIDEOINFO)) {

            PKS_DATARANGE_VIDEO DataRangeVideoToVerify =
                    (PKS_DATARANGE_VIDEO) DataRange;
            PKS_DATARANGE_VIDEO DataRangeVideo =
                    (PKS_DATARANGE_VIDEO) *pAvailableFormats;
            PKS_DATAFORMAT_VIDEOINFOHEADER DataFormatVideoInfoHeaderOut;

            //
            // Check that the other fields match
            //
            if ((DataRangeVideoToVerify->bFixedSizeSamples != DataRangeVideo->bFixedSizeSamples) ||
                (DataRangeVideoToVerify->bTemporalCompression != DataRangeVideo->bTemporalCompression) ||
                (DataRangeVideoToVerify->StreamDescriptionFlags != DataRangeVideo->StreamDescriptionFlags) ||
                (DataRangeVideoToVerify->MemoryAllocationFlags != DataRangeVideo->MemoryAllocationFlags) ||
                (RtlCompareMemory (&DataRangeVideoToVerify->ConfigCaps,
                        &DataRangeVideo->ConfigCaps,
                        sizeof (KS_VIDEO_STREAM_CONFIG_CAPS)) !=
                        sizeof (KS_VIDEO_STREAM_CONFIG_CAPS)))
            {
                continue;
            }

            // MATCH FOUND!
            MatchFound = TRUE;
            FormatSize = sizeof (KSDATAFORMAT) +
                KS_SIZE_VIDEOHEADER (&DataRangeVideoToVerify->VideoInfoHeader);

            if (OnlyWantsSize) {
                break;
            }

            // Caller wants the full data format
            if (IntersectInfo->SizeOfDataFormatBuffer < FormatSize) {
                pSrb->Status = STATUS_BUFFER_TOO_SMALL;
                return FALSE;
            }

            // Copy over the KSDATAFORMAT, followed by the
            // actual VideoInfoHeader

            DataFormatVideoInfoHeaderOut = (PKS_DATAFORMAT_VIDEOINFOHEADER) IntersectInfo->DataFormatBuffer;

            // Copy over the KSDATAFORMAT
            RtlCopyMemory(
                &DataFormatVideoInfoHeaderOut->DataFormat,
                &DataRangeVideoToVerify->DataRange,
                sizeof (KSDATARANGE));

            DataFormatVideoInfoHeaderOut->DataFormat.FormatSize = FormatSize;

            // Copy over the callers requested VIDEOINFOHEADER

            RtlCopyMemory(
                &DataFormatVideoInfoHeaderOut->VideoInfoHeader,
                &DataRangeVideoToVerify->VideoInfoHeader,
                KS_SIZE_VIDEOHEADER (&DataRangeVideoToVerify->VideoInfoHeader));

            // Calculate biSizeImage for this request, and put the result in both
            // the biSizeImage field of the bmiHeader AND in the SampleSize field
            // of the DataFormat.
            //
            // Note that for compressed sizes, this calculation will probably not
            // be just width * height * bitdepth

            DataFormatVideoInfoHeaderOut->VideoInfoHeader.bmiHeader.biSizeImage =
                DataFormatVideoInfoHeaderOut->DataFormat.SampleSize =
                KS_DIBSIZE(DataFormatVideoInfoHeaderOut->VideoInfoHeader.bmiHeader);

            //
            // Perform other validation such as cropping and scaling checks
            //

            break;

        } // End of VIDEOINFOHEADER specifier

        // -------------------------------------------------------------------
        // Specifier FORMAT_AnalogVideo for KS_ANALOGVIDEOINFO
        // -------------------------------------------------------------------

        else if (IsEqualGUID (&DataRange->Specifier,
                &KSDATAFORMAT_SPECIFIER_ANALOGVIDEO)) {

            //
            // For analog video, the DataRange and DataFormat
            // are identical, so just copy the whole structure
            //

            PKS_DATARANGE_ANALOGVIDEO DataRangeVideo =
                    (PKS_DATARANGE_ANALOGVIDEO) *pAvailableFormats;

            // MATCH FOUND!
            MatchFound = TRUE;
            FormatSize = sizeof (KS_DATARANGE_ANALOGVIDEO);

            if (OnlyWantsSize) {
                break;
            }

            // Caller wants the full data format
            if (IntersectInfo->SizeOfDataFormatBuffer < FormatSize) {
                pSrb->Status = STATUS_BUFFER_TOO_SMALL;
                return FALSE;
            }

            RtlCopyMemory(
                IntersectInfo->DataFormatBuffer,
                DataRangeVideo,
                sizeof (KS_DATARANGE_ANALOGVIDEO));

            ((PKSDATAFORMAT)IntersectInfo->DataFormatBuffer)->FormatSize = FormatSize;

            break;

        } // End of KS_ANALOGVIDEOINFO specifier

        // -------------------------------------------------------------------
        // Specifier FORMAT_VBI for KS_VIDEO_VBI
        // -------------------------------------------------------------------

        else if (IsEqualGUID (&DataRange->Specifier,
                &KSDATAFORMAT_SPECIFIER_VBI))
        {
            PKS_DATARANGE_VIDEO_VBI pDataRangeVBI =
                (PKS_DATARANGE_VIDEO_VBI)*pAvailableFormats;
            PKS_DATAFORMAT_VBIINFOHEADER InterVBIHdr =
                (PKS_DATAFORMAT_VBIINFOHEADER)IntersectInfo->DataFormatBuffer;

            // MATCH FOUND!
            MatchFound = TRUE;

            FormatSize = sizeof (KS_DATAFORMAT_VBIINFOHEADER);

            // Is the caller trying to get the format, or the size of it?
            if (OnlyWantsSize)
                break;

            // Verify that there is enough room in the supplied buffer
            //   for the whole thing
            if (IntersectInfo->SizeOfDataFormatBuffer < FormatSize)
            {
                if (IntersectInfo->SizeOfDataFormatBuffer > 0) {
                    DbgLogError(
                        ("Testcap::AdapterFormatFromRange: "
                         "Specifier==VBI, Buffer too small=%d vs. %d\n",
                         IntersectInfo->SizeOfDataFormatBuffer,
                         FormatSize));
                }
                pSrb->Status = STATUS_BUFFER_TOO_SMALL;
                return FALSE;
            }

            // If there is room, go ahead...

            RtlCopyMemory(&InterVBIHdr->DataFormat,
                          &pDataRangeVBI->DataRange,
                          sizeof (KSDATARANGE));

            ((PKSDATAFORMAT)IntersectInfo->DataFormatBuffer)->FormatSize = FormatSize;

            RtlCopyMemory(&InterVBIHdr->VBIInfoHeader,
                          &pDataRangeVBI->VBIInfoHeader,
                          sizeof(KS_VBIINFOHEADER));

            break;

        } // End of KS_VIDEO_VBI specifier

        // -------------------------------------------------------------------
        // Type FORMAT_NABTS for NABTS pin
        // -------------------------------------------------------------------

        else if (IsEqualGUID (&DataRange->SubFormat,
                &KSDATAFORMAT_SUBTYPE_NABTS))
        {
            PKSDATARANGE pDataRange = (PKSDATARANGE)*pAvailableFormats;

            // MATCH FOUND!
            MatchFound = TRUE;

            FormatSize = sizeof (KSDATAFORMAT);

            // Is the caller trying to get the format, or the size of it?
            if (OnlyWantsSize)
                break;

            // Verify that there is enough room in the supplied buffer
            //   for the whole thing
            if (IntersectInfo->SizeOfDataFormatBuffer >= FormatSize)
            {
                RtlCopyMemory(IntersectInfo->DataFormatBuffer,
                              pDataRange,
                              FormatSize);

                ((PKSDATAFORMAT)IntersectInfo->DataFormatBuffer)->FormatSize = FormatSize;
            }
            else
            {
                if (IntersectInfo->SizeOfDataFormatBuffer > 0) {
                    DbgLogError(
                        ("Testcap::AdapterFormatFromRange: "
                         "SubFormat==NABTS, Buffer too small=%d vs. %d\n",
                         IntersectInfo->SizeOfDataFormatBuffer,
                         FormatSize));
                }
                pSrb->Status = STATUS_BUFFER_TOO_SMALL;
                return FALSE;
            }

            break;

        } // End of KS_SUBTYPE_NABTS

        // -------------------------------------------------------------------
        // for CC pin
        // -------------------------------------------------------------------

        else if (IsEqualGUID (&DataRange->SubFormat,
                &KSDATAFORMAT_SUBTYPE_CC))
        {
            PKSDATARANGE pDataRange = (PKSDATARANGE)*pAvailableFormats;

            // MATCH FOUND!
            MatchFound = TRUE;

            FormatSize = sizeof (KSDATAFORMAT);

            // Is the caller trying to get the format, or the size of it?
            if (OnlyWantsSize)
                break;

            // Verify that there is enough room in the supplied buffer
            //   for the whole thing
            if (IntersectInfo->SizeOfDataFormatBuffer >= FormatSize)
            {
                RtlCopyMemory(IntersectInfo->DataFormatBuffer,
                              pDataRange,
                              FormatSize);

                ((PKSDATAFORMAT)IntersectInfo->DataFormatBuffer)->FormatSize = FormatSize;
            }
            else
            {
                if (IntersectInfo->SizeOfDataFormatBuffer > 0) {
                    DbgLogError(
                        ("Testcap::AdapterFormatFromRange: "
                         "SubFormat==CC, Buffer too small=%d vs. %d\n",
                         IntersectInfo->SizeOfDataFormatBuffer,
                         FormatSize));
                }
                pSrb->Status = STATUS_BUFFER_TOO_SMALL;
                return FALSE;
            }

            break;

        } // End of CC pin format check

        else {
            pSrb->Status = STATUS_NO_MATCH;
            return FALSE;
        }

    } // End of loop on all formats for this stream

    if (!MatchFound) {
        pSrb->Status = STATUS_NO_MATCH;
        return FALSE;
    }

    if (OnlyWantsSize) {
        *(PULONG) IntersectInfo->DataFormatBuffer = FormatSize;
        FormatSize = sizeof(ULONG);
    }
    pSrb->ActualBytesTransferred = FormatSize;
    return TRUE;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩高清国产一区在线| 欧美美女一区二区三区| 在线这里只有精品| 26uuu久久综合| 亚洲午夜免费视频| youjizz久久| 亚洲精品在线网站| 亚洲国产精品久久久久婷婷884| 国产成人av一区| 欧美一级高清片| 亚洲成精国产精品女| 91性感美女视频| 欧美国产日本视频| 国产资源在线一区| 精品欧美一区二区在线观看| 日日摸夜夜添夜夜添亚洲女人| 99re这里只有精品6| 国产午夜精品久久| 国模少妇一区二区三区| 欧美一级在线视频| 日本色综合中文字幕| 色94色欧美sute亚洲13| 欧美一级一区二区| 亚洲电影一级片| 91美女片黄在线观看| 亚洲私人影院在线观看| 成人美女在线观看| 国产精品欧美经典| 国产99久久久国产精品潘金| 国产日韩在线不卡| 成人aa视频在线观看| 国产精品护士白丝一区av| 成年人网站91| 亚洲乱码国产乱码精品精的特点 | 久久网站热最新地址| 久久99热狠狠色一区二区| 欧美一卡二卡三卡| 成人亚洲一区二区一| 蜜桃精品视频在线| 8x8x8国产精品| 蜜臀国产一区二区三区在线播放| 这里只有精品免费| 久久疯狂做爰流白浆xx| 久久精品视频在线看| 国产精品99久| 亚洲三级在线免费观看| 日本伦理一区二区| 欧美96一区二区免费视频| 精品国一区二区三区| 国产成人免费视频一区| 亚洲国产精品ⅴa在线观看| 色综合久久综合| 午夜精品久久久久影视| 精品国产凹凸成av人网站| 欧美日韩在线精品一区二区三区激情| 亚洲一级二级三级在线免费观看| 欧美日韩精品一区二区天天拍小说 | 日韩在线一区二区| 精品国产91亚洲一区二区三区婷婷| 国产一区二区三区久久久| 国产精品毛片a∨一区二区三区| 色综合激情五月| 天使萌一区二区三区免费观看| 97久久精品人人做人人爽50路| 亚洲免费在线看| 欧美性xxxxxxxx| 久久99国产乱子伦精品免费| 欧美激情在线看| 欧美日韩国产a| 国产精品88888| 亚洲一级二级三级在线免费观看| 精品国产青草久久久久福利| av不卡免费电影| 久久国内精品自在自线400部| 国产精品美女www爽爽爽| 91精品国产综合久久久蜜臀图片| 成人午夜激情在线| 日本欧美一区二区| 日韩美女精品在线| 精品国产91洋老外米糕| 欧美视频完全免费看| 国产jizzjizz一区二区| 亚洲不卡一区二区三区| 国产精品国产三级国产| 2021久久国产精品不只是精品| 欧洲精品在线观看| 国产精品一品二品| 一区二区成人在线观看| 欧美精品一区视频| 欧美日韩高清不卡| 99riav久久精品riav| 国产精品影视在线| 欧美aaaaaa午夜精品| 亚洲成人午夜电影| 亚洲天堂久久久久久久| 国产人成亚洲第一网站在线播放| 欧美人与z0zoxxxx视频| 91伊人久久大香线蕉| 丁香六月综合激情| 国产一区二区三区四区五区美女| 香蕉加勒比综合久久| 亚洲人吸女人奶水| 国产精品美女久久久久久| 2欧美一区二区三区在线观看视频| 欧美日韩免费电影| 欧美在线你懂的| 欧美一区二区三区在线视频| 99精品久久99久久久久| 中文字幕一区二区三| 精品国产乱码久久久久久图片 | 麻豆成人久久精品二区三区红| 亚洲欧洲精品一区二区三区不卡| 亚洲国产成人自拍| 日本一区二区视频在线| 国产亚洲欧美色| 久久久国产一区二区三区四区小说| 日韩一区二区在线看片| 欧美日韩久久久久久| 欧美体内she精视频| 欧美日韩亚洲国产综合| 欧美日韩中文字幕一区| 欧美日本不卡视频| 欧美一二三在线| 2017欧美狠狠色| 国产欧美va欧美不卡在线| 中文幕一区二区三区久久蜜桃| 国产精品电影一区二区三区| 欧美视频中文一区二区三区在线观看| 色综合久久88色综合天天6| 99视频国产精品| 欧美性猛交xxxxxx富婆| 91精品国产综合久久久久久漫画| 欧美成人猛片aaaaaaa| 久久久亚洲精品一区二区三区| 国产欧美1区2区3区| 亚洲天堂中文字幕| 日日摸夜夜添夜夜添亚洲女人| 久久国产福利国产秒拍| 成人一区二区三区中文字幕| 91色乱码一区二区三区| 欧美精品久久久久久久多人混战 | 在线播放/欧美激情| 欧美一级精品在线| 欧美国产日韩a欧美在线观看| 免费在线一区观看| 成人午夜视频在线| 欧美日韩五月天| 伊人一区二区三区| 亚洲欧洲国产专区| 日韩av在线发布| 国产精品123区| 91麻豆成人久久精品二区三区| 777色狠狠一区二区三区| 国产日韩精品一区| 亚洲成人7777| 成人动漫视频在线| 日韩欧美一区电影| 亚洲六月丁香色婷婷综合久久 | 欧美一级理论片| 自拍偷拍欧美精品| 国内外成人在线| 欧美在线观看一区| 国产精品乱码人人做人人爱| 日韩精品一区第一页| av一区二区三区| 欧美不卡一二三| 一区二区三区四区蜜桃| 国模大尺度一区二区三区| 欧美日韩久久一区二区| 国产精品第四页| 精品一区二区三区视频在线观看| 在线亚洲+欧美+日本专区| 久久亚区不卡日本| 视频一区二区三区在线| 一本到不卡精品视频在线观看| 久久一二三国产| 日韩精品一二三四| 欧美色图天堂网| 综合久久国产九一剧情麻豆| 国产综合一区二区| 日韩一级欧美一级| 亚洲成人手机在线| 日本伦理一区二区| 亚洲欧美一区二区视频| 国产成人亚洲综合色影视| 日韩精品中午字幕| 日本女优在线视频一区二区| 91成人在线精品| 自拍av一区二区三区| www.欧美.com| 中文字幕 久热精品 视频在线| 狠狠狠色丁香婷婷综合久久五月| 日韩色在线观看| 日韩和欧美一区二区| 欧美卡1卡2卡| 午夜精品久久久久久久99樱桃| 在线观看视频一区二区| 亚洲综合在线观看视频| 91老司机福利 在线| 一区二区高清免费观看影视大全|