视频捕捉问题??? ( 积分: 30 )

  • 主题发起人 主题发起人 jin005
  • 开始时间 开始时间
J

jin005

Unregistered / Unconfirmed
GUEST, unregistred user!
各位大侠:如果我想dspack里指定filtergraph使用directShow Filters中的ffdshow MPEG-4 Video filter这个编码(注意不是压缩编码)请问在下面的代码中应该如何改,


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

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

看有的资料上说,好象上面中倒数第2个参数是压缩编码,前面数第2个参数是filters的编码,不知道是不是我上面所需要修改的位置,
是不是还需要在TFilter(DSPACK)控件上面,在basefilter項里指定directShow Filters中的ffdshow MPEG-4 Video filter这个编码(我的安装了暴风影音,否则不会有这个编码),代码中还要用addfilter吗?
请问哪位能给出具体的指定代码。
哦,忘记告诉大家了,我现在做的是1394线连接笔记本电脑(非usb口)和sony DV的视频捕捉程序(用DSPACK控件),前些时间抓图刚刚完成,现在图象文件存下来了,但没有影象,我怀疑是上面我所提出的编码的问题,希望大家共同讨论,我的 QQ:9076629 EMIAL:jin005@yeah.net
 
各位大侠:如果我想dspack里指定filtergraph使用directShow Filters中的ffdshow MPEG-4 Video filter这个编码(注意不是压缩编码)请问在下面的代码中应该如何改,


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

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

看有的资料上说,好象上面中倒数第2个参数是压缩编码,前面数第2个参数是filters的编码,不知道是不是我上面所需要修改的位置,
是不是还需要在TFilter(DSPACK)控件上面,在basefilter項里指定directShow Filters中的ffdshow MPEG-4 Video filter这个编码(我的安装了暴风影音,否则不会有这个编码),代码中还要用addfilter吗?
请问哪位能给出具体的指定代码。
哦,忘记告诉大家了,我现在做的是1394线连接笔记本电脑(非usb口)和sony DV的视频捕捉程序(用DSPACK控件),前些时间抓图刚刚完成,现在图象文件存下来了,但没有影象,我怀疑是上面我所提出的编码的问题,希望大家共同讨论,我的 QQ:9076629 EMIAL:jin005@yeah.net
 
呵呵,增加一个dspackr的TSampleGrabber
用下面这行,试试
RenderStream(@PIN_CATEGORY_PREVIEW, nil, Filter as IBaseFilter, SampleGrabber as IBaseFilter, VideoWindow as IbaseFilter);
 
Parameters

pCategory

[in] Pointer to a member of the AMPROPERTY_PIN_CATEGORY structure of the Pin Property Set property set, specifying a pin category; or NULL to use any pin, regardless of category. Typical values include the following.

PIN_CATEGORY_CAPTURE
PIN_CATEGORY_PREVIEW
PIN_CATEGORY_CC
pType

[in] Pointer to a major-type GUID that specifies the media type of the output pin; or NULL to use any pin, regardless of media type. For a list of possible values, see Major Types.

pSource

[in] Specifies a pointer to the starting filter for the connection, or to an output pin.

pIntermediate

[in] Pointer to the IBaseFilter interface of an intermediate filter, such as a compression filter. Can be NULL.

pSink

[in] Pointer to the IBaseFilter interface of a sink filter, such as a renderer or mux filter. If the value is NULL, the method uses a default renderer (see Remarks).
这个原型说明,Directs c++ SDK 9.0
 
谢谢caixuwen的回复,我刚看到,我先试试。
 
to caixuwen:
RenderStream(@PIN_CATEGORY_PREVIEW, nil, Filter as IBaseFilter, SampleGrabber as IBaseFilter, VideoWindow as IbaseFilter);
上面的不好使啊,由于昨天没在单位,没有DV,今天一早来,我就测试了,还是没有图象,我用的是dspack中demos中D6-D7的videocap的例子,不知道你还有其他方法吗?或者帮我在这个例子上改改,好吗?我真的很急。谢谢
 
后退
顶部