gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/video_stream_instance.cp...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/video_stream_instance.cp...
Date: Mon, 09 Jul 2007 13:33:30 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/07/09 13:33:30

Modified files:
        .              : ChangeLog 
        server         : video_stream_instance.cpp 
                         video_stream_instance.h 
        server/parser  : video_stream_def.cpp video_stream_def.h 

Log message:
                * server/parser/video_stream_def.{h,cpp}: drop the m_width and 
m_height
                  public members, substitute them with a private m_bound 
(renamed
                  from m_unused_bound since it is now used). This fixes 
get_bound
                  to return a meaningful value.
                * server/video_stream_instance.{cpp,h}: stop using m_width and 
m_height
                  of the definition, rather use the get_bound() method.
                  Fixes bug #20177 (Youtube: half the video hidden)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3690&r2=1.3691
http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_stream_instance.cpp?cvsroot=gnash&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_stream_instance.h?cvsroot=gnash&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/video_stream_def.cpp?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/video_stream_def.h?cvsroot=gnash&r1=1.7&r2=1.8

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3690
retrieving revision 1.3691
diff -u -b -r1.3690 -r1.3691
--- ChangeLog   9 Jul 2007 13:15:18 -0000       1.3690
+++ ChangeLog   9 Jul 2007 13:33:29 -0000       1.3691
@@ -1,5 +1,15 @@
 2007-07-09 Sandro Santilli <address@hidden>
 
+       * server/parser/video_stream_def.{h,cpp}: drop the m_width and m_height
+         public members, substitute them with a private m_bound (renamed
+         from m_unused_bound since it is now used). This fixes get_bound
+         to return a meaningful value.
+       * server/video_stream_instance.{cpp,h}: stop using m_width and m_height
+         of the definition, rather use the get_bound() method.
+         Fixes bug #20177 (Youtube: half the video hidden)
+
+2007-07-09 Sandro Santilli <address@hidden>
+
        * server/as_value.cpp (to_debug_string): include object type name.
        * libbase/utility.h: add a templated typeName() function for
          demangling.

Index: server/video_stream_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/video_stream_instance.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- server/video_stream_instance.cpp    1 Jul 2007 10:54:26 -0000       1.31
+++ server/video_stream_instance.cpp    9 Jul 2007 13:33:30 -0000       1.32
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 // 
 
-// $Id: video_stream_instance.cpp,v 1.31 2007/07/01 10:54:26 bjacques Exp $
+// $Id: video_stream_instance.cpp,v 1.32 2007/07/09 13:33:30 strk Exp $
 
 #include "sprite_instance.h"
 #include "video_stream_instance.h"
@@ -181,7 +181,7 @@
        assert(m_def);
 
        matrix m = get_world_matrix();
-       rect bounds(0.0f, 0.0f, PIXELS_TO_TWIPS(m_def->m_width), 
PIXELS_TO_TWIPS(m_def->m_height));
+       const rect& bounds = m_def->get_bound();
 
        // If this is a video from a NetStream object, retrieve a video frame 
from there.
        if (_ns)
@@ -244,12 +244,8 @@
        // case I think add_invalidated_bouns would never be invoked on us...
        assert ( m_def );
 
-  rect def_bounds(0.0f, 0.0f, 
-    PIXELS_TO_TWIPS(m_def->m_width), PIXELS_TO_TWIPS(m_def->m_height));
-    
        rect bounds;    
-
-       bounds.expand_to_transformed_rect(get_world_matrix(), def_bounds);
+       bounds.expand_to_transformed_rect(get_world_matrix(), 
m_def->get_bound());
        
        ranges.add(bounds.getRange());            
 }

Index: server/video_stream_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/video_stream_instance.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- server/video_stream_instance.h      1 Jul 2007 10:54:26 -0000       1.17
+++ server/video_stream_instance.h      9 Jul 2007 13:33:30 -0000       1.18
@@ -16,7 +16,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 // 
-// $Id: video_stream_instance.h,v 1.17 2007/07/01 10:54:26 bjacques Exp $
+// $Id: video_stream_instance.h,v 1.18 2007/07/09 13:33:30 strk Exp $
 
 #ifndef GNASH_VIDEO_STREAM_INSTANCE_H
 #define GNASH_VIDEO_STREAM_INSTANCE_H
@@ -53,6 +53,8 @@
 
        geometry::Range2d<float> getBounds() const
        {
+               // TODO: return the bounds of the dynamically
+               //       loaded video if not embedded ?
                return m_def->get_bound().getRange();
        }
 

Index: server/parser/video_stream_def.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/parser/video_stream_def.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- server/parser/video_stream_def.cpp  1 Jul 2007 10:54:34 -0000       1.8
+++ server/parser/video_stream_def.cpp  9 Jul 2007 13:33:30 -0000       1.9
@@ -16,7 +16,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 // 
-// $Id: video_stream_def.cpp,v 1.8 2007/07/01 10:54:34 bjacques Exp $
+// $Id: video_stream_def.cpp,v 1.9 2007/07/09 13:33:30 strk Exp $
 
 #include "video_stream_def.h"
 #include "video_stream_instance.h"
@@ -56,8 +56,11 @@
 
                m_num_frames = in->read_u16();
 
-               m_width = in->read_u16();
-               m_height = in->read_u16();
+               uint16_t width = in->read_u16();
+               uint16_t height = in->read_u16();
+               m_bound.enclose_point(0, 0);
+               m_bound.expand_to_point(PIXELS_TO_TWIPS(width), 
PIXELS_TO_TWIPS(height));
+
                m_reserved_flags = in->read_uint(5);
                m_deblocking_flags = in->read_uint(2);
                m_smoothing_flags = in->read_uint(1) ? true : false;
@@ -107,8 +110,8 @@
 #endif
 
        decoder->createDecoder(
-                               m_width,
-                               m_height,
+                               m_bound.width(), // m_width,
+                               m_bound.height(), // m_height,
                                m_deblocking_flags,
                                m_smoothing_flags,
                                m_codec_id,

Index: server/parser/video_stream_def.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/video_stream_def.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- server/parser/video_stream_def.h    1 Jul 2007 10:54:35 -0000       1.7
+++ server/parser/video_stream_def.h    9 Jul 2007 13:33:30 -0000       1.8
@@ -16,7 +16,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 // 
-// $Id: video_stream_def.h,v 1.7 2007/07/01 10:54:35 bjacques Exp $
+// $Id: video_stream_def.h,v 1.8 2007/07/09 13:33:30 strk Exp $
 
 #ifndef GNASH_VIDEO_STREAM_DEF_H
 #define GNASH_VIDEO_STREAM_DEF_H
@@ -47,9 +47,10 @@
        character* create_character_instance(character* parent, int id);
        void    read(stream* in, SWF::tag_type tag, movie_definition* m);
 
-       // TODO: return a rect 0,0,m_width,m_height
-       const rect&     get_bound() const       {
-               return m_unused_rect;
+       /// Return local video bounds in twips
+       const rect&     get_bound() const
+       {
+               return m_bound;
        }
 
        /// Return a newly created embedded-video decoder
@@ -69,12 +70,15 @@
 
        void get_frame_data(int frameNum, uint8_t** data, int* size);
 
-       // TODO: make private
-       uint16_t m_width;
-       uint16_t m_height;
-
 private:
 
+       // TODO: drop, use m_bound
+       //uint16_t m_width;
+
+       // TODO: drop, use m_bound
+       //uint16_t m_height;
+
+
        uint16_t m_char_id;
        uint8_t m_reserved_flags;
        uint8_t m_deblocking_flags;
@@ -88,7 +92,13 @@
        // 3: screen video (Flash 7+ only)
        // 4: VP6
        uint8_t m_codec_id;
-       rect m_unused_rect;
+
+       /// Bounds of the video.
+       //
+       /// This is actually a duplication of m_width, m_height
+       /// members, which are not yet private so we can switch.
+       ///
+       rect m_bound;
 
        /// The undecoded video frames
        std::vector<uint8_t*>   m_video_frames;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]