Explorar el Código

Add get_video_length

rdb hace 16 años
padre
commit
3a902bdaf3
Se han modificado 2 ficheros con 12 adiciones y 0 borrados
  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;