Panda3D

ffmpegVideo.cxx

00001 // Filename: ffmpegVideo.cxx
00002 // Created by: jyelon (01Aug2007)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifdef HAVE_FFMPEG
00016 
00017 #include "ffmpegVideo.h"
00018 #include "config_movies.h"
00019 
00020 TypeHandle FfmpegVideo::_type_handle;
00021 
00022 ////////////////////////////////////////////////////////////////////
00023 //     Function: FfmpegVideo::Constructor
00024 //       Access: Public
00025 //  Description: xxx
00026 ////////////////////////////////////////////////////////////////////
00027 FfmpegVideo::
00028 FfmpegVideo(const Filename &name) :
00029   MovieVideo(name)
00030 {
00031   _filename = name;
00032 }
00033 
00034 ////////////////////////////////////////////////////////////////////
00035 //     Function: FfmpegVideo::Destructor
00036 //       Access: Public
00037 //  Description: xxx
00038 ////////////////////////////////////////////////////////////////////
00039 FfmpegVideo::
00040 ~FfmpegVideo() {
00041 }
00042 
00043 ////////////////////////////////////////////////////////////////////
00044 //     Function: FfmpegVideo::open
00045 //       Access: Published, Virtual
00046 //  Description: Open this video, returning a MovieVideoCursor.
00047 ////////////////////////////////////////////////////////////////////
00048 PT(MovieVideoCursor) FfmpegVideo::
00049 open() {
00050   PT(FfmpegVideoCursor) result = new FfmpegVideoCursor(this);
00051   if (result->_format_ctx == 0) {
00052     movies_cat.error() << "Could not open " << _filename << "\n";
00053     return NULL;
00054   } else {
00055     return (MovieVideoCursor*)(FfmpegVideoCursor*)result;
00056   }
00057 }
00058 
00059 
00060 ////////////////////////////////////////////////////////////////////
00061 
00062 #endif // HAVE_FFMPEG
 All Classes Functions Variables Enumerations