U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » U++ Developers corner » U++ video control to come soon
U++ video control to come soon [message #26747] Tue, 25 May 2010 16:30 Go to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello all

I am happy to announce the first run of the first pre-alpha version Smile of a new video player control.

The video and audio plays ok in an U++ application.

If everything goes right in few months the multiplatform video and audio playing control derived from DHCtrl will be released.

If some Windows user cannot wait, in few days a nice VLC player control derived from DHCtrl will be released.

Both controls will need almost no code to be run and can be handled in the layout designer.


Best regards
Iñaki
Re: U++ video control to come soon [message #26750 is a reply to message #26747] Tue, 25 May 2010 19:37 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1367
Registered: November 2005
Location: Poland
Ultimate Contributor

koldo wrote on Tue, 25 May 2010 10:30

Hello all

I am happy to announce the first run of the first pre-alpha version Smile of a new video player control.


That's a great news. I would really like to add video playing to my player Smile
icon6.gif  Re: U++ video control to come soon [message #26751 is a reply to message #26750] Tue, 25 May 2010 19:47 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 740
Registered: November 2008
Location: France
Contributor
Great Koldo !

You are definilty a big contributor to UPP. Thumbs Up
Re: U++ video control to come soon [message #28881 is a reply to message #26751] Wed, 22 September 2010 17:50 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello Mirek and Max

MediaPlayer control is closer now. However I need your advice.

This is a nice screenshot showing the problem.

index.php?t=getfile&id=2829&private=0

SDLCtrl is a DHCtrl that has a special feature: it is possible to maintain the aspect ratio. The problem is that not all the control has to be filled with the window.

In the video image you see that the video does not cover all control: the upper and lower gray bands are part of the control but not part of the window.

Is this a good feature for DHCtrl or I try another shortcut?
  • Attachment: scr.JPG
    (Size: 335.61KB, Downloaded 1439 times)


Best regards
Iñaki
Re: U++ video control to come soon [message #28882 is a reply to message #28881] Wed, 22 September 2010 18:40 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Delete it.

I will change the class to use the shortcut -a control that has a DHCtrl inside and resizes it to maintain its aspect-


Best regards
Iñaki
Re: U++ video control to come soon [message #28886 is a reply to message #28882] Thu, 23 September 2010 13:54 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
koldo wrote on Wed, 22 September 2010 18:40

Delete it.

I will change the class to use the shortcut -a control that has a DHCtrl inside and resizes it to maintain its aspect-

It works Smile.

I will test it in Linux.


Best regards
Iñaki
Re: U++ video control to come soon [message #28887 is a reply to message #28886] Thu, 23 September 2010 17:02 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1310
Registered: September 2007
Ultimate Contributor
Nice work, Koldo Smile

Max
Re: U++ video control to come soon [message #28891 is a reply to message #28887] Fri, 24 September 2010 08:47 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
mdelfede wrote on Thu, 23 September 2010 17:02

Nice work, Koldo Smile

Max


Oh no!, it is from Pixar Smile.

(Downloaded from Youtube Twisted Evil)


Best regards
Iñaki
Re: U++ video control to come soon [message #28893 is a reply to message #28891] Fri, 24 September 2010 10:15 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1310
Registered: September 2007
Ultimate Contributor
HEHEHEHEHEHE

I was thinking to hire you for a remake of Avatar Smile

Max
Re: U++ video control to come soon [message #28897 is a reply to message #28893] Fri, 24 September 2010 14:20 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Wink

Best regards
Iñaki
Re: U++ video control to come soon [message #28924 is a reply to message #28886] Mon, 27 September 2010 15:46 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
koldo wrote on Thu, 23 September 2010 13:54

koldo wrote on Wed, 22 September 2010 18:40

Delete it.

I will change the class to use the shortcut -a control that has a DHCtrl inside and resizes it to maintain its aspect-

It works Smile.

I will test it in Linux.

It runs too Smile (thanks Honza for your support)

With this help it could be included in U++ soon...


Best regards
Iñaki
Re: U++ video control to come soon [message #29101 is a reply to message #28924] Tue, 05 October 2010 08:20 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
In a month the audio and video player control will be ready.

It would include some sweet cookies Smile.


Best regards
Iñaki
Re: U++ video control to come soon [message #29309 is a reply to message #29101] Fri, 15 October 2010 08:37 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

koldo wrote on Tue, 05 October 2010 09:20

In a month the audio and video player control will be ready.

It would include some sweet cookies Smile.

Hello Koldo,

Have you added this package in bazaar. I'm interested to test!

Thank you in advance,
Ion Lupascu(tojocky).
Re: U++ video control to come soon [message #29310 is a reply to message #29309] Fri, 15 October 2010 09:51 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
tojocky wrote on Fri, 15 October 2010 08:37

koldo wrote on Tue, 05 October 2010 09:20

In a month the audio and video player control will be ready.

It would include some sweet cookies Smile.

Hello Koldo,

Have you added this package in bazaar. I'm interested to test!

Thank you in advance,
Ion Lupascu(tojocky).

Thank you Ion Smile

Today is not ready to be uploaded as interface will change.

In fact that is now the critical point (+ playing sound in mobile phone videos Sad).


Best regards
Iñaki
Re: U++ video control to come soon [message #29320 is a reply to message #29310] Fri, 15 October 2010 13:16 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

koldo wrote on Fri, 15 October 2010 10:51


Thank you Ion Smile

Today is not ready to be uploaded as interface will change.

In fact that is now the critical point (+ playing sound in mobile phone videos Sad).


If you need help in testing and development I can do this.
Re: U++ video control to come soon [message #29584 is a reply to message #29320] Mon, 01 November 2010 22:28 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello all

Just an status for your info.

Well, many problems and difficulties..., many. Crying or Very Sad

Control was almost ready but I have had problems with sound decoding impossible to be solved, so I had to change the focus.

Now I work very centered in the ffplay and ffmpeg experience. ffmpeg is simpler but ffplay is complex using SDL threads and timers.

Well, I hope to have the control ready in alpha state this month.


Best regards
Iñaki
Re: U++ video control to come soon [message #29909 is a reply to message #29584] Mon, 29 November 2010 15:00 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 332
Registered: July 2009
Senior Member
koldo wrote on Mon, 01 November 2010 22:28

Just an status for your info.


Hi Koldo,

What is the status of your player? Can you post some code examples?
Re: U++ video control to come soon [message #29910 is a reply to message #29909] Mon, 29 November 2010 16:56 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello Zbych

This is the status:

All code has been almost completely redone. Now it is really a refurbished ffplay adapted to SDLCtrl without gotos, static and global vars, and many additions.

MediaPlayer control now loads, plays and pauses all tested audio and video file types Smile.

To be done:
- Video and audio channels check
- Video speed changes sometimes after stop and pause
- Callback functions (WhenFrame, WhenSecond) and other useful methods to be more "programmer friendly".


Best regards
Iñaki
Re: U++ video control to come soon [message #29918 is a reply to message #29910] Tue, 30 November 2010 08:50 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 332
Registered: July 2009
Senior Member
Can you publish this "preliminary" version?
Re: U++ video control to come soon [message #29922 is a reply to message #29918] Tue, 30 November 2010 11:17 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Zbych wrote on Tue, 30 November 2010 08:50

Can you publish this "preliminary" version?

Uuuf, I would do it only if somebody would have a really urgent need. The code is changing so much that most of the testing effort would not be useful.


Best regards
Iñaki
Re: U++ video control to come soon [message #29987 is a reply to message #29922] Thu, 02 December 2010 11:13 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
koldo wrote on Tue, 30 November 2010 05:17

Zbych wrote on Tue, 30 November 2010 08:50

Can you publish this "preliminary" version?

Uuuf, I would do it only if somebody would have a really urgent need. The code is changing so much that most of the testing effort would not be useful.


Well, perhaps you might need some help with that... Puttin code to Bazaar (or, if you do not feel like that, to uppdev) would expose it to more eyes, correct?
Re: U++ video control to come soon [message #29992 is a reply to message #29987] Thu, 02 December 2010 12:08 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
luzr wrote on Thu, 02 December 2010 11:13

koldo wrote on Tue, 30 November 2010 05:17

Zbych wrote on Tue, 30 November 2010 08:50

Can you publish this "preliminary" version?

Uuuf, I would do it only if somebody would have a really urgent need. The code is changing so much that most of the testing effort would not be useful.


Well, perhaps you might need some help with that... Puttin code to Bazaar (or, if you do not feel like that, to uppdev) would expose it to more eyes, correct?


Hello Mirek

Weeks ago MediaPLayer had an important crisis... However now coding goes fast, so in few time it will be uploaded to Bazaar.

Meanwhile SDLCtrl can be checked. All feedback is acknowledged.


Best regards
Iñaki
Re: U++ video control to come soon [message #32137 is a reply to message #29992] Tue, 26 April 2011 23:06 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
Hi Koldo,

i've been tackling the SDL compile issue.. the one with WinMain reference hack. found it to work in SDLExample in examples, just check it out. it does not need the WinMain() { return main(); } hack anymore.

i thought it might be a good way to do the same for SDL package. tried it but MSC version crashes during compile in release mode. debug mode works fine. i did not dare to commit such stuff so i give it out here, maybe we can finally find the reason why ide crashes when compile.

there is also a compile.txt on the environment howto setup, which i used in my case.

EDIT: have tested it again, seems to compile without crash. kinda weired. so maybe this can be commited..
  • Attachment: SDL.rar
    (Size: 43.08KB, Downloaded 318 times)

[Updated on: Wed, 27 April 2011 13:40]

Report message to a moderator

Re: U++ video control to come soon [message #32148 is a reply to message #32137] Thu, 28 April 2011 10:14 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello Konstantin

Preparing SDL package was a bad experience for me.

Finally to put the things simple to programmers, I decided to prepare an special package for U++ in Windows. It is explained here. With this setup MSC and MinGW compiling has to be very easy and simple.

What are the problems you find with actual package?


Best regards
Iñaki
Re: U++ video control to come soon [message #32150 is a reply to message #32148] Thu, 28 April 2011 10:32 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
my problem was to get through all that dll mess, and make it compilable both mingw and msc, both static and shared. while mingw worked out pretty fine msc only provides for shared linkage.

thats why i enhanced the install instructions inside, to point to some pain generators. tried to touch as little as possible with the provided sdl packages, so user does not have to bother there.
i think my instructions are more straight forward in this way. this is actually like i install other libs in upp as well.

as of pain generators, especially the #define main SDL_main issue was boggling me. but still, the sdl guys have reasons for it (since one can specify some commandline goodies to SDL apps) which will be processed by the own main in SDLmain. so i tried to make this work too, without the need to #undef main. now it kinda works.

i noticed that MSC compilation first was making trouble, when using blitz in optimal. but this is known issue. but disabling blitz crashed the ide during compile. and couldnt figure out why. but now it works. maybe there was some recompile problems. could you check that package if the errors occure with you as well?
just msc shared, debug with blitz and optimal without.

i didnt want to mess up things from others. so it's up to you to take that one. but i think it's bit better in terms of installations and handling. more sdl native.
Re: U++ video control to come soon [message #32151 is a reply to message #32150] Thu, 28 April 2011 11:22 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello Konstantin

I have found problems in DrawPixel() and GetPixelPos() that avoid to compile in MinGW-Speed only. They are now solved and will be uploaded today.

With this, without any change, package works well for MSC and MINGW, Debug and Speed.

SDL official binaries/prebuilt packages AFAIK come only for shared. Anyway I have not done any effort in compiling statically (although original SDL is supplied with MSC project files to compile it statically) because the shared one is the more general focus (SDL is LGPL).

As I have indicated before, there is a compilation in https://sourceforge.net/projects/upp/files/GPL-sources/SDL%2 0plugin_LGPL.7z/download just to avoid any problem to U++ programmers.

Of course, forget about SDL_main or libSDLmain.a.


Best regards
Iñaki

[Updated on: Thu, 28 April 2011 11:24]

Report message to a moderator

Re: U++ video control to come soon [message #32153 is a reply to message #32151] Thu, 28 April 2011 11:59 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
which package are we talkin about? Smile the one with my changes?

Of course, forget about SDL_main or libSDLmain.a.

why do you want to spare this out? i think it's got its due.
thats why i wanted to have an installation with least instrusion into sdl original packages..

so you do plan to keep your bazaar/SDL package as is? just to make up my mind..

[Updated on: Thu, 28 April 2011 12:00]

Report message to a moderator

Re: U++ video control to come soon [message #32156 is a reply to message #32153] Thu, 28 April 2011 13:57 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello Konstantin

I preferred to be intrusive with original packages because they are a nightmare for U++ programmers.

With the rebuilt package a programmer will have the demo up and running in less than 5 minutes.

SDL project does releases very slowly. Actual 1.2.14 was released 18 months ago.

However if you find a way - very simple for an U++ beginner - to use original SSL packages, I will be interested Smile.



Best regards
Iñaki
Re: U++ video control to come soon [message #32158 is a reply to message #32156] Thu, 28 April 2011 14:35 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
well, basicly its downloading the 2 original devel archives from SDL page and placing them in say C:\, 2 because mingw and msc.. if one uses one of em only, well it's one. editing build methods to point to the location and done..

that's what inside the SDL package i posted. it's actually as easy as your package, but the sdl stuff remains untouched.

if you're alright with it i can commit it.. or you can, if you prefer.

the installer instructions are in the package as well.
here for short.

Quote:


Medium

Linux
install the SDL 1.2.x package of your distro, dont forget to install the SDL-devel package for headers.

Windows
download binaries / prebuilt packages for msc and mingw
(http://www.libsdl.org/download-1.2.php)

http://www.libsdl.org/release/SDL-devel-1.2.14-VC8.zip
http://www.libsdl.org/release/SDL-devel-1.2.14-mingw32.tar.g z

unzip the stuff into 2 separate locations, e.g

C:\SDL-devel-1.2.14-VC8\SDL-1.2.14
C:\SDL-devel-1.2.14-mingw32\SDL-1.2.14

the build methods need to access those respective folders

MSC build method, add to

PATH: C:\SDL-devel-1.2.14-VC8\SDL-1.2.14\lib
INCLUDE: C:\SDL-devel-1.2.14-VC8\SDL-1.2.14\include
LIB: C:\SDL-devel-1.2.14-VC8\SDL-1.2.14\lib

MINGW/TDMGCC build method, add to

PATH: C:\SDL-devel-1.2.14-mingw32\SDL-1.2.14\lib
C:\SDL-devel-1.2.14-mingw32\SDL-1.2.14\bin
INCLUDE: C:\SDL-devel-1.2.14-mingw32\SDL-1.2.14\include
LIB: C:\SDL-devel-1.2.14-mingw32\SDL-1.2.14\lib
C:\SDL-devel-1.2.14-mingw32\SDL-1.2.14\bin

the MSC libraries only come in shared linkage flavor, while the mingw flavor can be linked both shared and staticly.
the mingw SDL.dll.a is needed for static linkage and has got that weired name. who knows why. the SDL.dll comes in bin folder, thats why double folder specification is needed fir MINGW build method

the WinMain@16 compile problem for mingw (google for it) makes the change of lib link order obligatory, thats why mingw32 is specified explicitly last. this makes the
WINAPI WinMain(...) { return main(); }
hack obsolete and enables the native usage of SDL means to handle entry point. because SDL redefines your own main to be SDL_main (see SDL.h), and provides own main, the signature is critical.it must be (which in Upp is matched as well)
int main(int argc, char* argv[]);
so no need to take care of that

Re: U++ video control to come soon [message #32937 is a reply to message #32158] Wed, 22 June 2011 15:03 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i've seen that you have updated the SDL doc, so i just tested it again with non-intusive, means withouth the #undef main hack. and it works quite fine, but needs a bit more setup in the upp file. so here they come. i think it is better to have as little changes as possbile. esp. in SDL case, where the runtime will check for some environment variables in it's own main.

if you're ok with it, just commit.

cheers

PS: some helpful links

See:
http://www.digitalmars.com/d/archives/digitalmars/D/12078.ht ml
http://msdn.microsoft.com/en-us/library/aa267384(v=vs.60).aspx
  • Attachment: SDL.rar
    (Size: 0.57KB, Downloaded 360 times)

[Updated on: Wed, 22 June 2011 15:04]

Report message to a moderator

Re: U++ video control to come soon [message #32940 is a reply to message #32937] Wed, 22 June 2011 23:32 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello kohait

Have you tested successfully the changes with Gcc, MinGW and MSC, compiling in Debug and Speed mode?

If yes, you can upload it.

I suffered SDLMain once. It is enough Smile.


Best regards
Iñaki
Re: U++ video control to come soon [message #32941 is a reply to message #32940] Wed, 22 June 2011 23:58 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
tested with tdmgcc and msc, both debug and optimal, speed not yet.
will test it tomorrow with gcc under linux.

yes, SDL is weired.. had to deal with it in my thesis some years ago, was a nightmare..
Previous Topic: Testing framework in U++.
Next Topic: Porting Upp to SDL first ? (cause of MacOSX & framebuffer)
Goto Forum:
  


Current Time: Wed Apr 29 06:52:41 GMT+2 2026

Total time taken to generate the page: 0.01594 seconds