Commit Graph

24 Commits

Author SHA1 Message Date
Robert Osfield
f9fd4342ba From Stephan Huber, "attached you'll find the latest versions of the QTKit + the AVFoundation-plugin, some changes to osgPresentation and a small enhancement für ImageIO.
I fixed some bugs and did some more tests with both of the video-plugins. I integrated CoreVideo with osgPresentation, ImageStream has a new virtual method called createSuitableTexture which returns NULL for default implementations. Specialized implementations like the QTKit-plugin return a CoreVideo-texture. I refactored the code in SlideShowConstructor::createTexturedQuad to use a texture returned from ImageStream::createSuitableTexture.

I did not use osgDB::readObjectFile to get the texture-object, as a lot of image-related code in SlideShowConstructor had to be refactored to use a texture.  My changes are minimal and should not break existing code.

There's one minor issue with CoreVideo in general: As the implementation is asynchronous, there might be no texture available, when first showing the video the first frame. I am a bit unsure how to tackle this problem, any input on this is appreciated.

Back to the AVFoundation-plugin: the current implementation does not support CoreVideo as the QTKit-plugin supports it. There's no way to get decoded frames from AVFoundation stored on the GPU, which is kind of sad. I added some support for CoreVideo to transfer decoded frames back to the GPU, but in my testings the performance was worse than using the normal approach using glTexSubImage. This is why I disabled CoreVideo for AVFoundation. You can still request a CoreVideoTexture via readObjectFile, though.
"
2012-10-24 10:43:01 +00:00
Robert Osfield
1796d55bea From Stephan Huber, OSX and iOS Video support via a QTKit plugin from OSX 10.7 and before, and an AVFoundation plugin for iOS and OSX10.8 and later. 2012-10-02 14:07:12 +00:00
Robert Osfield
14a563dc9f Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Robert Osfield
4e834dfc73 From Brad Christiansen, "Attached are some small changes to the ImageStream interface and the DirectShow and FFMPEG plugins to provide the current time being displayed in the image stream.
I don’t have access to an OSX or Linux dev machine to make the changes required to the quick time plugin. This plugin will just default to returning 0."
2011-12-23 16:27:25 +00:00
Robert Osfield
74a9ccb49d From David Fries, merge from a series of related submission emails:
"enable thread locking in libavcodec

This is required for a multithreaded application using ffmpeg from
another thread."

"Prevent the audio from videos from hanging on exit if they are paused.
The video decoder already has similar logic."

"Add a way to retrieve the creation time for MPEG-4 files."

"fmpeg, improve wait for close logic

Both audio and video destructors have been succesfully using the logic,
if(isRunning())
{
  m_exit = true;
  join();
}
since it was introduced,

but the close routines are using,
m_exit = true;
if(isRunning() && waitForThreadToExit)
{
  while(isRunning()) { OpenThreads::Thread::YieldCurrentThread(); }
}
which not only is it doing an unnecessary busy wait, but it doesn't
guaranteed that the other thread has terminated, just that it has
progressed far enough that OpenThreads has set the thread status as
not running.  Like the destructor set the m_exit after checking
isRunning() to avoid the race condition of not getting to join()
because the thread was running, but isRunning() returns false.

Now that FFmpeg*close is fixed, call it from the destructor as well
to have that code in only one location."
2010-08-09 17:02:31 +00:00
Robert Osfield
b6bffdd02f From Tanguy Fautre,
Clean up of the FFmpeg plugin's class API/AudioStream API. 
Implementation of isImageTransparent().
Implementation of Image:g/setPixelAspectRatio()
2009-03-11 15:12:46 +00:00
Robert Osfield
4ebd316130 Introduced osg::AudioStream class to help manage audio streams coming in from movie reading plugins 2009-02-27 20:16:08 +00:00
Robert Osfield
8147bd4df8 Refactored ImageSequence to provided a cleaner and more robust implementation 2008-10-06 17:02:20 +00:00
Robert Osfield
927942a0f8 Further work on osg::ImageSequence, improving pause functionality, and introducing new seek(double time) method 2008-08-15 12:45:20 +00:00
Robert Osfield
acd7e65687 Added basic image sequencing 2008-07-21 17:28:22 +00:00
Robert Osfield
d17a255d8e First cut of osg::ImageSequence class 2008-07-21 09:46:53 +00:00
Robert Osfield
15ff70d298 From Brad Colbert with ammendments by Robert Osfield, add set/getVolume support 2007-06-28 14:19:30 +00:00
Robert Osfield
fcafd4db06 From Stephan Huber, "attached you'll find the modified ImageStream
and a small fix for QuicktimeImageStream to disable debug-logging :)"
2007-06-01 19:19:23 +00:00
Robert Osfield
a1639c3d2d From Brad Colbert, "Added a new method to ImageStream called getLength that is used to
return the length of the stream.

Implemented the virtual methods in QuicktimeImageStream, (getLength,
getReferenceTime, setTimeMultiplier), to return valid value for each.
"
2007-04-26 08:11:09 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
35fcaf7bde Convert tabs to spaces. 2005-11-17 17:44:48 +00:00
Robert Osfield
678b22ce83 Updated Copyright notices to 1998-2005. 2005-04-14 21:41:28 +00:00
Robert Osfield
d268cf46fa Renamed SG_LIBRARY and SG_EXPORT macro's to OSG_LIBRARY and OSG_EXPORT 2005-04-11 17:14:17 +00:00
Robert Osfield
79833fa704 Added pause, rewind and play support into xine plugin. 2005-02-24 17:07:37 +00:00
Robert Osfield
ee67127279 From Eric Hammil, typo and spelling fixes 2004-09-13 15:14:11 +00:00
Robert Osfield
b2d39d7f5b Added s/getLoopingMode() to ImageStream and MPEG plugin 2004-08-24 12:55:15 +00:00
Robert Osfield
cf62f7097d Added ImageStream::quit(bool) for exiting from video threads, and added
clean up to OsgCameGroup to quit movie threads automatically.
2004-07-23 09:15:22 +00:00
Robert Osfield
f634026034 Removed stop method, as it overlaps the pause method. 2004-07-21 19:00:48 +00:00
Robert Osfield
8b47c9c85d Preliminary work on general support of video textures. 2004-03-09 09:42:07 +00:00