Browse Source

Add get_video_length

rdb 16 years ago
parent
commit
3a902bdaf3
2 changed files with 12 additions and 0 deletions
  1. 11 0
      panda/src/grutil/movieTexture.I
  2. 1 0
      panda/src/grutil/movieTexture.h

+ 11 - 0
panda/src/grutil/movieTexture.I

@@ -13,6 +13,17 @@
 ////////////////////////////////////////////////////////////////////
 
 
+////////////////////////////////////////////////////////////////////
+//     Function: MovieTexture::get_video_length
+//       Access: Published
+//  Description: Returns the length of the video.
+////////////////////////////////////////////////////////////////////
+INLINE double MovieTexture::
+get_video_length() const {
+  CDReader cdata(_cycler);
+  return cdata->_video_length;
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: MovieTexture::get_video_width
 //       Access: Published

+ 1 - 0
panda/src/grutil/movieTexture.h

@@ -37,6 +37,7 @@ private:
 PUBLISHED:
   virtual ~MovieTexture();
 
+  INLINE double get_video_length() const;
   INLINE int get_video_width() const;
   INLINE int get_video_height() const;
   INLINE LVecBase2f get_tex_scale() const;