Display active window for video in custom allocator - directx

I am displaying video over panel using custom allocator sample, for some file it play video on some active window and this show separately . how can i avoid this unwanted window to be open.

Usually then video is played in ActiveMovie window when the decoder and renderer could not agree on the connection, so graph builder is using default renderer (if you are automatically constructing your graph by executing RenderFile method), which is played separately. Check your code in InitializeDevice method of your allocator, if InitializeDevice always failing then your video will be rendered in default renderer.
Make sure you are using VMR9Mode_Renderless mode. And if you are not using any mixing in VMR7/9 I suggest removing any calls to the SetNumberOfStreams method, it makes things simplier.
Quite good example of custom allocator usage can be found here.

What do you mean? When you start playing the file it opens a window that contains the actual video?
If so you probably want to investigate the Video Mixing Render filter. You can create your own custom allocator that allows you to intercept the present call which will then allow you to draw the video wherever, and however, you want.
Or, and personally i think this is easier, you want to investigate the dump filter example and then use that to build your own renderer. That way when you receive the frame you can do whatever you like with it without faffing about with internals. Its very simple writing filters if you don't want them to be available outside of your application.
Edit: Have you QueryInterfaced the IVMRFilterConfig9 interface and SetRenderingMode to VMR9Mode_Windowless?

Related

Who calls Present() (if anyone) when using Steam's OpenVR?

I'm new with both directx and openvr, and trying to wrap my head around how the OpenVR compositor API works. The docs call for rendering each eye and handing each one to the compositor via Submit(). But I'm a bit confused about how Present() factors in to this flow. I expected to need to call Present() to render each eye, but from examining some existing VR games, this doesn't happen. Present is called to render any view on the main (non-VR) monitor, but is not called at all for the stuff drawn by the compositor.
Does somebody else call Present() or something lower-level?
Present is to display in a traditional swap chain in a window on your screen. Because with VR, you use an alternative mechanisum and API to present the image to the HMD, you do not need a Present at all.
You only need one if you want to display a copy or anything else on the monitor along side the hmd.

Ghost effect using Open GLES

I am working with a sample application like vine. My requirement is that I have to create a 'ghost' filter for video as in vine.
Actual requirement is
-Record a video on long press on the view
-On pause of record, I need to show the last frame of the recorded video above my view. Please see the expected working here
I have checked PBJVision library and found this feature working. But I need to implement this feature separately in my application.
While analysing the code, I found that this can be achieved using Open GLES. I have tried using a GLKView but it just shows a dark shade instead of image frame. Since I am new in this area, please help me.

Using flash inside a native iOS app

I'm working on a native Objective-C iOS app and I'm wondering if it is possible to embed an animation created in Flash into my app. The animation doesn't have to be interactive, all I need is a couple of animated screens (intro screen, loading screen). Is this posible?
Maybe the long way around since it doesn't sound like you need a Flash-heavy type app but I have seen a few Flash-toCocoa2D exporters around. I haven't got around to trying them yet but they look useful. Of course you probably have to be using the Cocoa2D frame work to use them - unless there is an easy way to extract + repurpose that relevant code from the Cocoa2D source.
Anyway, probably overkill for what you need but here are some links:
http://dl.dropbox.com/u/514219/FlashToCocos2dAnimation.zip
VID of it in action:
http://www.youtube.com/watch?v=8ZyqGrdkTtM
Another tool:
http://marshgames.com/swftoxml-and-importing-flash-scenes-into-cocos2d-on-iphone/
Nope...Apple will reject any app that uses flash
you could use video player for intro screen (i've seen it on a few apps) or simple picture animation using UIView animation methods
here is a tutorial

iOS: Can the UIImagePickerController Default UI be modified?

I am working with a small camera app for a client and I have now finished all functionality of it. In the standard camera controls i need to modify one thing , the cancel button should say gallery instead.
But unless i am missing something i will need to remove the overlay by setting showsCameraControls to NO and then building my entire overlayView from scratch.
I have found this solution but I am afraid to go this route due to the warning in the beginning of the post.
So is there any valid way of doing simple small modifications to the existing camera overlay control UI or do you have to build it from scratch if you need to change one tiiiiiiny thing?
Unfortunately, having been in this situation I can safely say you need to build the controls from scratch. You really only have two options: create your own camera overlay, or use the default one.
Now, you could use the techniques described in the link you cite, and iterate through the various subviews and modify them 'blind'. The rather large danger with this is every time Apple change the internal structure of the image picker it could potentially break your solution. So I'd definitely stay clear of it.

How do I Resize entire screen?

I want to be able to re size everything that is displayed - taskbar, windows, desktop - everything and put it in a border. What is the best way to accomplish this? I'm thinking DirectX, but I am not that familiar with it. I'm not sure what technologies would accomplish this, but I bet it would have to be rather low level.
DirectX has its own API's, but if you want to change the taskbar and desktop, I rather think you have to go for the Windows API.
The direct API call to use is ChangeDisplaySettings() or ChangeDisplaySettingsEx(), but you need to get a filled-in DEVMODE structure to use it properly. DEVMODE is a beast. You're going to need to fill it using EnumDisplaySettings(), identify which display is your main screen, and fiddle with the dmBitsPerPel, dmPelWidth, and dmEplHeight members. Not every possible setting is supported: I think DeviceCapabilities() can tell you that... this should get you started.
You haven't told us explicitly that it's Windows you're after, nor in what language you're working.

Resources