As I wrote before, I'm implementing a MFT that among other things also performs scaling.
SO, now, with the RC1 it looks like the format change passes correctly and I get renegotiation over the media type in the MFT.
On the other hand, on the player it doesn't seems to affect.
When I use IMFVideoDisplayControl::GetNativeVideoSize(), the size is the same as it was when I created the topology, though, since the type was changed in the MFT I see a small part of the scaled video on the same size of video window.
Is it possible to change the size (the media type) of the renderer dynamically or should I recreate the topology and if I should, how (from the beginning )
Thanks!!
Haim

Dynamic change of media type in an existing topology
Deepak Goyal
I think I am.
I'm testing it on a 320x240 sample movie.
In the MFT I get 640x480 as the size in the SetOutputType() call, but in the player I always get 320x240 when I call GetNativeVideoSize().
If I'm using that 320x240 dimensions to call SetVideoPosition() I get a small window with a quarter of the scaled frame, if I'm setting 640x480 as the size in SetVideoPosition() I get the same quarter of frame stretched to the big frame size.
So, I think that the problem is that I get 320x240 as a result of a GetNativeVideoSize() call, so I thought maybe I missed something at the MFT when I changed the size of the frame, and maybe the solution is not in the player but in the MFT.
Thanks!!
abousoft
Hi Haim,
It actually sounds like the renderer is getting the new output type, but that the window needs to be resized. If you do a manual resize of the window to the new dimensions, I'd expect things to work.
The only caveat -- and this is a known shortcoming in MF v1 -- is that we don't have a built-in mechanism for letting the application know that the window needs to be resized. So unfortunately, for v1, you'll need to have a workaround for detecting this and doing the resize. The simplest way I can think of (though it's a bit hacky, and the timing will be a couple frames off) would just be some kind of back-channel from the MFT at which the format change originates to the application. I'll let you know if anything smarter comes to mind.
WhitebearJPN
I'm talking about doing something like this: Call IMFVideoDisplayControl::GetNativeVideoSize and then IMFVideoDisplayControl::SetVideoPosition( NULL, prcDest ), where prcDest is based on the results of GetNativeVideoSize. Is that what you're doing, and you still don't see the whole thing
Meaning Of Lights
Hi
Thanks for your answer.
I checked what you asked, and indeed the renderer returns the same (original) size even when I'm setting the scale factor before creating the topology.
So, I'll start a little earlier:
How should I notify the renderer about scaling
My assumption was that by answering the GetOutputAvailableType with the new dimensions I can notify the renderer about the new scale. Was I wrong
In addition, it seemed like the MF infrastructure accepted my new dimensions, since the consequential SetOutputType was with the dimensions I specified.
Thanks!
Haim
HbH
An update on this: We did succeed in reproducing this issue. Indeed, the EVR was not picking up the new video size because of a bug. This bug has been fixed, and you should start seeing the correct size reflected in GetNativeVideoSize with newer drops of Vista.
Thanks for reporting the bug!
Becky
Alex1st
Hi Haim,
MF does actually take your scaler MFT's new media type and sets it on the video renderer.
The first thing to watch out for is to make sure that the new media type from your MFT is correctly specifying what you want to display. I would test this by trying to play some content where that new media type is just your MFT's output type up-front. In other words, eliminate the fact that you're doing a dynamic change. Do you see the right stuff
Becky
TiborK
Thanks!
Was it fixed in RC2
Haim
Praveen Dayanithi
kenneth123
After researching a little bit I found out that when I'm using YV12 as the output type, the renderer returns a correct size in the GetNativeSize().
But when I'm using YUY2, the renderer always returns the original size and not the scaled one.
Although using YV12 can be a solution, I would rather resolving the issue for YUY2 as well.
Does this narrows the problem Is there a solution
Thanks!
LegendRey
Hi
I tried to set the size "manually" but it just streched the small part it already showed.
Thanks!