Yalir / sfeMovie

sfeMovie is a simple C++ library that lets you play movies in SFML based applications. It relies on FFmpeg to read medias and remains consistent with SFML's naming conventions.
http://sfemovie.yalir.org/
GNU Lesser General Public License v2.1
114 stars 37 forks source link

A method to open from a stream #99

Open hsdk123 opened 8 years ago

hsdk123 commented 8 years ago

Hi, currently sfeMovie only allows opening files directly through the filename - I'm currently starting to have to work with streams loaded into memory, and was wondering if a method like SFML's loadFromStream could be added to sfeMovie as well.

feliwir commented 8 years ago

I think Ceylo opened a branch for this already

Ceylo commented 8 years ago

Indeed there is the feature/OpenFromStream branch. However it is not finished. It is roughly what a user from SFML forum proposed, but I don't wish to work on sfeMovie anymore so it'll have to be finished by someone else. Basically what lacks at the moment is cleanly design integration and manual tests.

hsdk123 commented 8 years ago

sfeMovie is somewhat the main reason that I currently continue to use SFML - it's a really great piece of work with its clean integration and simple usage, I would have switched to cocos2d-x otherwise.

I feel openFromStream would really make the design complete from a user point of view - it would be great if someone / some people picked this up.

feliwir commented 8 years ago

I will have a look at it

hsdk123 commented 8 years ago

@feliwir Thanks! Let me know if you happen to need testers

hsdk123 commented 8 years ago

Hi, has there been progress on this lately?

feliwir commented 8 years ago

No, i've been writing exams. Sorry

hsdk123 commented 8 years ago

Gotya - let me know when things start rolling b

hsdk123 commented 8 years ago

How's development been lately?

feliwir commented 8 years ago

There is a crash with the current code when using bitmap-subtitles, but i had no time to investigate further in that. Apart from that it should work when you use branch where that feature is already implemented

hsdk123 commented 8 years ago

@felwir Hi, I've been trying to get this up and running but I'm facing problems. I've been trying to debug the issue and it seems that within

Demuxer::Demuxer(sf::InputStream& inputStream, std::shared_ptr<Timer> timer,
                     VideoStream::Delegate& videoDelegate, SubtitleStream::Delegate& subtitleDelegate)

m_formatCtx = ::avformat_alloc_context() (line 153) the return value of avformat_alloc_context is NULL, thus when init("", videoDelegate, subtitleDelegate); is called, nothing is loaded since this neither has a filename, nor does m_formatctx have a value. Could someone look into this?

feliwir commented 8 years ago

Well this is pretty much the same problem i was facing.

hsdk123 commented 8 years ago

@feliwir I'm slightly confused - didn't you say that things should be working as long as bitmap-subtitles aren't used?

HowellPendragon commented 8 years ago

Any news ? I am really interested in that branch.

Reagards, Pendragon

hsdk123 commented 8 years ago

@feliwir I was working in VS2015 and realised that things start working slightly if I turn all optimisations off for release mode. Things are crashing though when I try playing video files with audio + video. What do you think?