Merge pull request #855 from dsfdeeeg/ffmpeg

Plugins ffmpeg
This commit is contained in:
OpenSceneGraph git repository 2019-12-12 10:57:10 +00:00 committed by GitHub
commit 4ebac62d05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -303,6 +303,8 @@ void FFmpegImageStream::cmdPlay()
if (! m_decoder->video_decoder().isRunning()) if (! m_decoder->video_decoder().isRunning())
m_decoder->video_decoder().start(); m_decoder->video_decoder().start();
_lastUpdateTS = osg::Timer::instance()->tick();
m_decoder->video_decoder().pause(false); m_decoder->video_decoder().pause(false);
m_decoder->audio_decoder().pause(false); m_decoder->audio_decoder().pause(false);

View File

@ -140,6 +140,9 @@ public:
virtual ReadResult readImage(const std::string & filename, const osgDB::ReaderWriter::Options* options) const virtual ReadResult readImage(const std::string & filename, const osgDB::ReaderWriter::Options* options) const
{ {
const std::string ext = osgDB::getLowerCaseFileExtension(filename); const std::string ext = osgDB::getLowerCaseFileExtension(filename);
const std::string pro = osgDB::getServerProtocol(filename);
if (!acceptsExtension(ext) && !acceptsProtocol(pro)) return ReadResult::FILE_NOT_HANDLED;
if (ext=="ffmpeg") return readImage(osgDB::getNameLessExtension(filename),options); if (ext=="ffmpeg") return readImage(osgDB::getNameLessExtension(filename),options);
osg::ref_ptr<osgFFmpeg::FFmpegParameters> parameters(new osgFFmpeg::FFmpegParameters); osg::ref_ptr<osgFFmpeg::FFmpegParameters> parameters(new osgFFmpeg::FFmpegParameters);