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

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

?? main.pas

?? 一套及時通訊的原碼
?? PAS
字號:
unit main;

{$IFDEF VER150}
  {$WARN UNSAFE_CODE OFF}
  {$WARN UNSAFE_TYPE OFF}
  {$WARN UNSAFE_CAST OFF}
{$ENDIF}

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: PAMMediaType): HRESULT; stdcall;      // the media type selected
    function get_MediaType(out mt: TAMMediaType): HRESULT; stdcall;  // the media type selected
    function get_IPin(out Pin: IPin): HRESULT; stdcall;                // the source pin
    function get_State(out State: TFilterState): 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: PAMMediaType): HRESULT; override;
  end;

  TNullInPlaceOutputPin = class(TBCTransInPlaceOutputPin)
  public
    constructor Create(ObjectName: string; TransInPlaceFilter: TBCTransInPlaceFilter;
      out hr: HRESULT; Name: WideString);
    function CheckMediaType(mt: PAMMediaType): 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: TAMMediaType; // Media type chosen from property sheet
    NullIPLock: TBCCritSec;     // To serialise access.
  public
     function GetPin(n: integer): TBCBasePin; override;
     function CheckInputType(mtIn: PAMMediaType): HRESULT; override;
    function put_MediaType(mt: PAMMediaType): HRESULT; stdcall;
    function get_MediaType(out mt: TAMMediaType): HRESULT; stdcall;
    function get_IPin(out Pin: IPin): HRESULT; stdcall;
    function get_State(out State: TFilterState): 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: PAMMediaType): HRESULT;
var
  pmt: PAMMediaType;
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: PAMMediaType): HRESULT;
var pmt: PAMMediaType;
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: PAMMediaType): HRESULT;
begin
  result := S_OK;
end;

constructor TNullInPlace.Create(ObjName: string; unk: IInterface;
  out hr: HRESULT);
var pmt: PAMMediaType;
begin
  inherited Create(ObjName, unk, CLSID_NullInPlace, hr);
  FThisInstance := InterlockedIncrement(InstanceCount);
  pmt := @FPreferred;
  TBCMediaType(pmt).InitMediaType;
  NullIPLock := TBCCritSec.Create;
{$IFDEF DEBUG}
  DbgLog(self, 'TNullInPlace.Create');
{$ENDIF}
end;

constructor TNullInPlace.CreateFromFactory(Factory: TBCClassFactory;
  const Controller: IInterface);
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: TAMMediaType): HRESULT;
begin
  NullIPLock.Lock;
  try
    mt := FPreferred;
    result := NOERROR ;
  finally
    NullIPLock.UnLock;
  end;
end;

function TNullInPlace.get_State(out State: TFilterState): 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: PAMMediaType): HRESULT;
var
  Pin: IPin;
  pmt: PAMMediaType;
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不卡免费在线观看| 欧美日韩精品高清| 亚洲精品伦理在线| 精品久久久影院| 色综合久久中文字幕综合网| 秋霞电影一区二区| 亚洲黄色在线视频| 欧美本精品男人aⅴ天堂| 色综合久久88色综合天天免费| 久久99最新地址| 亚洲大型综合色站| 亚洲视频你懂的| 久久久www免费人成精品| 91精品国产综合久久久蜜臀粉嫩 | 亚洲网友自拍偷拍| 国产精品久久久久久久裸模| 精品国产髙清在线看国产毛片| 欧美中文字幕一区二区三区亚洲| 国产ts人妖一区二区| 久久99九九99精品| 日本中文字幕一区二区视频 | 欧美激情一区三区| www国产成人| 欧美不卡一区二区三区| 欧美精选一区二区| 欧美中文字幕一区二区三区| 91在线免费看| 97精品久久久久中文字幕| 国产精品自拍在线| 国产在线精品不卡| 精品一区中文字幕| 久久99热狠狠色一区二区| 久久疯狂做爰流白浆xx| 欧美aaa在线| 美女视频一区二区三区| 奇米影视7777精品一区二区| 青青草成人在线观看| 青草av.久久免费一区| 奇米一区二区三区| 麻豆国产精品视频| 久久精品国产亚洲一区二区三区| 日本不卡一二三| 免费成人你懂的| 狠狠色2019综合网| 国产一区二区在线电影| 国产九九视频一区二区三区| 国产福利一区二区三区视频在线 | 国产精品18久久久久久久久久久久 | 国产精品欧美一区二区三区| 中文字幕av一区二区三区| 国产精品高潮久久久久无| 中文字幕在线观看不卡视频| 亚洲日本在线观看| 亚洲一区二区在线免费观看视频| 亚洲成a天堂v人片| 日本不卡不码高清免费观看| 激情五月激情综合网| 国产99一区视频免费| www.在线成人| 在线免费观看成人短视频| 欧美美女直播网站| 2024国产精品| 亚洲欧美视频在线观看视频| 亚洲国产人成综合网站| 免费在线观看不卡| 国产成人亚洲综合a∨婷婷| youjizz久久| 欧美丰满少妇xxxxx高潮对白| 欧美电视剧免费全集观看| 国产亚洲福利社区一区| 1区2区3区国产精品| 婷婷亚洲久悠悠色悠在线播放| 蜜桃av一区二区三区| 国产一区视频导航| 91久久精品网| 精品福利av导航| 亚洲特级片在线| 美女国产一区二区三区| 国产宾馆实践打屁股91| 欧美性感一类影片在线播放| 精品伦理精品一区| 亚洲黄一区二区三区| 久久爱www久久做| av成人免费在线观看| 欧美一区二区三区公司| 国产精品麻豆欧美日韩ww| 日本一不卡视频| 99久久婷婷国产综合精品| 91精品国产综合久久精品性色| 国产精品久久一卡二卡| 奇米精品一区二区三区在线观看| 99国内精品久久| 精品少妇一区二区三区| 亚洲激情图片一区| 国产高清久久久| 91福利社在线观看| 精品成人a区在线观看| 亚洲午夜久久久久久久久久久| 国产一二精品视频| 777久久久精品| 一区二区三区四区不卡在线 | www.激情成人| 亚洲精品一区二区三区蜜桃下载| 亚洲国产成人精品视频| 成人三级伦理片| 2024国产精品视频| 日本伊人色综合网| 欧美日韩三级视频| 18涩涩午夜精品.www| 国产成人啪午夜精品网站男同| 欧美日韩aaaaaa| 亚洲综合网站在线观看| proumb性欧美在线观看| 久久久久久电影| 久草中文综合在线| 日韩一区二区三区免费观看| 亚洲一区二区三区在线| 色综合天天综合网国产成人综合天| 欧美刺激午夜性久久久久久久| 午夜精品久久久久久久99樱桃| 色网站国产精品| 最新久久zyz资源站| 91精品国产综合久久婷婷香蕉| 亚洲女人的天堂| 成人h动漫精品一区二区| 欧美一区二区三区视频在线观看| 亚洲成人免费影院| 日本福利一区二区| 国产精品久久网站| 成人免费的视频| 国产精品你懂的| 99vv1com这只有精品| 中文字幕亚洲电影| av在线一区二区| 亚洲精品日产精品乱码不卡| 99麻豆久久久国产精品免费优播| 国产精品伦一区| 99re在线精品| 亚洲色图在线播放| 色婷婷久久一区二区三区麻豆| 中文字幕一区二区三区在线不卡 | 99久久免费精品| 亚洲免费在线看| 欧美羞羞免费网站| 性久久久久久久久| 欧美一区二区三区日韩| 久久成人18免费观看| 久久久精品综合| 91在线国产观看| 亚洲国产va精品久久久不卡综合| 欧美区在线观看| 精品一二线国产| 亚洲欧洲日韩一区二区三区| 色噜噜狠狠色综合欧洲selulu| 亚洲自拍偷拍综合| 777a∨成人精品桃花网| 国产中文字幕精品| 国产精品福利一区二区三区| 欧美最猛性xxxxx直播| 日韩成人av影视| 久久精品视频网| 色婷婷久久久久swag精品| 亚洲亚洲人成综合网络| 精品国产乱码久久久久久图片 | 亚洲一级二级三级| 欧美一区二区三区在线观看| 国产一区二区三区综合| 亚洲天堂成人网| 日韩欧美亚洲国产另类| 不卡视频免费播放| 亚洲成人tv网| 亚洲国产精品av| 欧美日韩亚洲高清一区二区| 国产美女娇喘av呻吟久久| 中文字幕日韩精品一区 | 日韩欧美一级二级三级久久久| 国产91在线观看丝袜| 尤物av一区二区| 久久婷婷综合激情| 欧美亚洲另类激情小说| 国产一区二区三区四区五区入口| 亚洲天堂2014| 久久综合五月天婷婷伊人| 91视频免费观看| 久久超碰97人人做人人爱| 亚洲精品视频在线| 精品福利视频一区二区三区| 欧美影院精品一区| 成人性生交大片免费看在线播放 | 久久综合资源网| 欧美三级蜜桃2在线观看| 国产美女av一区二区三区| 亚洲一线二线三线久久久| 2欧美一区二区三区在线观看视频| 一本大道久久a久久精品综合| 久久69国产一区二区蜜臀| 亚洲成人久久影院| 中文字幕中文乱码欧美一区二区 | 91在线你懂得| 韩国成人福利片在线播放|