On Sun, Dec 11, 2011 at 6:33 AM, Peter Enerccio <[email protected]> wrote:
> I know this is a bit off topic for pyglet, but maybe someone who knows the
> avbin can reply to me. I am trying to found a way to get whn the video file
> has finished playing in avbin, but alas, I found no such information
> anywhere. I tried to check for timestamp whether it is at the end, but it
> would ignore it and just end with segmentation fault.

Peter,

AVbin doesn't "play" a video file, per se.  Some application or
framework (like Pyglet, for example) uses AVbin to decode a video
frame by frame and then presents the visual/audio information to some
device to play it.

You can tell that AVbin has nothing left to decode from a video file
when a call to avbin_decode_video() returns 0 (successfull finish) or
-1 (hit an error).

If you are interested in using Pyglet to play video, you can view the
documentation here (
http://pyglet.org/doc/programming_guide/sound_and_video.html ) and the
API reference here ( http://pyglet.org/doc/api/index.html ).  There's
even an example player application in examples/video.py in the pyglet
tarball (do examples get put somewhere during binary installs of
Pyglet, anyone?).

Or, you can read Pyglet's source code to see a reference
implementation of how to use AVbin -- though Pyglet is written in
Python, not C++ like I assume you are looking to do from the subject
of this email.

If you are looking to use AVbin directly from your C++ project, I
suggest reading include/avbin.h -- the API is documented fairly
thoroughly in that file in comments.  I need to see about generating
an online version of those docs (it looks like it may be already set
up to generate using doxygen, but I've never used doxygen...yet).

~ Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to