自定义DirectShow视频渲染器过滤器 - 动态分辨率更改 [英] Custom DirectShow Video Renderer Filter - Dynamic Resolution Change
问题描述
我有一个自定义DirectShow视频渲染器过滤器
,它具有一些超过的微软视频渲染器过滤器
。我知道我可以用 Transform Filter
来做同样的事情,但是我选择了这种方式。我也相信,我将面对与 Transform Filter
相同的问题,我将在下面介绍。
当我使用 Microsoft的Video Renderer Filter
,它可以在流启动/更改时自动调整窗口大小和缓冲区大小。我的过滤器是能够做到这一点,但除了,我无法接收事件流开始后。我相信我可以查询,但我不知道如何。
当前事件管道如下所示。
On Pin Connect
--------------
CreateInstance
Video Renderer类构造函数
CheckMediaType
SetMediaType
- >宽度:100,高度:100
CheckMediaType
CheckMediaType
CheckMediaType
SetMediaType
- >宽度:100,高度:100
在玩
-------
StartStreaming
DoRenderSample
...
。 ..
...
DoRenderSample
停止
-------
Video Renderer类析构函数
由我的源过滤器设置的默认窗口大小为100x100。我能够得到这个引脚连接两次。但在 问题: 本MSDN部分涵盖了详细信息:动态格式更改。 I have a When I use Current event pipeline is like below. Default windows size set by my source filter is 100x100. I'm able to get this on pin connect twice. But after Questions:
This MSDN section covers details: Dynamic Format Changes. 这篇关于自定义DirectShow视频渲染器过滤器 - 动态分辨率更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! StartStreaming
之后,我无法得到 CheckMediaType
和 SetMediaType $ c $再次发生事件。我可以尝试从源代码筛选器中触发它们(这也是我的代码),但自从
Microsoft的Video Renderer
能够自动调整大小 StartStreaming $
li>在流式传输开始之后,我应该如何触发 CheckMediaType
/ SetMediaType
调用?其实 SetMediaType
对我来说是重要的。或者是有另一种方式来查询当前的流解析?
DoRenderSample
?
CheckMediaType
and SetMediaType
并不完全是事件,它们不是自己来的,所以你不能触发它们。你要改变决议吗?你自己像VMR一样延伸步伐吗?或接受来自上游过滤器的分辨率更改?
Custom DirectShow Video Renderer Filter
which has some extended features over Microsoft's Video Renderer Filter
like overlay images. I know I could do the same with a Transform Filter
but I've chosen that way. I also believe, I would face the same problem with a Transform Filter
which I'll describe below.Microsoft's Video Renderer Filter
, it is capable of resizing the window and buffer sizes automatically when stream starts/changes. My filter is capable of doing the same but except, I'm unable to receive events after stream starts. I believe I can query somehow but I don't know how.On Pin Connect
--------------
CreateInstance
Video Renderer Class Constructor
CheckMediaType
SetMediaType
-> Width: 100, Height: 100
CheckMediaType
CheckMediaType
CheckMediaType
SetMediaType
-> Width: 100, Height: 100
On Play
-------
StartStreaming
DoRenderSample
...
...
...
DoRenderSample
On Stop
-------
Video Renderer Class Destructor
StartStreaming
, I'm unable to get CheckMediaType
and SetMediaType
events again. I could try to trigger them from source filter (it's my code as well) but since Microsoft's Video Renderer
is capable of automatically resizing on StartStreaming
, I wanted to have the same feature.
CheckMediaType
/ SetMediaType
calls after streaming starts? Actually SetMediaType
is the important one for me. Or is there another way to query current stream resolution?DoRenderSample
?CheckMediaType
and SetMediaType
are not exactly "events", they don't come up on their own, so you cannot trigger them. Are you going to change resolutions? On your own to extend stride like VMR does? Or accept resolution changes from upstream filter?