您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetPin函数代码示例

51自学网 2021-06-01 21:12:39
  C++
这篇教程C++ GetPin函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetPin函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPin函数的具体用法?C++ GetPin怎么用?C++ GetPin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetPin函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: CheckPointer

//// FindPin//// If Id is In or Out then return the IPin* for that pin// creating the pin if need be.  Otherwise return NULL with an error.STDMETHODIMP CParserFilter::FindPin(LPCWSTR Id, IPin **ppPin) {    CheckPointer(ppPin,E_POINTER);    ValidateReadWritePtr(ppPin,sizeof(IPin *));    if(0==lstrcmpW(Id,L"In")) {        *ppPin = GetPin(0);    }    else if(0==lstrcmpW(Id,L"Out")) {        *ppPin = GetPin(1);    }    else {        *ppPin = NULL;        return VFW_E_NOT_FOUND;    }    HRESULT hr = NOERROR;    //  AddRef() returned pointer - but GetPin could fail if memory is low.    if(*ppPin) {        (*ppPin)->AddRef();    }    else {        hr = E_OUTOFMEMORY;  // probably.  There's no pin anyway.    }    return hr;}
开发者ID:guojerry,项目名称:cppxml,代码行数:31,


示例2: ConnectFilters

static HRESULT ConnectFilters(IGraphBuilder *graph,							  IBaseFilter *lhs,							  IBaseFilter *rhs){	HRESULT hr = S_OK;    IPin *out = 0;	IPin *in  = 0;	    hr = GetPin(lhs, PINDIR_OUTPUT, &out);	    if (FAILED(hr))		return hr;	    hr = GetPin(rhs, PINDIR_INPUT, &in);	    if (FAILED(hr))     {        out->Release();        return hr;	}	    hr = graph->Connect(out, in);    in->Release();    out->Release();    return hr;}
开发者ID:ChristianFrisson,项目名称:gephex,代码行数:26,


示例3: GetPin

//-----------------------------------------------------------------------------// ConnectFilters// Connects two filters by finding a pin on the upstream filter with the specified// major format type, e.g. For connecting an audio pin to a downstream filterHRESULT CDSUtils::ConnectFilters(IGraphBuilder* pGraph, IBaseFilter* pUpstream, IBaseFilter* pDownstream, const GUID* pFormat){	HRESULT hr = S_OK;	if (pUpstream && pDownstream && pFormat)	{		// find the upstream output pin with the specified format		CComPtr<IPin> pIPinOutput = NULL;		hr = GetPin(pUpstream, pFormat, PINDIR_OUTPUT, &pIPinOutput);		if (SUCCEEDED(hr))		{			// get the downstream input pin			CComPtr<IPin> pIPinInput = NULL;			hr = GetPin(pDownstream, pFormat, PINDIR_INPUT, &pIPinInput);			if (SUCCEEDED(hr))			{				// connect the pins				hr = pGraph->Connect(pIPinOutput, pIPinInput);			}		}	}	else	{		hr = E_INVALIDARG;	}	return hr;}
开发者ID:MattHung,项目名称:sage-graphics,代码行数:33,


示例4: bmp

void bmp (void) {  uprintf("Command Excepted/r");  switch (ExtractNum(3)) {    case 0:itoa(GetPin('B',4),dumb,10);break;    case 1:itoa(GetPin('B',5),dumb,10);break;  }  uprintf(dumb);  uprintf("/r");}
开发者ID:Teknoman117,项目名称:avr,代码行数:9,


示例5: lock

STDMETHODIMP CDynamicSource::JoinFilterGraph(IFilterGraph* pGraph, LPCWSTR pName){    CAutoLock lock(&m_cStateLock);    HRESULT hr;    int nCurrentPin;    CDynamicSourceStream* pOutputPin;    // The filter is joining the filter graph.    if(NULL != pGraph)    {        IGraphConfig* pGraphConfig = NULL;        hr = pGraph->QueryInterface(IID_IGraphConfig, (void**)&pGraphConfig);        if(FAILED(hr))        {            return hr;        }        hr = CBaseFilter::JoinFilterGraph(pGraph, pName);        if(FAILED(hr))        {            pGraphConfig->Release();            return hr;        }        for(nCurrentPin = 0; nCurrentPin < GetPinCount(); nCurrentPin++)        {            pOutputPin = (CDynamicSourceStream*) GetPin(nCurrentPin);            pOutputPin->SetConfigInfo(pGraphConfig, m_evFilterStoppingEvent);        }        pGraphConfig->Release();    }    else    {        hr = CBaseFilter::JoinFilterGraph(pGraph, pName);        if(FAILED(hr))        {            return hr;        }        for(nCurrentPin = 0; nCurrentPin < GetPinCount(); nCurrentPin++)        {            pOutputPin = (CDynamicSourceStream*)GetPin(nCurrentPin);            pOutputPin->SetConfigInfo(NULL, NULL);        }    }    return S_OK;}
开发者ID:forssil,项目名称:thirdpartysource,代码行数:51,


示例6: alPinStateLock

STDMETHODIMP CDynamicSource::Stop(void){    m_evFilterStoppingEvent.Set();    HRESULT hr = CBaseFilter::Stop();    // The following code ensures that a pins thread will be destroyed even     // if the pin is disconnected when CBaseFilter::Stop() is called.    int nCurrentPin;    CDynamicSourceStream* pOutputPin;    {        // This code holds the pin state lock because it        // does not want the number of pins to change         // while it executes.        CAutoLock alPinStateLock(&m_csPinStateLock);        for(nCurrentPin = 0; nCurrentPin < GetPinCount(); nCurrentPin++)        {            pOutputPin = (CDynamicSourceStream*)GetPin(nCurrentPin);            if(pOutputPin->ThreadExists())            {                pOutputPin->DestroySourceThread();            }        }    }    if(FAILED(hr))    {        return hr;    }    return NOERROR;}
开发者ID:forssil,项目名称:thirdpartysource,代码行数:33,


示例7: monitor

STDMETHODIMPBaseFilter::FindPin(LPCWSTR aId,                    IPin** aPin){  if (!aPin)    return E_POINTER;  *aPin = NULL;  CriticalSectionAutoEnter monitor(mLock);  int numPins = GetPinCount();  for (int i = 0; i < numPins; i++) {    BasePin* pin = GetPin(i);    if (NULL == pin) {      assert(pin != NULL);      return VFW_E_NOT_FOUND;    }    if (!pin->Name().compare(aId)) {      // Found a pin with a matching name, AddRef() and return it.      *aPin = pin;      NS_IF_ADDREF(pin);      return S_OK;    }  }  return VFW_E_NOT_FOUND;}
开发者ID:Andrel322,项目名称:gecko-dev,代码行数:28,


示例8: ConnectTwoFilters

static HRESULT ConnectTwoFilters(IGraphBuilder *pGraph, IBaseFilter *pFirst, IBaseFilter *pSecond){    IPin *pOut = NULL, *pIn = NULL;    HRESULT hr = GetPin(pFirst, PINDIR_OUTPUT, &pOut);    if (FAILED(hr)) return hr;    hr = GetPin(pSecond, PINDIR_INPUT, &pIn);    if (FAILED(hr))     {        pOut->Release();        return E_FAIL;     }    hr = pGraph->Connect(pOut, pIn);    pIn->Release();    pOut->Release();    return hr;}
开发者ID:BlueBrain,项目名称:vrpn,代码行数:16,


示例9: XN_METHOD_CHECK_POINTER

HRESULT STDMETHODCALLTYPE XnVideoSource::SetMode( IPin *pPin, long Mode ){    XN_METHOD_START;    XN_METHOD_CHECK_POINTER(pPin);    HRESULT hr = S_OK;    // we have only 1 pin, make sure this is it    XnVideoStream* pVideoStream = dynamic_cast<XnVideoStream*>(GetPin(0));    if (pPin != static_cast<IPin*>(pVideoStream))    {        XN_METHOD_RETURN(E_FAIL);    }    xnLogVerbose(XN_MASK_FILTER, "Setting flip mode to %d", Mode);    hr = pVideoStream->SetMirror(Mode & VideoControlFlag_FlipHorizontal);    if (FAILED(hr))        XN_METHOD_RETURN(hr);    hr = pVideoStream->SetVerticalFlip(Mode & VideoControlFlag_FlipVertical);    if (FAILED(hr))        XN_METHOD_RETURN(hr);    XN_METHOD_RETURN(S_OK);}
开发者ID:janjachnik,项目名称:OpenNI,代码行数:27,


示例10: ReportError

// Function name	: CVMR9Graph::RenderGraph// Description	    : render the graph// Return type		: BOOL BOOL CVMR9Graph::RenderGraph(){	HRESULT hr;	if (m_pFilterGraph2 == NULL) {		ReportError("Could not render the graph because it is not fully constructed", E_FAIL);		return FALSE;	}	for (int i=0; i<10; i++) {		IBaseFilter* pBaseFilter = m_srcFilterArray[i];		if (pBaseFilter != NULL) {			IPin* pPin;      while ((pPin = GetPin(pBaseFilter, PINDIR_OUTPUT)) != NULL)      {        hr = m_pFilterGraph2->RenderEx(pPin, AM_RENDEREX_RENDERTOEXISTINGRENDERERS, NULL);        if (FAILED(hr))        {          ReportError("Unable to render the pin", hr);          return FALSE;        }      }		}	}	return TRUE;}
开发者ID:smarinel,项目名称:ags-web,代码行数:29,


示例11: cObjectCreationLock

HRESULT CAnalyzerWriterFilter::GetMediaPositionInterface(REFIID riid, __deref_out void **ppv){    CAutoLock cObjectCreationLock(&m_ObjectCreationLock);    if (m_pPosition) {        return m_pPosition->NonDelegatingQueryInterface(riid,ppv);    }    CBasePin *pPin = GetPin(0);    if (NULL == pPin) {        return E_OUTOFMEMORY;    }    HRESULT hr = NOERROR;    // Create implementation of this dynamically since sometimes we may    // never try and do a seek. The helper object implements a position    // control interface (IMediaPosition) which in fact simply takes the    // calls normally from the filter graph and passes them upstream    m_pPosition = new CAnalyzerPosPassThru(NAME("Renderer CPosPassThru"),                                           CBaseFilter::GetOwner(),                                           (HRESULT *) &hr,                                           pPin,                                           m_analyzer);    if (m_pPosition == NULL) {        return E_OUTOFMEMORY;    }    if (FAILED(hr)) {        delete m_pPosition;        m_pPosition = NULL;        return E_NOINTERFACE;    }    return GetMediaPositionInterface(riid,ppv);}
开发者ID:perlinson,项目名称:graph-studio-next,代码行数:35,


示例12: CBaseRenderer

CTextOutFilter::CTextOutFilter(LPUNKNOWN pUnk,HRESULT *phr) :    CBaseRenderer(CLSID_TextRender, NAME("Text Display Filter/0"), pUnk, phr),    m_TextWindow(NAME("Text properties/0"),GetOwner(),phr,&m_InterfaceLock,this){    m_TextWindow.SetControlWindowPin( GetPin(0) );} // (Constructor)
开发者ID:chinajeffery,项目名称:dx_sdk,代码行数:7,


示例13: GetPin

bool ChannelPinMapper::TogglePin(int pinIdx, int chIdx) {  bool on = GetPin(pinIdx, chIdx);  on = !on;  SetPin(pinIdx, chIdx, on);   return on;}
开发者ID:Brado231,项目名称:Faderport_XT,代码行数:7,


示例14: LOG

void OggDemuxFilter::notifyPinConnected(){    LOG(logDEBUG) << __FUNCTIONW__;    if (!m_streamMapper->allStreamsReady())     {        return;    }    if (m_seekTable)     {        return;    }    m_seekTable = new CustomOggChainGranuleSeekTable();    int outputPinCount = GetPinCount();    for (int i = 1; i < outputPinCount; i++)     {        OggDemuxOutputPin* pin = static_cast<OggDemuxOutputPin*>(GetPin(i));        LOG(logDEBUG) << L"Adding decoder interface to seek table, serial no: " << pin->getSerialNo();        m_seekTable->addStream(pin->getSerialNo(), pin->getDecoderInterface());    }#ifndef WINCE    LOG(logDEBUG) << __FUNCTIONW__ << L" Building seek table...";    CComPtr<IAsyncReader> reader = m_inputPin.GetReader();    static_cast<CustomOggChainGranuleSeekTable*>(m_seekTable)->buildTable(reader);    LOG(logDEBUG) << __FUNCTIONW__ << L" Built.";#endif}
开发者ID:John-He-928,项目名称:krkrz,代码行数:34,


示例15: CTransInPlaceFilter

CDXFilter::CDXFilter( IUnknown * pOuter, HRESULT * phr, BOOL ModifiesData )                : CTransInPlaceFilter( TEXT("DXFilter"), (IUnknown*) pOuter,                                        CLSID_DXFilter, phr#if !defined(_WIN32_WCE)									   ,(BOOL)ModifiesData#endif									   )                , m_callback( NULL ){    // this is used to override the input pin with our own       m_pInput = (CTransInPlaceInputPin*) new CDXFilterInPin( this, phr );    if( !m_pInput )    {        if (phr)            *phr = E_OUTOFMEMORY;    }        // Ensure that the output pin gets created.  This is necessary because our    // SetDeliveryBuffer() method assumes that the input/output pins are created, but    // the output pin isn't created until GetPin() is called.  The     // CTransInPlaceFilter::GetPin() method will create the output pin, since we    // have not already created one.    IPin *pOutput = GetPin(1);    // The pointer is not AddRef'ed by GetPin(), so don't release it}
开发者ID:JonathanRadesa,项目名称:mediastreamer2,代码行数:25,


示例16: GetPin

void PinView::Update () {    PinGraphic* pin = GetPin();    Graphic* pingr = pin;        IncurDamage(pin);    *pingr = *GetPinComp()->GetGraphic();    IncurDamage(pin);    EraseHandles();}
开发者ID:PNCG,项目名称:neuron,代码行数:9,


示例17: EncoderHandler

// Handler to respond to pin interruptsstatic void EncoderHandler(void *data) {    tEncoder *enc = data;        // Determine actual value of pins    // and normalize inputs for lookup in a table    int input = (GetPin(enc->pinA) ? 0x1 : 0x0) |                (GetPin(enc->pinB) ? 0x2 : 0x0);        // Add the value in the FSM to the current tick count    // (or substract if invert is set)    if (enc->invert) {        enc->ticks -= enc->decoder->value[input];    } else {        enc->ticks += enc->decoder->value[input];    }    // Setup the next state of the mealy machine    enc->decoder = &DecoderFSM[input];}
开发者ID:ALoupe,项目名称:Rasware2013,代码行数:20,


示例18: GetPin

void CCaptureDevice::SetCaptureBufferSize(void){	IPin * pCapturePin = GetPin();	if (pCapturePin)	{		DWORD  dwBytesPerSec = 0;		AM_MEDIA_TYPE * pmt = {0};		IAMStreamConfig * pCfg = NULL;		HRESULT hr = pCapturePin->QueryInterface(IID_IAMStreamConfig, (void **)&pCfg);		if ( hr==S_OK )		{            hr = pCfg->GetFormat(&pmt);			if ( hr==S_OK )			{				WAVEFORMATEX *pWF = (WAVEFORMATEX *) pmt->pbFormat;				dwBytesPerSec = pWF->nAvgBytesPerSec;				pWF->nChannels = 1;				pWF->wBitsPerSample = 8;				pWF->nSamplesPerSec = 11025;				pWF->nAvgBytesPerSec = pWF->nSamplesPerSec * pWF->nChannels * pWF->wBitsPerSample / 8;				pWF->nBlockAlign = 1;/*	info.cbSize = sizeof(WAVEFORMATEX);	info.wFormatTag = 1;	info.nChannels = 2;	info.nSamplesPerSec = 44100;	//info.nSamplesPerSec = 22050;	11025	info.wBitsPerSample = 16;	info.nAvgBytesPerSec = info.nSamplesPerSec * info.nChannels * info.wBitsPerSample / 8;	info.nBlockAlign = 4;	*/				pCfg->SetFormat( pmt );				DeleteMediaType(pmt);			}			pCfg->Release();		}/*		if (dwBytesPerSec)		{			IAMBufferNegotiation * pNeg = NULL;			hr = pCapturePin->QueryInterface(IID_IAMBufferNegotiation, 				(void **)&pNeg);			if (SUCCEEDED(hr))			{				ALLOCATOR_PROPERTIES AllocProp;				AllocProp.cbAlign  = -1;  // -1 means no preference.				AllocProp.cbBuffer = dwBytesPerSec *  dwLatencyInMilliseconds / 1000;				AllocProp.cbPrefix = -1;				AllocProp.cBuffers = -1;				hr = pNeg->SuggestAllocatorProperties(&AllocProp);				pNeg->Release();			}		}*/	}}
开发者ID:duzhi5368,项目名称:FKChessCards,代码行数:55,


示例19: CoInitialize

VideoCapture::VideoCapture(HWND hWnd){    CoInitialize(NULL);    //	HRESULT hr;    InitVideoFilters();    IPin *pPin = GetPin(m_pBaseFilter, PINDIR_OUTPUT);    ShowFilterProperty(pPin);    StartRender(hWnd);}
开发者ID:alienwow,项目名称:CSharpProjects,代码行数:11,


示例20: cObjectCreationLock

HRESULT CMPEGFilter::GetMediaPositionInterface(REFIID riid, void **ppv){    CAutoLock cObjectCreationLock(&m_ObjectCreationLock);	    if (m_pPosition) {        return m_pPosition->NonDelegatingQueryInterface(riid,ppv);    }    HRESULT hr = NOERROR;    // Create implementation of this dynamically since sometimes we may    // never try and do a seek. The helper object implements a position    // control interface (IMediaPosition) which in fact simply takes the    // calls normally from the filter graph and passes them upstream	/*    m_pPosition = new CRendererPosPassThru(NAME("Renderer CPosPassThru"),                                           CBaseFilter::GetOwner(),                                           (HRESULT *) &hr,                                           GetPin(0));*/	m_pPosition = new CMPEGSeeking(NAME("Renderer CPosPassThru"),                                           CBaseFilter::GetOwner(),                                           (HRESULT *) &hr,                                           GetPin(0),										   GetPin(1),										   m_pMPEGObj);    if (m_pPosition == NULL) {        return E_OUTOFMEMORY;    }    if (FAILED(hr)) {        delete m_pPosition;        m_pPosition = NULL;        return E_NOINTERFACE;    }	m_pPosition->AddRef();	*ppv = m_pPosition;    return S_OK;}
开发者ID:BlackMael,项目名称:DirectEncode,代码行数:41,


示例21: wxCHECK_RET

void SCH_SCREEN::MarkConnections( SCH_LINE* aSegment ){    wxCHECK_RET( (aSegment) && (aSegment->Type() == SCH_LINE_T),                 wxT( "Invalid object pointer." ) );    for( SCH_ITEM* item = m_drawList.begin(); item; item = item->Next() )    {        if( item->GetFlags() & CANDIDATE )            continue;        if( item->Type() == SCH_JUNCTION_T )        {            SCH_JUNCTION* junction = (SCH_JUNCTION*) item;            if( aSegment->IsEndPoint( junction->GetPosition() ) )                item->SetFlags( CANDIDATE );            continue;        }        if( item->Type() != SCH_LINE_T )            continue;        SCH_LINE* segment = (SCH_LINE*) item;        if( aSegment->IsEndPoint( segment->GetStartPoint() )            && !GetPin( segment->GetStartPoint(), NULL, true ) )        {            item->SetFlags( CANDIDATE );            MarkConnections( segment );        }        if( aSegment->IsEndPoint( segment->GetEndPoint() )            && !GetPin( segment->GetEndPoint(), NULL, true ) )        {            item->SetFlags( CANDIDATE );            MarkConnections( segment );        }    }}
开发者ID:hzeller,项目名称:kicad-source-mirror,代码行数:40,


示例22: ASSERT

//// If the format changes, we need to reconnect//void CSynthFilter::ReconnectWithNewFormat(void) {    // The caller must hold the state lock because this    // function calls IsConnected().    ASSERT(CritCheckIn(pStateLock()));    // The synth filter's only has one pin.  The pin is an output pin.    CDynamicSourceStream* pOutputPin = (CDynamicSourceStream*)GetPin(0);    if( pOutputPin->IsConnected() ) {        pOutputPin->OutputPinNeedsToBeReconnected();    }}
开发者ID:FerozAhmed,项目名称:virtual-audio-capture-grabber-device,代码行数:16,


示例23: GetPinCount

//----------------------------------------------------------------------------//! @brief	  	
C++ GetPitch函数代码示例
C++ GetPictureScreen函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。