Browse Source

fix bug with movie textures in egg files

David Rose 14 years ago
parent
commit
c3b5e1ec6b

+ 14 - 0
panda/src/grutil/ffmpegTexture.cxx

@@ -506,6 +506,20 @@ void FFMpegTexture::
 do_get_bam_rawdata() {
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: FFMpegTexture::do_can_reload
+//       Access: Protected, Virtual
+//  Description: Returns true if we can safely call
+//               do_unlock_and_reload_ram_image() in order to make the
+//               image available, or false if we shouldn't do this
+//               (because we know from a priori knowledge that it
+//               wouldn't work anyway).
+////////////////////////////////////////////////////////////////////
+bool FFMpegTexture::
+do_can_reload() {
+  return false;
+}
+
 
 
 

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

@@ -62,6 +62,7 @@ protected:
 
   virtual bool do_has_bam_rawdata() const;
   virtual void do_get_bam_rawdata();
+  virtual bool do_can_reload();
 
 private:    
   class VideoPage;

+ 14 - 0
panda/src/grutil/movieTexture.cxx

@@ -498,6 +498,20 @@ void MovieTexture::
 do_get_bam_rawdata() {
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: MovieTexture::do_can_reload
+//       Access: Protected, Virtual
+//  Description: Returns true if we can safely call
+//               do_unlock_and_reload_ram_image() in order to make the
+//               image available, or false if we shouldn't do this
+//               (because we know from a priori knowledge that it
+//               wouldn't work anyway).
+////////////////////////////////////////////////////////////////////
+bool MovieTexture::
+do_can_reload() {
+  return false;
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: MovieTexture::restart
 //       Access: Published

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

@@ -73,6 +73,7 @@ protected:
   virtual bool get_keep_ram_image() const;
   virtual bool do_has_bam_rawdata() const;
   virtual void do_get_bam_rawdata();
+  virtual bool do_can_reload();
 
   virtual bool do_adjust_this_size(int &x_size, int &y_size, const string &name, 
                                    bool for_padding);