Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: sfeMovie project [v1.0 RC1 available]  (Read 112234 times)

0 Members and 1 Guest are viewing this topic.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #60 on: July 31, 2011, 03:47:25 pm »
Have you got some time to test the sfe-movie dll and see what's wrong with it?

By the way, would be interesting to know if you did something special in order to build the dll, as it doesn't seem to have been that easy for Nexus.

Ceylo
Want to play movies in your SFML application? Check out sfeMovie!

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #61 on: September 02, 2011, 07:16:11 pm »
A quick note for those who would still like to use sfeMovie with a recent version of SFML 2, as the latest sfeMovie commit doesn't work fine :
- download this version : https://github.com/Yalir/sfeMovie/zipball/1c249813dafaae28309512e871054eace14d5d16
- go to src/Movie_video.cpp ligne 40, and set GL_HACK to 1 (instead of 0) then build as usual


I'm a bit busy and can't do more for now.
Want to play movies in your SFML application? Check out sfeMovie!

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #62 on: September 16, 2011, 09:56:02 pm »
A little note to tell you I stop working on sfeMovie for, in order to work on another library: Awl. This library should allow me and others to work with parallel programming much more easily, and sfeMovie will be able to benefit from it. I've indeed been a little bit fed up of all the parallel programming issues I got with sfeMovie.

The repository : https://github.com/Yalir/Awl
A sample with SFML : http://pastebin.com/4SKHyAms
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #63 on: September 17, 2011, 11:59:26 am »
Well, good luck to you! Sounds great! ;-)

I'm wondering, is the paste bin example the definitive syntax (i.e. AwlAsyncBlock/AwlMainThreadBlock and AwlCloseAsyncBlock/AwlCloseMainThreadBlock pairs) or will you (perhaps) change it later ?
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #64 on: September 17, 2011, 12:13:52 pm »
Well.. yeah, I suppose this is the definitive syntax, and I can't find anything better as these are macros and thus need to be written as one word. Would you think of some other syntax ?

Moreover since yesterday there has been some additions and one now has:
AwlAsyncBlock
AwlCloseAsyncBlock
AwlCloseAsyncControlledBlock(taskRef) (gives back a Task object to allow cancelling/killing/waiting)

AwlAsyncCall(function)
AwlAsyncMethod(method, object)

AwlMainThreadBlock
AwlCloseAsyncMainThreadBlock (execute on main thread but don't wait for completion)
AwlCloseMainThreadBlock (execute on main thread and ensure completion before continuing)

AwlMainThreadCall(function)
AwlMainThreadMethod(method, object)

Hopefully I don't think there will be other macros like these, it seems enough to fit any situation.
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #65 on: September 17, 2011, 12:44:08 pm »
Your syntax is not bad - you define a small DSL, that's it. However, if you want to keep the "C-like" syntax maybe the following could be a solution. I don't know exactly if it fits very well, though.



Code: [Select]
#define AwlAsyncBlock(functionBlock) \
{ \
    struct __awl_local_struct \
    { \
        static void __awl_async_block(void) \
        { \
            functionBlock \
        } \
    }; \
    awl::AsyncCall(boost::bind(__awl_local_struct::__awl_async_block)); \
}

:
:

AwlAsyncBlock
(
    tex1.LoadFromFile("big_image1.png");
    :
    :
)


So instead of using accolades you can use parenthesis.
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #66 on: September 17, 2011, 12:56:35 pm »
And no more closing macro needed. I like it. Actually what I would have really loved would be writing the same with { } and no closing macro, for two reasons: to explicitly keep the idea of block, and to ease indentation.

As for the latest point, with { } the block is correctly indented, whereas with ( ) it's indented by one space and the closing parenthesis is not aligned to the opening one. These are details but annoying details for everyday's programming.

But.. I could successfully try the following syntax:
Code: [Select]
AwlAsyncBlock
({
    // some code
})


Which is more interesting than with the close macro. Thanks!
Want to play movies in your SFML application? Check out sfeMovie!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #67 on: September 17, 2011, 02:04:34 pm »
I'm not sure that you can have a ';' inside a macro argument, it would mess up the code parser.

And I strongly encourage you to open a new topic about Awl instead of "polluting" the sfeMovie thread ;)
Laurent Gomila - SFML developer

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #68 on: September 17, 2011, 02:15:42 pm »
Quote from: "Laurent"
I'm not sure that you can have a ';' inside a macro argument, it would mess up the code parser.
Well, I just tested on gcc 4.2 and apple llvm compiler and both compiled the code fine. So apparently it works with these two at least.
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #69 on: September 17, 2011, 02:19:14 pm »
Want to play movies in your SFML application? Check out sfeMovie!

greeniekin

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
sfeMovie project [v1.0 RC1 available]
« Reply #70 on: September 26, 2011, 07:39:34 am »
I am thinking of adding video to a current project I'm working on.

I downloaded the windows binary version, to test it. In my example I used big buck bunny OGG Theora Video, Vorbis stereo sound version.

It is the example code you provided on the wiki.

What I get back in console output is
Quote
[avi @ 00932850]max_analyze_duration reached
Movie_video::Initialize() - could not find any video decoder for this video form
at
Movie_audio::Initialize() - could not find any audio decoder for this audio form
at
[/code]

I then removed  movie.ResizeToFrame(0, 0, 640, 480); for some reason
then i swear i heard sound for a second then the app crashed. every time after this the app crashed even when i changed it back and compiled.


now i get this in console whenever it crashes

Quote


[theora @ 00983aa0]7 bits left in packet 82
    Last message repeated 1 times
[theora @ 00983aa0]Warning, unsupported keyframe coding type?!
    Last message repeated 1 times
[theora @ 00983aa0]Header packet passed to frame decoder, skipping
Movie_video::DecodeFrontFrame() - an error occured while decoding the video fram
e


I will try compile the library from scratch when I get some time and see if I have some better luck. Though if anyone has any insight that would be very helpful.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #71 on: September 26, 2011, 12:26:25 pm »
1. Make sure the video format is really Theora and the audio format is really Vorbis.
2. You can indeed try to build it but if the point is an unsupported video/audio codec, building with the same configuration (ie. enabling only flac, theora and ogg) should produce the same results. You can give it a try with more decoders though.
3. It would be nice if I could get a piece of your video to test it.
4. If you only need Theora and Vorbis support you can have a look at SFMLTheora.
Want to play movies in your SFML application? Check out sfeMovie!

greeniekin

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
sfeMovie project [v1.0 RC1 available]
« Reply #72 on: September 26, 2011, 05:37:09 pm »
Quote from: "Ceylo"
1. Make sure the video format is really Theora and the audio format is really Vorbis.
2. You can indeed try to build it but if the point is an unsupported video/audio codec, building with the same configuration (ie. enabling only flac, theora and ogg) should produce the same results. You can give it a try with more decoders though.
3. It would be nice if I could get a piece of your video to test it.
4. If you only need Theora and Vorbis support you can have a look at SFMLTheora.


The video is freely available from http://www.bigbuckbunny.org/index.php/download/
I downloaded the lowest resolution OGG format.
I checked in vlc it's codec details and it is theora and vorbis(as the site says).

I will check out SFMLTheora and see if it is a replacement. One feature i want is to get the current frame and set it to an opengl texture.

Thank you for your fast reply.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #73 on: September 26, 2011, 07:15:39 pm »
Ok. I tested your video file and indeed it won't display properly (although I've no crash and I have the soundtrack playing fine). I rebuilt sfeMovie with all of the codecs and I didn't get any better results, so I suppose this is just because of FFmpeg (used by sfeMovie). Maybe it's been fixed since I posted that beta but I can't tell you now.

I'll give it a try with the latest FFmpeg sources and tell you what's up.

PS: as for the feature you were wishing, note that even if sfeMovie gives access to the current image, it doesn't guarantee that you'll get every images. If your code is too slow, you may not be able to get some images, and if your code is too fast, you'll get some images several times.
Want to play movies in your SFML application? Check out sfeMovie!

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
sfeMovie project [v1.0 RC1 available]
« Reply #74 on: September 26, 2011, 08:37:55 pm »
With the latest FFmpeg source I get the same "no decoder found" message as you, and I can't work on it now, thus I think you've no other choice than using SFMLTheora.
Want to play movies in your SFML application? Check out sfeMovie!

 

anything