A
arcore
Unregistered / Unconfirmed
GUEST, unregistred user!
我的部分代码如下:
===============
//设置制式...
SetCaptureAnalog(Filter as IBaseFilter, AnalogVideo_PAL_D);
FindInterface(@PIN_CATEGORY_PREVIEW, @MEDIATYPE_Video, Filter as IBaseFilter, IID_IAMStreamConfig, AMStreamConfig);
//PREVIEW色深...
SetMediaBitCountToSystem(AMStreamConfig);
//PREVIEW分辩率...
SetCaptureScale1(AMStreamConfig, 768, 576);
FindInterface(@PIN_CATEGORY_CAPTURE, @MEDIATYPE_Video, Filter as IBaseFilter, IID_IAMStreamConfig, AMStreamConfigC);
//CAPTURE色深...
SetMediaBitCountToSystem(AMStreamConfigC);
//CAPTURE分辩率...
SetCaptureScale1(AMStreamConfigC, 768, 576);
strOutFileName := ExtractFilePath(Application.ExeName) + 'Capture.avi';
SetOutputFileName(MEDIASUBTYPE_Avi, PWideChar(strOutFileName), Multiplexer, Writer);
//链接视频Capture...
if Filter.FilterGraph <> nil then
RenderStream(@PIN_CATEGORY_CAPTURE,
nil,
Filter as IBaseFilter,
Encoder as IBaseFilter,
Multiplexer);
//链接视频PREVIEW...
if Filter.BaseFilter.DataLength > 0 then
RenderStream(@PIN_CATEGORY_PREVIEW,
nil,
Filter as IBaseFilter,
nil,
VideoWindow as IBaseFilter);
===============
//设置制式...
SetCaptureAnalog(Filter as IBaseFilter, AnalogVideo_PAL_D);
FindInterface(@PIN_CATEGORY_PREVIEW, @MEDIATYPE_Video, Filter as IBaseFilter, IID_IAMStreamConfig, AMStreamConfig);
//PREVIEW色深...
SetMediaBitCountToSystem(AMStreamConfig);
//PREVIEW分辩率...
SetCaptureScale1(AMStreamConfig, 768, 576);
FindInterface(@PIN_CATEGORY_CAPTURE, @MEDIATYPE_Video, Filter as IBaseFilter, IID_IAMStreamConfig, AMStreamConfigC);
//CAPTURE色深...
SetMediaBitCountToSystem(AMStreamConfigC);
//CAPTURE分辩率...
SetCaptureScale1(AMStreamConfigC, 768, 576);
strOutFileName := ExtractFilePath(Application.ExeName) + 'Capture.avi';
SetOutputFileName(MEDIASUBTYPE_Avi, PWideChar(strOutFileName), Multiplexer, Writer);
//链接视频Capture...
if Filter.FilterGraph <> nil then
RenderStream(@PIN_CATEGORY_CAPTURE,
nil,
Filter as IBaseFilter,
Encoder as IBaseFilter,
Multiplexer);
//链接视频PREVIEW...
if Filter.BaseFilter.DataLength > 0 then
RenderStream(@PIN_CATEGORY_PREVIEW,
nil,
Filter as IBaseFilter,
nil,
VideoWindow as IBaseFilter);