J
jin005
Unregistered / Unconfirmed
GUEST, unregistred user!
本人用的为dspack组件。笔记本接sony DV90E 1394线
我用IAMStreamConfig接口实现的方法,代码如下:
var
VideoStreamConfig : IAMStreamConfig;
AMMEdiaType : PAMMediaType;
begin
FilterGraph.ClearGraph;
FilterGraph.Active := false;
Filter.BaseFilter.Moniker := SysDev.GetMoniker(TMenuItem(Sender).tag);
FilterGraph.Active := true;
with FilterGraph as ICaptureGraphBuilder2do
begin
FindInterface(@look_downstream_only, nil, Filter as IBaseFilter, IID_IAMStreamConfig, VideoStreamConfig);
VideoStreamConfig.GetFormat(AMMEdiaType);
PVideoInfoHeader(AMMEdiaType.pbFormat)^.bmiHeader.biWidth:= 320;
PVideoInfoHeader(AMMEdiaType.pbFormat)^.bmiHeader.biHeight:= 240;
AMMEdiaType.subtype := MEDIASUBTYPE_RGB24;
VideoStreamConfig.SetFormat(AMMEdiaType^);
DeleteMediaType(AMMEdiaType);
RenderStream(@PIN_CATEGORY_PREVIEW, nil, Filter as IBaseFilter, SampleGrabber as IBaseFilter, VideoWindow as IbaseFilter);
end;
FilterGraph.Play;
为什么,我抓拍的图片都是720*576的,即感觉bmiHeader.biHeight的值是默认值(720*576)。为什么设置成功了,但不起作用呢?请问如何在dspack中调节分辨率呢?我想抓到320*240,请问如何设置?
我用IAMStreamConfig接口实现的方法,代码如下:
var
VideoStreamConfig : IAMStreamConfig;
AMMEdiaType : PAMMediaType;
begin
FilterGraph.ClearGraph;
FilterGraph.Active := false;
Filter.BaseFilter.Moniker := SysDev.GetMoniker(TMenuItem(Sender).tag);
FilterGraph.Active := true;
with FilterGraph as ICaptureGraphBuilder2do
begin
FindInterface(@look_downstream_only, nil, Filter as IBaseFilter, IID_IAMStreamConfig, VideoStreamConfig);
VideoStreamConfig.GetFormat(AMMEdiaType);
PVideoInfoHeader(AMMEdiaType.pbFormat)^.bmiHeader.biWidth:= 320;
PVideoInfoHeader(AMMEdiaType.pbFormat)^.bmiHeader.biHeight:= 240;
AMMEdiaType.subtype := MEDIASUBTYPE_RGB24;
VideoStreamConfig.SetFormat(AMMEdiaType^);
DeleteMediaType(AMMEdiaType);
RenderStream(@PIN_CATEGORY_PREVIEW, nil, Filter as IBaseFilter, SampleGrabber as IBaseFilter, VideoWindow as IbaseFilter);
end;
FilterGraph.Play;
为什么,我抓拍的图片都是720*576的,即感觉bmiHeader.biHeight的值是默认值(720*576)。为什么设置成功了,但不起作用呢?请问如何在dspack中调节分辨率呢?我想抓到320*240,请问如何设置?