gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash/server/parser button_character_def.h movi...


From: Vitaly Alexeev
Subject: [Gnash-commit] gnash/server/parser button_character_def.h movi...
Date: Fri, 27 Oct 2006 14:30:52 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Vitaly Alexeev <alexeev>        06/10/27 14:30:52

Modified files:
        server/parser  : button_character_def.h movie_def_impl.h 
                         sprite_definition.h 
Added files:
        server/parser  : video_stream_def.cpp video_stream_def.h 

Log message:
        videostream implementation

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/button_character_def.h?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_def_impl.h?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/sprite_definition.h?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/video_stream_def.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/video_stream_def.h?cvsroot=gnash&rev=1.1

Patches:
Index: button_character_def.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/button_character_def.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- button_character_def.h      16 Oct 2006 14:33:38 -0000      1.3
+++ button_character_def.h      27 Oct 2006 14:30:51 -0000      1.4
@@ -116,6 +116,8 @@
     // why it is virtual anyway.
     // get_button_bound() is used for buttons.
     assert(0); // should not be called  
+               rect unused;
+               return unused;
   }
   
   const rect&  get_button_bound(int id) const {

Index: movie_def_impl.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/movie_def_impl.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- movie_def_impl.h    12 Oct 2006 16:37:25 -0000      1.12
+++ movie_def_impl.h    27 Oct 2006 14:30:51 -0000      1.13
@@ -56,6 +56,8 @@
 #include <string>
 #include <memory> // for auto_ptr
 
+#include <pthread.h>
+
 namespace gnash
 {
 
@@ -533,6 +535,8 @@
     // is used only shape character definitions. See character_def.h to learn
     // why it is virtual anyway.
     assert(0); // should not be called  
+               rect unused;
+               return unused;
   }
 
 };

Index: sprite_definition.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/sprite_definition.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- sprite_definition.h 12 Oct 2006 16:37:25 -0000      1.4
+++ sprite_definition.h 27 Oct 2006 14:30:51 -0000      1.5
@@ -367,6 +367,8 @@
     // is used only shape character definitions. See character_def.h to learn
     // why it is virtual anyway.
     assert(0); // should not be called  
+               rect unused;
+               return unused;
   }
                        
 };

Index: video_stream_def.cpp
===================================================================
RCS file: video_stream_def.cpp
diff -N video_stream_def.cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ video_stream_def.cpp        27 Oct 2006 14:30:52 -0000      1.1
@@ -0,0 +1,47 @@
+#include "video_stream_def.h"
+#include "video_stream_instance.h"
+
+namespace gnash {
+
+
+void
+video_stream_definition::read(stream* in, SWF::tag_type tag, movie_definition* 
m)
+{
+       // Character ID has been read already 
+
+       assert(tag == SWF::DEFINEVIDEOSTREAM ||
+                                       tag == SWF::VIDEOFRAME);
+
+       if (tag == SWF::DEFINEVIDEOSTREAM)
+       {
+
+               uint16_t numframes = in->read_u16();
+               m_frames.resize(numframes);
+
+               m_width = in->read_u16();
+               m_height = in->read_u16();
+               uint8_t reserved_flags = in->read_uint(5);
+               m_deblocking_flags = in->read_uint(2);
+               m_smoothing_flags = in->read_uint(1) ? true : false;
+
+               m_codec_id = in->read_u8();
+       }
+       else
+       if (tag == SWF::VIDEOFRAME)
+       {
+               uint16_t n = in->read_u16();
+               m_frames[n] = NULL;
+       }
+
+}
+
+
+character*
+video_stream_definition::create_character_instance(character* parent, int id)
+{
+       character* ch = new video_stream_instance(this, parent, id);
+       return ch;
+}
+
+}
+

Index: video_stream_def.h
===================================================================
RCS file: video_stream_def.h
diff -N video_stream_def.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ video_stream_def.h  27 Oct 2006 14:30:52 -0000      1.1
@@ -0,0 +1,46 @@
+#ifndef GNASH_VIDEO_STREAM_DEF_H
+#define GNASH_VIDEO_STREAM_DEF_H
+
+#include "character_def.h"
+#include "stream.h" // for read()
+#include "movie_definition.h"
+#include "swf.h"
+
+namespace gnash {
+
+class video_stream_definition : public character_def
+{
+public:
+
+//     video_stream_definition();
+//     virtual ~video_stream_definition();
+
+
+       character* create_character_instance(character* parent, int id);
+       void    read(stream* in, SWF::tag_type tag, movie_definition* m);
+       const rect&     get_bound() const       {
+               return m_unused_rect;
+       }
+
+       uint16_t m_width;
+       uint16_t m_height;
+
+private:
+
+//     uint8_t reserved_flags;
+       uint8_t m_deblocking_flags;
+       bool m_smoothing_flags;
+
+       // 0: extern file
+       // 2: H.263
+       // 3: screen video (Flash 7+ only)
+       // 4: VP6
+       uint8_t m_codec_id;
+       std::vector<void*>      m_frames;
+       rect m_unused_rect;
+};
+
+}      // end namespace gnash
+
+
+#endif // GNASH_VIDEO_STREAM_DEF_H




reply via email to

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