Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GNASH_VIDEO_H
00020 #define GNASH_VIDEO_H
00021
00022 #include <boost/intrusive_ptr.hpp>
00023 #include "DisplayObject.h"
00024
00025
00026 namespace gnash {
00027 class NetStream_as;
00028 class as_object;
00029 namespace image {
00030 class GnashImage;
00031 }
00032 struct ObjectURI;
00033 namespace SWF {
00034 class DefineVideoStreamTag;
00035 }
00036 namespace media {
00037 class VideoDecoder;
00038 }
00039 }
00040
00041 namespace gnash {
00042
00044
00049 class Video : public DisplayObject
00050 {
00051 public:
00052
00053 Video(as_object* object, const SWF::DefineVideoStreamTag* def,
00054 DisplayObject* parent);
00055
00056 ~Video();
00057
00058 virtual bool pointInShape(boost::int32_t x, boost::int32_t y) const
00059 {
00060
00061 return pointInBounds(x, y);
00062 }
00063
00064 virtual SWFRect getBounds() const;
00065
00067 virtual void construct(as_object* init = 0);
00068
00069 virtual void display(Renderer& renderer, const Transform& xform);
00070
00071 void add_invalidated_bounds(InvalidatedRanges& ranges, bool force);
00072
00074 void setStream(NetStream_as* ns);
00075
00076 void clear();
00077
00079
00084 int height() const;
00085
00087
00092 int width() const;
00093
00095 bool smoothing() const { return _smoothing; }
00096
00098 void setSmoothing(bool b) { _smoothing = b; }
00099
00100 protected:
00101
00103
00107 virtual void markOwnResources() const;
00108
00109 private:
00110
00112 image::GnashImage* getVideoFrame();
00113
00114 const boost::intrusive_ptr<const SWF::DefineVideoStreamTag> m_def;
00115
00116
00117 NetStream_as* _ns;
00118
00120 bool _embeddedStream;
00121
00123 boost::int32_t _lastDecodedVideoFrameNum;
00124
00126 std::auto_ptr<image::GnashImage> _lastDecodedVideoFrame;
00127
00129
00133 std::auto_ptr<media::VideoDecoder> _decoder;
00134
00136 bool _smoothing;
00137 };
00138
00139 }
00140
00141 #endif