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

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

?? main.pas

?? DSPack is a set of Components and class to write Multimedia Applications using MS Direct Show and Di
?? PAS
字號:
unit main;

interface
uses BaseClass, ActiveX, DirectShow9, Windows, DSUTil, PropEdit;

const
  CLSID_NullInPlace        : TGUID = '{52b63860-dc93-11ce-a099-00aa00479a58}';
  IID_INullIPP             : TGUID = '{43D849C0-2FE8-11cf-BCB1-444553540000}';

type

  INullIPP = interface(IunKnown)
  ['{0952C77F-2EFF-427B-ACAD-F295ADE6F1E7}']
    function put_MediaType(mt: PAM_Media_Type): HRESULT; stdcall;      // the media type selected
    function get_MediaType(out mt: TAM_Media_Type): HRESULT; stdcall;  // the media type selected
    function get_IPin(out Pin: IPin): HRESULT; stdcall;                // the source pin
    function get_State(out State: TFilter_State): HRESULT; stdcall;    // the filter state
  end;

const

  SudPinTypes : TRegPinTypes =
    (clsMajorType: @MEDIATYPE_NULL;
     clsMinorType: @MEDIASUBTYPE_NULL);

  SudPins : array[0..1] of TRegFilterPins =
    ((strName: 'Input'; bRendered: FALSE; bOutput: FALSE; bZero: FALSE; bMany: FALSE; oFilter: nil; strConnectsToPin: 'Output'; nMediaTypes: 1; lpMediaType: @SudPinTypes),
     (strName: 'Output'; bRendered: FALSE; bOutput: TRUE; bZero: FALSE; bMany: FALSE; oFilter: nil; strConnectsToPin: 'Input'; nMediaTypes: 1; lpMediaType: @SudPinTypes));

type

  TNullInPlaceInputPin = class(TBCTransInPlaceInputPin)
  public
    constructor Create(ObjectName: string; TransInPlaceFilter: TBCTransInPlaceFilter;
      out hr: HRESULT; Name: WideString);
    function CheckMediaType(mt: PAM_Media_Type): HRESULT; override;
  end;

  TNullInPlaceOutputPin = class(TBCTransInPlaceOutputPin)
  public
    constructor Create(ObjectName: string; TransInPlaceFilter: TBCTransInPlaceFilter;
      out hr: HRESULT; Name: WideString);
    function CheckMediaType(mt: PAM_Media_Type): HRESULT; override;
  end;

var
    // If there are multiple instances of this filter active, it's
    // useful for debug messages etc. to know which one this is.
  InstanceCount: integer = 0;

type

  TNullInPlace = class(TBCTransInPlaceFilter, INullIPP, ISpecifyPropertyPages)
    FThisInstance: integer;
    FPreferred: TAM_Media_Type; // Media type chosen from property sheet
    NullIPLock: TBCCritSec;     // To serialise access.
  public
     function GetPin(n: integer): TBCBasePin; override;
     function CheckInputType(mtIn: PAM_Media_Type): HRESULT; override;
    function put_MediaType(mt: PAM_Media_Type): HRESULT; stdcall;
    function get_MediaType(out mt: TAM_Media_Type): HRESULT; stdcall;
    function get_IPin(out Pin: IPin): HRESULT; stdcall;
    function get_State(out State: TFilter_State): HRESULT; stdcall;          //

    // --- ISpecifyPropertyPages ---
    function GetPages(out pages: TCAGUID): HResult; stdcall;

    constructor Create(ObjName: string; unk: IUnKnown; out hr: HRESULT);
    constructor CreateFromFactory(Factory: TBCClassFactory; const Controller: IUnknown); override;
    destructor Destroy; override;

    // Overrides the PURE virtual Transform of CTransInPlaceFilter base class
    // This is where the "real work" is done.
    function Transform(Sample: IMediaSample): HRESULT; override;
  end;

implementation



{ TNullInPlaceInputPin }

// CheckMediaType
//
// Override CTransInPlaceInputPin method.
// If we have been given a preferred media type from the property sheet
// then only accept a type that is exactly that.
// else if there is nothing downstream, then accept anything
// else if there is a downstream connection then first check to see if
// the subtype (and implicitly the major type) are different from the downstream
// connection and if they are different, fail them
// else ask the downstream input pin if the type (i.e. all details of it)
// are acceptable and take that as our answer.

function TNullInPlaceInputPin.CheckMediaType(mt: PAM_Media_Type): HRESULT;
var
  pmt: PAM_Media_Type;
begin
{$IFDEF DEBUG}
   DbgLog(self, 'Input type proposed');
{$ENDIF}
    pmt := @TNullInPlace(FTIPFilter).FPreferred;
    if not TBCMediaType(pmt).IsValid then
      begin
        if TNullInPlace(FTIPFilter).Output.IsConnected then
          begin

            //  We used to check here if the subtype of the proposed type
            //  matched the subtype of the type on the output pin
            //  but this broke as follows:
            //
            //  Renderering the output pin of a CODEC we picked up
            //  2 NULLIPs already in the graph:
            //
            //  Subtypes      Y41P       Y41P       RGB565
            //  Filters  CODEC---->NULLIP---->NULLIP------>RENDERER
            //
            //  Each NULLIP has scheduled a reconnect at this point
            //  and the reconnect on the first connection happens
            //  first:
            //
            //  Subtypes                 Y41P       RGB565
            //  Filters  CODEC     NULLIP---->NULLIP------>RENDERER
            //
            //  In trying to (re)connect the CODEC to the first NULLIP
            //  we first propose (say) Y41P and the first NULLIP
            //  checks that Y41P is the same as its output type
            //  so the call gets passed to the QueryAccept of
            //  the second NULLIP.  The second NULLIP rejected the
            //  call because the subtype on its output pin is not
            //  RGB565.  In a similar way the first NULLIP
            //  rejected Y41P.
            //
            //  By removing this optimization (checking the
            //  subtype before passing the call on) we avoided
            //  the problem.

            result :=  TNullInPlace(FTIPFilter).Output.GetConnected.QueryAccept(mt^);
            exit;
        end;
         result := S_OK;
         exit;
      end
    else
        if TBCMediaType(pmt).Equal(mt) then
          begin
            result := S_OK;
            exit;
          end
        else
          result := VFW_E_TYPE_NOT_ACCEPTED;
end;

constructor TNullInPlaceInputPin.Create(ObjectName: string;
  TransInPlaceFilter: TBCTransInPlaceFilter; out hr: HRESULT;
  Name: WideString);
begin
  inherited Create(ObjectName, TransInPlaceFilter, hr, Name);
end;

{ TNullInPlaceOutputPin }

function TNullInPlaceOutputPin.CheckMediaType(mt: PAM_Media_Type): HRESULT;
var pmt: PAM_Media_Type;
begin
  pmt := @TNullInPlace(FTIPFilter).FPreferred;
  if not TBCMediaType(pmt).IsValid then
    begin
      result := inherited CheckMediaType(mt);
      exit;
    end
  else
    if TBCMediaType(pmt).Equal(mt) then
      begin
        result := S_OK;
        exit;
      end
    else
      result := VFW_E_TYPE_NOT_ACCEPTED;
end;

constructor TNullInPlaceOutputPin.Create(ObjectName: string;
  TransInPlaceFilter: TBCTransInPlaceFilter; out hr: HRESULT;
  Name: WideString);
begin
  inherited Create(ObjectName, TransInPlaceFilter, hr, Name);
end;

{ TNullInPlace }

function TNullInPlace.CheckInputType(mtIn: PAM_Media_Type): HRESULT;
begin
  result := S_OK;
end;

constructor TNullInPlace.Create(ObjName: string; unk: IUnKnown;
  out hr: HRESULT);
var pmt: PAM_Media_Type;
begin
  inherited Create(ObjName, unk, CLSID_NullInPlace, hr);
  FThisInstance := InterlockedIncrement(InstanceCount);
  pmt := @FPreferred;
  TBCMediaType(pmt).InitMediaType;
  NullIPLock := TBCCritSec.Create;
  DbgLog(self, 'TNullInPlace.Create');
end;

constructor TNullInPlace.CreateFromFactory(Factory: TBCClassFactory;
  const Controller: IUnKnown);
var hr: HRESULT;
begin
  Create(Factory.Name, Controller, hr);
end;

destructor TNullInPlace.Destroy;
begin
  NullIPLock.Free;
  inherited;
end;

function TNullInPlace.get_IPin(out Pin: IPin): HRESULT;
begin
  result := S_OK;
  NullIPLock.Lock;
  try
    if (Input = nil) then
      begin
        Pin := nil;
        exit;
      end;
    if not Input.IsConnected then
         Pin := nil
    else Pin := Input.GetConnected;
  finally
    NullIPLock.UnLock;
  end;
end;

function TNullInPlace.get_MediaType(out mt: TAM_Media_Type): HRESULT;
begin
  NullIPLock.Lock;
  try
    mt := FPreferred;
    result := NOERROR ;
  finally
    NullIPLock.UnLock;
  end;
end;

function TNullInPlace.get_State(out State: TFilter_State): HRESULT;
begin
  NullIPLock.Lock;
  try
    State := self.State;
    result := NOERROR ;
  finally
    NullIPLock.UnLock;
  end;
end;

function TNullInPlace.GetPages(out pages: TCAGUID): HResult;
begin
    Pages.cElems := 1;
    Pages.pElems := CoTaskMemAlloc(sizeof(TGUID));
    if (Pages.pElems = nil) then
      begin
        result := E_OUTOFMEMORY;
        exit;
      end;
   Pages.pElems^[0] := CLSID_NullIPPropertyPage;
   result := NOERROR;
end;

function TNullInPlace.GetPin(n: integer): TBCBasePin;
var hr: HRESULT;
begin
  // Create the single input pin and the single output pin
  // If anything fails, fail the whole lot and clean up.
  if (Input = nil) or (Output = nil) then
    begin
      hr := S_OK;
      Input := TNullInPlaceInputPin.Create('Null input pin', self, hr, 'Input');
      // a failed return code should delete the object

      if FAILED(hr) or (Input = nil) then
        begin
          if (Input <> nil) then input.Free;
          input := nil;
          result := nil;
          exit;
        end;

      Output := TNullInPlaceOutputPin.Create('Null output pin', self, hr, 'Output');

      // failed return codes cause both objects to be deleted

      if FAILED(hr) or (Output = nil) then
        begin
          if (Input  <> nil) then input.Free;
          if (Output <> nil) then Output.Free;
          Input  := nil;
          Output := nil;
          result := nil;
          exit;
        end;
    end;

  // Find which pin is required

  case n of
    0: result := Input;
    1: result := Output;
  else
    result := nil;
  end;
end;

function TNullInPlace.put_MediaType(mt: PAM_Media_Type): HRESULT;
var
  Pin: IPin;
  pmt: PAM_Media_Type;
begin
  NullIPLock.Lock;
  try
    // if the state of the graph is running, fail the call.
    if (State = State_Running) then
      begin
        result := E_UNEXPECTED;
        exit;
      end;

    // check the source and sink filters like this media type
    pmt := @FPreferred;
    if (mt = nil) then
        TBCMediaType(pmt).InitMediaType
    else
      begin
        Pin := Input.GetConnected;
        if (Pin <> nil) then
        begin
          if (Pin.QueryAccept(mt^) <> NOERROR) then
          begin
            MessageBox(0,PChar('Upstream filter cannot provide this type'),
                         PChar('Format Selection'),
                         MB_OK or MB_ICONEXCLAMATION);
            result := VFW_E_TYPE_NOT_ACCEPTED;
            exit;
          end;
        end;

        Pin := Output.GetConnected;
        if (Pin <> nil) then
        begin
          if (Pin.QueryAccept(mt^) <> NOERROR) then
          begin
            MessageBox(0, PChar('Downstream filter cannot accept this type'),
                          PChar('Format Selection'),
                          MB_OK or MB_ICONEXCLAMATION);
            result := VFW_E_TYPE_NOT_ACCEPTED;
            exit;
          end;
        end;
        FPreferred := mt^;
     end;

    // force reconnect of input if the media type of connection does not match.
    if (Input.IsConnected) then
    begin
      pmt := Input.CurrentMediaType.MediaType;
      if not TBCMediaType(pmt).Equal(@FPreferred) then
        Graph.Reconnect(Input);
    end;
    result := NOERROR ;
  finally
    NullIPLock.Unlock;
  end;
end;

function TNullInPlace.Transform(Sample: IMediaSample): HRESULT;
begin
  result := S_OK;
end;

initialization
  TBCClassFactory.CreateFilter(TNullInPlace, 'Null-In-Place', CLSID_NullInPlace,
    CLSID_LegacyAmFilterCategory, MERIT_DO_NOT_USE, 2, @SudPins);
end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品日韩成人av| 日韩免费看的电影| 99综合电影在线视频| 大桥未久av一区二区三区中文| 国产精一品亚洲二区在线视频| 国产一区二区不卡| 成人毛片在线观看| 精品国产欧美一区二区| 亚洲精品一区二区三区香蕉| 国产亚洲女人久久久久毛片| 国产精品不卡在线| 亚洲成av人片在线| 黄色资源网久久资源365| 成人黄色电影在线| 欧美久久免费观看| 久久色中文字幕| 国产精品亚洲一区二区三区在线| 国产乱国产乱300精品| 色94色欧美sute亚洲13| 日韩欧美国产一区二区在线播放| 久久久久97国产精华液好用吗| 亚洲色图另类专区| 国产一区激情在线| 日韩一区二区在线观看| 中文字幕欧美一| 久久97超碰国产精品超碰| 99久久99久久综合| 久久新电视剧免费观看| 丝袜诱惑亚洲看片| 一本一道久久a久久精品| 精品国产百合女同互慰| 日韩va欧美va亚洲va久久| 91尤物视频在线观看| 国产精品久久夜| 国产成人精品aa毛片| 欧美电影精品一区二区| 蜜臀av一区二区| 欧美一区二区人人喊爽| 日韩精品久久理论片| 欧洲国内综合视频| 亚洲国产成人高清精品| 欧美日韩大陆在线| 精品播放一区二区| 亚洲免费观看高清完整版在线观看熊 | 成人少妇影院yyyy| 国产日韩精品一区二区浪潮av | 91精品国产综合久久久久久久| 亚洲日本乱码在线观看| 91视频在线观看免费| 一区二区三区精品视频在线| 欧美影院一区二区| 石原莉奈在线亚洲二区| 日韩你懂的在线播放| 国产一区二区久久| 亚洲精品视频自拍| 3d动漫精品啪啪| 国产黄人亚洲片| 一区二区三区四区在线| 91精品国产乱| 在线看国产日韩| 精品在线免费视频| 亚洲少妇最新在线视频| 日韩一区二区三区观看| 福利一区二区在线| 日韩精品欧美精品| 国产精品久久福利| 欧美成人三级在线| 一本久久a久久精品亚洲| 久久精品二区亚洲w码| 亚洲裸体在线观看| 中文字幕免费在线观看视频一区| 欧美视频在线一区二区三区 | 国产日产亚洲精品系列| 欧美性猛交一区二区三区精品| 国内精品伊人久久久久影院对白| 亚洲人成亚洲人成在线观看图片 | 美女视频黄免费的久久| 亚洲摸摸操操av| 国产精品国产三级国产| 久久综合色综合88| 久久综合网色—综合色88| 日韩欧美黄色影院| 日韩精品最新网址| 欧美zozo另类异族| 精品国产网站在线观看| 欧美成人伊人久久综合网| 91精品国产麻豆| 91精品国产欧美一区二区18 | 亚洲午夜久久久久久久久久久| 国产精品久久免费看| 国产精品美女久久久久av爽李琼| 国产情人综合久久777777| 精品国产123| 国产精品久久久久一区二区三区 | 91国模大尺度私拍在线视频| 色综合久久88色综合天天| 91福利国产精品| 91 com成人网| 国产丝袜美腿一区二区三区| 自拍偷拍亚洲综合| 亚洲自拍偷拍av| 欧美精品一区二区三区久久久| 欧美日韩日日骚| 精品福利二区三区| 国产精品久久久久天堂| 午夜影院在线观看欧美| 国产a视频精品免费观看| 91麻豆精东视频| 精品国产露脸精彩对白 | 99久久免费国产| 欧美高清视频在线高清观看mv色露露十八 | 日本道精品一区二区三区| 6080国产精品一区二区| 最新不卡av在线| 韩国成人精品a∨在线观看| 欧美在线三级电影| 中文字幕五月欧美| 免费看黄色91| 欧美三电影在线| 国产精品初高中害羞小美女文| 老司机精品视频线观看86| 欧美午夜影院一区| 中文字幕一区二区三区色视频| 蜜桃视频免费观看一区| 欧美羞羞免费网站| 亚洲综合区在线| 色偷偷一区二区三区| 精品一区二区三区在线播放| 欧美精品一卡二卡| 亚洲激情一二三区| 欧美亚洲一区三区| 亚洲国产欧美日韩另类综合 | 美女久久久精品| 91精品国产欧美一区二区| 麻豆精品视频在线| 国产亚洲精品中文字幕| 国产麻豆视频一区二区| 国产精品国产自产拍高清av| 99久久综合色| 亚洲一区二区不卡免费| 欧美影院一区二区三区| 日韩电影在线一区二区| 精品日韩99亚洲| 91亚洲大成网污www| 无吗不卡中文字幕| 国产日韩av一区| 欧美日韩精品高清| 国产精品亚洲视频| 亚洲综合无码一区二区| 欧美一区二区三区四区在线观看 | 午夜免费欧美电影| 精品va天堂亚洲国产| 成人午夜激情影院| 一区二区三区鲁丝不卡| 91麻豆精品91久久久久同性| 依依成人综合视频| 欧美精品一级二级| 国产一级精品在线| 亚洲精品乱码久久久久久| 欧美剧情电影在线观看完整版免费励志电影 | 日韩欧美aaaaaa| 色综合久久天天综合网| 日韩激情中文字幕| 中文字幕成人av| 欧美久久久久久久久中文字幕| 国产精品一区二区三区网站| 亚洲精品老司机| 在线不卡中文字幕| 午夜久久电影网| 欧美一区二区免费观在线| 91网页版在线| 午夜久久久久久久久久一区二区| 91精品国产欧美日韩| 一本一道久久a久久精品| 国产又黄又大久久| 一区二区三区高清在线| 久久精品一区八戒影视| 日韩精品一区二区三区中文精品| 91亚洲国产成人精品一区二区三 | 国产网红主播福利一区二区| 欧美日韩一本到| 欧洲一区二区三区免费视频| 成人自拍视频在线观看| 亚洲乱码中文字幕| 国产精品传媒入口麻豆| 欧美国产精品一区二区三区| 精品国产电影一区二区| 在线观看日韩电影| 在线观看欧美精品| 欧美日韩五月天| 欧美偷拍一区二区| 欧美丝袜丝交足nylons| 欧美视频一区二| 欧美一区二区三区四区视频 | 中文字幕的久久| 国产精品国产三级国产aⅴ无密码| 综合在线观看色| 亚洲一卡二卡三卡四卡| 日韩精品一卡二卡三卡四卡无卡| 男女男精品视频网|