Jump to content
  • Advertisement
Sign in to follow this  
Hoover85

Simple video player

This topic is 4358 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How could I make a very simple video player, using Visual Basic with Visual Studio 2005. I also have the DirectX SDK (june) installed. Basicly the only features I need for the player are: - you can define in code, where the sourcefile is loaded (.avi?) - play, stop, pause I tried to google some tutorials, but most of the good ones were for C#, but I really need it in Visual Basic. I read somewhere, that it could be done with DirectShow or with AudioVideoPlayback, but I understood that DirectShow is more simple? Is it possibly to draw the video on Surface, like a normal picture from file? [Edited by - Hoover85 on June 16, 2006 4:55:20 AM]

Share this post


Link to post
Share on other sites
Advertisement
I don't have to use, if it makes things harder. Got any tutorials for this job? I couldn't find one after hours of search...

Share this post


Link to post
Share on other sites
Nope but if you specify exactly what you want I can write you some code. :) So is it ok just to render to a panel or picturebox or something?

Share this post


Link to post
Share on other sites
Well, the thing I really want right now, is to just have a video playing in full screen mode behind the scene. After that, I'm going to put some graphics on it. The video is supposed to work like a backgroundimage. :)

Share this post


Link to post
Share on other sites
Ah well as a matter of fact I have a solution to that (doing the exact same thing in my own game! :) )... but I'm having huge problems when resetting the device/when the device is lost. I'll be happy to send you the library I wrote but it's not going to work after the device is lost (ctrl+alt+del, alt+tab out, screensaver, etc.).

Share this post


Link to post
Share on other sites
That's nice! :)
I'd be very happy, if you could show me some examples. You can see my e-mail address from my forum profile.

Share this post


Link to post
Share on other sites
Sorry, but I can't seem to find your email on your profile :/ Maybe I'm just not looking in the right place...maybe you could just post it spam-proof here.

Share this post


Link to post
Share on other sites
Alrighty. :)
I guess there is some setting turned on in my profile that hides it, but here goes: [removed]

[Edited by - Hoover85 on June 20, 2006 12:58:55 AM]

Share this post


Link to post
Share on other sites
Hmm... I'we been testing this video drawing for a while now, and it seems that the easiest way to do it, is simply do following:

Dim testVideo As Video
Dim strVideoFile As String

'Assign the videopath
strVideoFile = "Test.wmv"
testVideo = Video.FromFile(strVideoFile)

'Then we just play the video
testVideo.Play()

The problem I now have, is that the video is automatically drawn into a new separate form. I need to be able to draw the video into an existing one. Is it even possible to draw it just like a normal picture, as shown below?

ssurface.DrawFast(xCoord, yCoord, picSurface, DrawFastFlags.SourceColorKey)

I think that I should somehow put the video into a surface, so I can put it to a other surface, just like I did with the picture. Or am I totally out of the track? :D

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!