Added setting of the filename
This commit is contained in:
parent
58120d0bc9
commit
c842dce38c
@ -98,13 +98,15 @@ class ReaderWriterXine : public osgDB::ReaderWriter
|
|||||||
osg::notify(osg::NOTICE)<<"ReaderWriterXine::readImage "<< file<< std::endl;
|
osg::notify(osg::NOTICE)<<"ReaderWriterXine::readImage "<< file<< std::endl;
|
||||||
|
|
||||||
//XineImageStream* imageStream = new XineImageStream(file.c_str());
|
//XineImageStream* imageStream = new XineImageStream(file.c_str());
|
||||||
osg::Image* imageStream = new osg::ImageStream;
|
osg::ref_ptr<osg::ImageStream> imageStream = new osg::ImageStream;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// create visual
|
// create visual
|
||||||
rgbout_visual_info_t* visual = new rgbout_visual_info_t;
|
rgbout_visual_info_t* visual = new rgbout_visual_info_t;
|
||||||
visual->levels = PXLEVEL_ALL;
|
visual->levels = PXLEVEL_ALL;
|
||||||
visual->format = PX_RGB32;
|
visual->format = PX_RGB32;
|
||||||
visual->user_data = imageStream;
|
visual->user_data = imageStream.get();
|
||||||
visual->callback = my_render_frame;
|
visual->callback = my_render_frame;
|
||||||
|
|
||||||
|
|
||||||
@ -133,6 +135,10 @@ class ReaderWriterXine : public osgDB::ReaderWriter
|
|||||||
int result = xine_open(stream, file.c_str());
|
int result = xine_open(stream, file.c_str());
|
||||||
osg::notify(osg::NOTICE)<<"ReaderWriterXine::readImage - xine_open "<<result<<std::endl;
|
osg::notify(osg::NOTICE)<<"ReaderWriterXine::readImage - xine_open "<<result<<std::endl;
|
||||||
|
|
||||||
|
if (!result) return 0;
|
||||||
|
|
||||||
|
imageStream->setFileName(file);
|
||||||
|
|
||||||
xine_play(stream, 0, 0);
|
xine_play(stream, 0, 0);
|
||||||
|
|
||||||
// imageStream->play();
|
// imageStream->play();
|
||||||
@ -143,7 +149,7 @@ class ReaderWriterXine : public osgDB::ReaderWriter
|
|||||||
usleep(10000);
|
usleep(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
return imageStream;
|
return imageStream.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user