PDA

View Full Version : DFG/SV1 - need help to get started, CD was defective



ivec
May 11, 2005, 22:30:01
Hello,

I just installed a DFG/SV1 (s/n 533018), but the CD that came with it was not readable.
I downloaded the drivers and after several reinstallations of the drivers managed to get it working.

Next, I would like to use the Crossbar to alternate between the video inputs.
Is there a specific sample I can download that would quickly point me towards how to implement this?


In case this is relevant or of interest to anyone, here's the code I use to setup the DirectShow graph for my preview window:


//#### may not be the right place to put this ! --ivec20050228
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);


HRESULT hr;

// create a filter graph
//
hr = m_pGraph.CoCreateInstance( CLSID_FilterGraph );
if( !m_pGraph )
{
//THROW1("Could not create filter graph");
return E_FAIL;
}

// get whatever capture device exists
//
CComPtr< IBaseFilter > pCap;
std::string name = getDefaultCapDevice( &pCap );
if( !pCap )
{
m_pGraph.Release();
//THROW1("No video capture device was detected on the system.");
return E_FAIL;
}

ECHO("Found video input device: "<<name);

// add the capture filter to the graph
//
hr = m_pGraph->AddFilter( pCap, L"Cap" );
if( FAILED( hr ) )
{
//Error( TEXT("Could not put capture device in graph"));
return E_FAIL;
}

// build the graph
CComPtr<ICaptureGraphBuilder2> pCGB2;
hr = pCGB2.CoCreateInstance (CLSID_CaptureGraphBuilder2, NULL, CLSCTX_INPROC);
if (FAILED( hr ))
{
//Error(TEXT ("Can't get a ICaptureGraphBuilder2 reference"));
return hr;
}

hr = pCGB2->SetFiltergraph( m_pGraph );
if (FAILED( hr ))
{
//Error(TEXT("SetGraph failed"));
return hr;
}


// If there is a VP pin present on the video device, then put the
// renderer on CLSID_NullRenderer
CComPtr<IPin> pVPPin;
hr = pCGB2->FindPin(
pCap,
PINDIR_OUTPUT,
&PIN_CATEGORY_VIDEOPORT,
NULL,
FALSE,
0,
&pVPPin);


// If there is a VP pin, put the renderer on NULL Renderer
CComPtr<IBaseFilter> pRenderer;
if (S_OK == hr)
{
hr = pRenderer.CoCreateInstance(CLSID_NullRenderer);
if (S_OK != hr)
{
//Error(TEXT("Unable to make a NULL renderer"));
return S_OK;
}
hr = m_pGraph->AddFilter(pRenderer, L"NULL renderer");
if (FAILED (hr))
{
//Error(TEXT("Can't add the filter to graph"));
return hr;
}
}

IBaseFilter* const pIntermediate = NULL; //could be used to plug a FrameGrabber into the pipeline (see StillCap demo)

if( FAILED(hr=pCGB2->RenderStream( &PIN_CATEGORY_PREVIEW, &MEDIATYPE_Interleaved, pCap, pIntermediate, pRenderer ))
&& FAILED(hr=pCGB2->RenderStream( &PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, pCap, pIntermediate, pRenderer ))
&& FAILED(hr=pCGB2->RenderStream( &PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, pCap, pIntermediate, pRenderer )) )
{
return hr;
}

Stefan Geissler
May 12, 2005, 08:51:54
Hello,

Please excuse the defective CD ROM.
You can send an email to support@imagingcontrol.com, so i can send you the software, that should be on the CD ROM. I can also send a correct CD ROM to you.

No, i have no DirectShow samples, because i can not make DirectShow support. I have not enough experiences. With the ICImagingControl SDK, there are samples for easy access to the input channels.