// -*-c++-*- /* * Copyright (C) 2001 Ulrich Hertlein * * Uses libmpeg3 by Adam Williams * See http://www.heroinewarrior.com * * The Open Scene Graph (OSG) is a cross platform C++/OpenGL library for * real-time rendering of large 3D photo-realistic models. * The OSG homepage is http://www.openscenegraph.org/ * * This software is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _MPEGIMAGESTREAM_H_ #define _MPEGIMAGESTREAM_H_ #include #include #include #include #define NUM_CMD_INDEX 4 namespace osg { /** * MPEG1/2 Image Stream class. */ class SG_EXPORT MpegImageStream : public osg::ImageStream, public OpenThreads::Thread { public: MpegImageStream(const char* fileName = NULL); virtual Object* clone() const { return new MpegImageStream; } virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj) != NULL; } virtual const char* className() const { return "MpegImageStream"; } /// Start or continue stream. virtual void play() { if (!isRunning()) start(); osg::notify(osg::NOTICE)<<"Play video"<