Why is Video so messed up?

rifter1818

Junior Contributor
Joined
Sep 11, 2003
Messages
255
Location
A cold dark place
I finnally got video rendering to texture FINNALLY but it only works in windowed mode, as soon as i go to full screen it only renders the first frame and then stops ?! Please help
Visual Basic:
        Public Sub PlayVideo(ByVal video As Dx9.Video)
            Try
            AddHandler video.TextureReadyToRender, AddressOf RenderVideo
            VBVid = New VertexBuffer(GetType(CustomVertex.TransformedTextured), 4, Me.device, 0, CustomVertex.TransformedTextured.Format, Pool.Default)
            Dim Verts As CustomVertex.TransformedTextured() = DirectCast(VBVid.Lock(0, 0), CustomVertex.TransformedTextured())
            With Verts(0)
                .X = 0
                .Y = 0
                .Z = 0
                .Rhw = 1
                .Tu = 0
                .Tv = 0
            End With
            With Verts(1)
                .X = device.DisplayMode.Width
                .Y = 0
                .Z = 0
                .Rhw = 1
                .Tu = 1
                .Tv = 0
            End With
            With Verts(2)
                .X = 0
                .Y = device.DisplayMode.Height
                .Z = 0
                .Rhw = 1
                .Tu = 0
                .Tv = 1
            End With
            With Verts(3)
                .X = device.DisplayMode.Width
                .Y = device.DisplayMode.Height
                .Z = 0
                .Rhw = 1
                .Tu = 1
                .Tv = 1
            End With
            VBVid.Unlock()
                video.RenderToTexture(device)
            Catch ex As Exception
                Debug.WriteLine(ex.ToString)
                LastException = ex
            End Try
        End Sub
        Private Sub RenderVideo(ByVal sender As Object, ByVal e As TextureRenderEventArgs)
            Clear(System.Drawing.Color.Black)
            BeginScene()
            device.SetStreamSource(0, VBVid, 0)
            device.VertexFormat = VBVid.Description.VertexFormat
            device.SetTexture(0, e.Texture)
            device.DrawPrimitives(PrimitiveType.TriangleStrip, 0, 2)
            EndScene()
            Present()
        End Sub
All this is inside my D3D class which has a working initialised device, Note that it worked in Windowed mode, the DX9.video currently is just an audiovideoplayback.video (or whatever the basic dx video is) there is outside of the class another addhandler for video.ending that starts the gameloop (as this is the intro movie that im trying to get to work.
 
are u using the correct references

use the 900 references for ALL DX .. in ur project

reason so MS tried to be i dunno ... ****????**
the summer update 9.0B (901 references) does not contain support for hte video hence that could be a reason y ur video is not able to work properly only the 9.0A SDK works.. n now u can no longer dl it..

its not ur code i guess.

but den again if u revert to 900 there wld be a lot of problems in ur code.. sooner or later..

Hope MS comes out with the 901 reference for video...
 
it may work only its not a 100% full gurantee..
esp the font class n some other stuff..

but if u compile all under 900 and no probs running tada u have video
 
umm

I just looked through my refrences and there is only a 900 build for audio video playback there is not 1901 build?! still doesnt work though!? and now im getting the No instance of the object in an unknown module error which is annoying (theres allready a post on fixing this here i just have to find it so dont reply to that error just video on this post please)
 
fwah..

ya MS decided to take out the audio video .. in summer update seriously dun ask me.. y i also would like to know y 2.

cos 900 video reference is incompatiable with 901 references of DX hence ur error.. i guess
 
What is now Really Confussing

Ive just found out (i cant believe i didnt relise this) that i was using the 900 build for everything and getting that problem? Ive tried to use the 1901 build but im having trouble just getting it to initialize, ill frig with the 1901 build latter.
 
Back
Top