dspack中如何才能更改 preview的解析度?(我指定的影像的解析度为何只能在capture可以,) ( 积分: 100 )

S

spd260

Unregistered / Unconfirmed
GUEST, unregistred user!
以下是dspack中的DSPACK234/Demos/D6-D7/videocap例子,但是我指定的影像的解析度为何只能在capture可以,
preview的仍是320X240呢,哪好心人帮帮忙看一下,如何才能更改 preview的解析度?
var
multiplexer: IBaseFilter;
Writer: IFileSinkFilter;
PinList: TPinList;
i: integer;
begin


// Activate the filter graph, at this stage the source filters are added to the graph
CaptureGraph.Active := true;

// configure output Audio media type + source
if AudioSourceFilter.FilterGraph <> nil then

begin

PinList := TPinList.Create(AudioSourceFilter as IBaseFilter);
i := 0;
while i < PinList.Countdo

if PinList.PinInfo.dir = PINDIR_OUTPUT then

begin

if AudioFormats.ItemIndex <> -1 then

with (PinList.Items as IAMStreamConfig)do

SetFormat(AudioMediaTypes.Items[AudioFormats.ItemIndex].AMMediaType^);
PinList.Delete(i);
end else
inc(i);
if InputLines.ItemIndex <> -1 then

with (PinList.Items[InputLines.ItemIndex] as IAMAudioInputMixer)do

put_Enable(true);
PinList.Free;
end;


// configure output Video media type
if VideoSourceFilter.FilterGraph <> nil then

begin

PinList := TPinList.Create(VideoSourceFilter as IBaseFilter);
if VideoFormats.ItemIndex <> -1 then

(PinList.First as IAMStreamConfig).
with (PinList.First as IID_IAMStreamConfig)do

SetFormat(VideoMediaTypes.Items[VideoFormats.ItemIndex].AMMediaType^);
PinList.Free;
end;



// now render streams
with CaptureGraph as IcaptureGraphBuilder2do

begin

// set the output filename
SetOutputFileName(MEDIASUBTYPE_Avi, PWideChar(CapFile), multiplexer, Writer);

// Connect Video preview (VideoWindow)
if VideoSourceFilter.BaseFilter.DataLength > 0 then

RenderStream(@PIN_CATEGORY_PREVIEW, nil, VideoSourceFilter as IBaseFilter,
SampleGrabber1 as IBaseFilter , VideoWindow as IBaseFilter);

// Connect Video capture streams
if VideoSourceFilter.FilterGraph <> nil then

RenderStream(@PIN_CATEGORY_CAPTURE, nil, VideoSourceFilter as IBaseFilter,
nil, multiplexer as IBaseFilter);

//Connect Audio capture streams
if AudioSourceFilter.FilterGraph <> nil then

begin


RenderStream(nil, nil, AudioSourceFilter as IBaseFilter,
nil, multiplexer as IBaseFilter);
end;

end;

CaptureGraph.Play;
StopButton.Enabled := true;
StartButton.Enabled := false;
AudioFormats.Enabled := false;
AudioCapFilters.Enabled := false;
VideoFormats.Enabled := false;
VideoCapFilters.Enabled := false;
Timer.Enabled := true;
end;
 
以下是我在DSPCK的http://progdigy.com 网站台上找到的,看来不是我一个人发现这个问题,肯定有人解决这个问题了,
就行行好帮帮我吧!
//===============
hi,guys
what's up!
there are some problems in my recent project development.
i use averEZcapture video card in my project,and i want set the video size 320X240 on the
preview pin and 768*576 on the capture pin!
but i can't preview the video well(i render it onto the videorender filter),it's quite freeze.
but the capture pin work well(i render it onto the null render filter,and it can grabber the sample with 768*576);
i just want to it's possible to render output different video size on preview pin and capture
pin,if can,how ?
thank u!
and my source code just like below :

Graphabuilder.findinterface(@PIN_CATEGORY_CAPTURE,........);captureconfig
//get the Iamstreamconfig on the capture pin
graphabuilder.findinterface(@PIN_CATEGORY_Preview..........);/previewconfig
//get the Iamstreamconfig on the Preview pin
// set the am_media_type each
captureconfig.setformat();
previewconfig.setformat();
 
为什么就没人回呢?自已顶一下
 
我也帮你顶一下,研究中
 
如果你想花最少的钱学习流行的计算机技术,本人低价提供
计算机专业高清晰 视 频 教 程,所有教程由业内名家讲解,物超所值,
所有光盘4元/张,特快专递全国三天内到货.
联系方式:手 机:1 3 5 76145612(手机联系佳) Q Q:108410943
E-mail:ncncldjjg@126.com
1、Oracle9iOCP(Oracle认证专家DBA)视频教程(23CD)
2、SQL语言、数据挖掘、SQLServer2000视频教程(6CD)
3、计算机网络原理视频教程(4CD)
4、计算机实用组网技术视频教程(3CD)
5、MCSE(微软认证系统工程师)认证视频教程(11CD)
6、windows2003即学即会视频教程(6CD)
7、J2EE Web程序开发定向班/Java就业班视频教程
(java基础jsp核心技术UML设计)(13CD)
8、J2EE基础高级案例分析视频教程(9CD)
9、马士兵J2SE入门与精通(含坦克大战、BBS实例)视频教程(6CD)
10、java语言深入详解视频教程(12CD)
11、java技术从入门到精通视频教程(21CD)
12、javascript全接触视频教程(13CD)
13、各类网站源程序(9CD)
14、unix原理视频教程(3CD)
15、Linux软件开发工程师(C语言)视频教程(4CD)
16、Linux配置、管理、优化实战工程师视频教程(8CD)
17、Linux内核编程视频教程(11CD)
18、C语言详解视频教程(2CD)
19、VC++6.0(MFC)开发技术术详解视频教程(6CD)
20、ASP.NET中文视频教程(3CD)
21、洪恩C#入门多媒体教程(1CD)
22、XML技术视频教程(2CD)
23、操作系统视频教程(3CD)
24、网络技术基础视频教程(2CD)
25、数据结构视频教程(5CD)
26、清华大学计算机专业多媒体教程(数据结构、汇编、编译原理等)(13CD)
27、大学数学[离散数学线性代数概率与数理统计微积分]视频教程(22CD)
28、LearnKey Asp.Net (老外用英语讲课)(13CD)
29、LearnKey Asp.Net Webservice(老外用英语讲课)(5CD)
30、AppDev Asp.Net2.0 UsingC# (老外用英语讲课)(1CD)
31、APPDev .Net Framework(老外用英语讲课)(2CD)
32、林清安pro/e2001(野火版)视频教程(18CD)
33、深圳大学3D设计视频教程(4CD)
34、3DMAX建模视频教程(老外用英语讲课)(6CD)
35、3DMAX纹理与贴图材质灯光视频教程(老外用英语讲课)(5CD)
36、3DMAX格式500个常用模型库(4CD)
37、lightscape基础入门视频教程(2CD)
38、聚光制造(lightscape3.2入门与精通视频教程)(4CD)
39、coreldraw12中文版入门与精通swf格式视频教程(2CD)
 
接受答案了.
 
顶部