|
Post by matthew on Apr 8, 2009 17:45:47 GMT -5
This is v1.0 of Basic4MP, which is a little media player plugin for Basic4GL. It includes a short funny WMV video that asmodeus might have seen before. Download from here. (2.15 MB)
|
|
|
Post by programming on Apr 8, 2009 19:48:56 GMT -5
very nice, next you could add play pause stop buttons, etc.... btw the video is funny
|
|
|
Post by matthew on Apr 8, 2009 22:04:20 GMT -5
At the moment I'm adding features so you'll be able to jump forward, backward & stop by entering commands into Basic4GL, kind of like a video scripting engine I suppose but I'll look into adding buttons onto the player itself.
|
|
|
Post by crazynate on Apr 8, 2009 22:39:13 GMT -5
could you make it where you can play the video in the same window as the exe PlayVideo("Play .\Videos\Fireworks.wmv",samewindow) samewindow is true/false also can you make it where you can set the videos position and its scaling example: dim video video=PlayVideo("Play .\Videos\Fireworks.wmv",true) controlvideo(video) videosetscaling(640,320) videopos(32,30)
The example,if you were to edit the plugin in such a way, would play the video in the same window as the rest of program and the controlvideo(videoname) would act like bindsprite() and so on. if the video played in the same window, it would be good for videogame cutscenes
|
|
|
Post by programming on Apr 8, 2009 23:08:45 GMT -5
very good ideas crazy nate
|
|
|
Post by matthew on Apr 9, 2009 3:02:50 GMT -5
Thanks for the suggestions nate, I'm currently browsing through the Microsoft documentation to see if I can make any of them possible.
|
|
|
Post by UNDISCLOSED on Apr 9, 2009 4:37:07 GMT -5
it should be like this when you get it sorted: INT LoadVideo(STRING) Loads A video and returns a file handle StreamVideo(STRING) Streams a video from disk, and pauses it on the first frame. PlayVideo(INT,FLOAT,INT) plays the video where the first INT is the handle returned from LoadVideo(), the second FLOAT is audio volume and third INT is windowed true/false. ResizeVideo(INT,INT,INT) Resize video with handle INT to INT*INT pixels (or if its in its own window, resize the window) SetWindowControls(BOOL) Set wether there are controlls for the video when its in windowed mode. BOOL WindowControls() get wether there are controlls for the video when its in windowed mode. INT VideoXSize(INT) INT VideoYSize(INT) get the size of the video INT, if there is no arguments, the video bing streamed is used. And then all of these: 4MP_Pause(INT) 4MP_Play(INT) 4MP_Speed(INT) 4MP_Tint(FLOAT) 4MP_Alpha(FLOAT) 4MP_ZOrder(INT) 4MP_Stop(INT) 4MP_Delete(INT) 4MP_DeleteStream() 4MP_Volume(INT,FLOAT) (Chanel: 0 = master, 1 = left, 2 = right) and thats it. Could be useful for cutscenes and media players. if you make it
|
|
|
Post by soulbreaker on Apr 9, 2009 9:09:32 GMT -5
matthew , how to make Basic4gl Media Player ? Any codes ?
|
|
|
Post by dw817 on Apr 21, 2009 19:26:05 GMT -5
Whoa, bad boy. Ran the program, video started playing. Clicked closebox on the video, computer hung, minus mouse cursor. Brought up task manager to delete task. Problem ? If I was going to use this, would need it for MIDI, so it would also have to have ability to return playing position in MIDI so I could restart playing a song once it completed.
|
|
|
Post by matthew on Apr 21, 2009 20:55:06 GMT -5
Not really, I never implemented any features to stop or close down the player.
|
|
|
Post by dw817 on Apr 21, 2009 21:26:59 GMT -5
Using a tried and true player might be better. You can do one without MCI$ and all the functions and features of the Windows Media Player for a demo video here: basic4gl.proboards.com/index.cgi?board=B4glhelp&action=display&thread=2791&page=1Mind you, WMP needs to have associated itself with WMV, which I think it does by default. I think I wrote a program called booster many years ago for early B4GL. I have since lost the sourcecode, however, I remember the process, similar to IXTO, so can rewrite it to get my darned MIDI music and to couch (install and hide) those two infernal sound DLLs.
|
|
|
Post by crazynate on May 4, 2009 16:12:55 GMT -5
Im waiting for you to get the plugin to play video in the same window so i can get further on making my rpg
|
|
|
Post by matthew on May 4, 2009 16:34:47 GMT -5
Im waiting for you to get the plugin to play video in the same window so i can get further on making my rpg Lol, I only created this plugin because zack kept requesting it but he never commented on it & hasn't used the forum for about a month. I've kind of lost interest in updating it but I could upload the Code::Blocks project if you want to continue it's development?
|
|
|
Post by crazynate on May 4, 2009 17:06:01 GMT -5
I would like that, but there's two major issues 1) even when i load someone's dll project on codeblocks or visual studio 2003 their's a build error 2) im not that great with c++
|
|
|
Post by matthew on May 4, 2009 17:35:05 GMT -5
Have you ever used the Dev-C++ IDE? I used to use it a few years ago, it's a lot easier for beginners to use. It would be quite simple for me to create a Dev-C++ project from the Code::Blocks project & upload it. Don't worry most of the people on the forum aren't either, a lot of the actual C++ programs that people upload (including my own) don't use Classes, Inheritence or Polymorphism so they could easily be written in C & anyway when you're creating a plugin most of the hard work has already been done for you.
|
|