read this guy's response to the similar problem, it might help you out:http://groups.google.com/groups?hl=en&frame=right&th=73394f6b9ad0eb8d&seekm=9g3b6u%24lmc%241%40geraldo.cc.utexas.edu#sI have used the sample grabber to get individual frames, but what I did was
I add the filter with AddFilter(), and then I connect the pins directly with
FindPin() and Connect(). IPin *capture_pin;
if (builder->FindPin (capture_filter,
PINDIR_OUTPUT,
&PIN_CATEGORY_CAPTURE,
0, 0, 0, &capture_pin) != S_OK)
throw "Could not find capture pin";
IPin *grab_in_pin;
if (builder->FindPin (grab_filter,
PINDIR_INPUT,
0, 0, 0, 0, &grab_in_pin) != S_OK)
throw "Could not find grabber input pin"; int err = graph->Connect (capture_pin, grab_in_pin);
if (err != S_OK)
{
capture_pin->Release ();
grab_in_pin->Release ();
throw "Could not connect capture pin to grabber pin";
}Then I use the SampleGrabber callback to get the frames.
I add the filter with AddFilter(), and then I connect the pins directly with
FindPin() and Connect(). IPin *capture_pin;
if (builder->FindPin (capture_filter,
PINDIR_OUTPUT,
&PIN_CATEGORY_CAPTURE,
0, 0, 0, &capture_pin) != S_OK)
throw "Could not find capture pin";
IPin *grab_in_pin;
if (builder->FindPin (grab_filter,
PINDIR_INPUT,
0, 0, 0, 0, &grab_in_pin) != S_OK)
throw "Could not find grabber input pin"; int err = graph->Connect (capture_pin, grab_in_pin);
if (err != S_OK)
{
capture_pin->Release ();
grab_in_pin->Release ();
throw "Could not connect capture pin to grabber pin";
}Then I use the SampleGrabber callback to get the frames.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货