From c842dce38c70eb533f140126bf636642a634417a Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 9 Feb 2005 14:27:54 +0000 Subject: [PATCH] Added setting of the filename --- src/osgPlugins/xine/ReaderWriterXine.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/osgPlugins/xine/ReaderWriterXine.cpp b/src/osgPlugins/xine/ReaderWriterXine.cpp index ced483e17..4aa516aa5 100644 --- a/src/osgPlugins/xine/ReaderWriterXine.cpp +++ b/src/osgPlugins/xine/ReaderWriterXine.cpp @@ -98,13 +98,15 @@ class ReaderWriterXine : public osgDB::ReaderWriter osg::notify(osg::NOTICE)<<"ReaderWriterXine::readImage "<< file<< std::endl; //XineImageStream* imageStream = new XineImageStream(file.c_str()); - osg::Image* imageStream = new osg::ImageStream; + osg::ref_ptr imageStream = new osg::ImageStream; + + // create visual rgbout_visual_info_t* visual = new rgbout_visual_info_t; visual->levels = PXLEVEL_ALL; visual->format = PX_RGB32; - visual->user_data = imageStream; + visual->user_data = imageStream.get(); visual->callback = my_render_frame; @@ -131,8 +133,12 @@ class ReaderWriterXine : public osgDB::ReaderWriter // xine_event_queue_t* queue = xine_event_new_queue(stream); int result = xine_open(stream, file.c_str()); - osg::notify(osg::NOTICE)<<"ReaderWriterXine::readImage - xine_open"<setFileName(file); + xine_play(stream, 0, 0); // imageStream->play(); @@ -143,7 +149,7 @@ class ReaderWriterXine : public osgDB::ReaderWriter usleep(10000); } - return imageStream; + return imageStream.release(); } protected: