DirectX (9) Video Renderer
-
Hey folks, I'm trying to write a video (multimedia) application. What I want is two video objects running video clips. Once the first one stops, the other fades in and than back. I want to render the video images on a surface, but I'm having problems converting the video image to a Texture. I Have an IVMRWindowlessControl9 (called windowlessCtrl) which is (obviously) my Video Mixing Renderer. Using the GetCurrentImage function, I'll be able to get a pointer to the current video image in memory.
windowlessCtrl.GetCurrentImage(out currentImage);
Now I need to convert the currentImage pointer (IntPtr) to a texture in order to render the image. Can anybody help me? Thanks!.: I love it when a plan comes together :. http://www.zonderpunt.nl
-
Hey folks, I'm trying to write a video (multimedia) application. What I want is two video objects running video clips. Once the first one stops, the other fades in and than back. I want to render the video images on a surface, but I'm having problems converting the video image to a Texture. I Have an IVMRWindowlessControl9 (called windowlessCtrl) which is (obviously) my Video Mixing Renderer. Using the GetCurrentImage function, I'll be able to get a pointer to the current video image in memory.
windowlessCtrl.GetCurrentImage(out currentImage);
Now I need to convert the currentImage pointer (IntPtr) to a texture in order to render the image. Can anybody help me? Thanks!.: I love it when a plan comes together :. http://www.zonderpunt.nl
1st Check that the currentImage is not null currentImage != IntPtr.Zero and then BitmapInfoHeader bih = (BitmapInfoHeader)Marshal.PtrToStructure(currentImage , typeof(BitmapInfoHeader)); take care it depends of your pin, insure that your media type is a set to video and the output format is a video type.
-
1st Check that the currentImage is not null currentImage != IntPtr.Zero and then BitmapInfoHeader bih = (BitmapInfoHeader)Marshal.PtrToStructure(currentImage , typeof(BitmapInfoHeader)); take care it depends of your pin, insure that your media type is a set to video and the output format is a video type.
You for president!
.: I love it when a plan comes together :. http://www.zonderpunt.nl