19 #ifndef GNASH_SWF_DEFINEVIDEOSTREAMTAG_H 20 #define GNASH_SWF_DEFINEVIDEOSTREAMTAG_H 23 #include <boost/ptr_container/ptr_vector.hpp> 34 class movie_definition;
50 typedef boost::ptr_vector<media::EncodedVideoFrame> EmbeddedFrames;
59 typedef EmbeddedFrames::const_reference Frame;
61 bool operator()(Frame frame,
size_t i)
const {
62 return frame.frameNum() <
i;
65 bool operator()(
size_t i, Frame frame)
const {
66 return i < frame.frameNum();
117 size_t visitSlice(
const T&
t, std::uint32_t from, std::uint32_t to)
const {
119 std::lock_guard<std::mutex> lock(_video_mutex);
122 EmbeddedFrames::const_iterator lower = std::lower_bound(
123 _video_frames.begin(), _video_frames.end(), from, FrameFinder());
125 EmbeddedFrames::const_iterator upper = std::upper_bound(
126 lower, _video_frames.end(), to, FrameFinder());
129 return (upper - lower);
148 std::uint8_t m_reserved_flags;
151 std::uint8_t m_deblocking_flags;
154 bool m_smoothing_flags;
162 std::uint16_t m_num_frames;
178 mutable std::mutex _video_mutex;
180 EmbeddedFrames _video_frames;
183 std::uint32_t _width;
186 std::uint32_t _height;
192 std::unique_ptr<media::VideoInfo> _videoInfo;
200 #endif // GNASH_VIDEO_STREAM_DEF_H DisplayObject * createDisplayObject(Global_as &gl, DisplayObject *parent) const
Create a DisplayObject with the given parent.
Definition: DefineVideoStreamTag.cpp:115
Client program's interface to the definition of a movie or sprite.
Definition: movie_definition.h:95
void for_each(C &container, R(T::*pmf)(const A &), const A &arg)
Definition: Renderer_ogl.cpp:690
DisplayObject is the base class for all DisplayList objects.
Definition: DisplayObject.h:168
TagType
SWF tag types. Symbolic names copied from Ming.
Definition: SWF.h:30
void readDefineVideoFrame(SWFStream &in, SWF::TagType tag, movie_definition &m)
Read tag SWF::VIDEOFRAME.
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
Immutable data representing the definition of a movie display element.
Definition: DefinitionTag.h:47
size_t visitSlice(const T &t, std::uint32_t from, std::uint32_t to) const
Visit a slice of encoded video frames.
Definition: DefineVideoStreamTag.h:117
Definition: GnashKey.h:164
Definition: GnashKey.h:166
static void loader(SWFStream &in, SWF::TagType tag, movie_definition &m, const RunResources &r)
Read tag SWF::DEFINEVIDEOSTREAM.
Definition: DefineVideoStreamTag.cpp:54
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:53
const SWFRect & bounds() const
Return local video bounds in twips.
Definition: DefineVideoStreamTag.h:99
The Global object ultimately contains all objects in an ActionScript run.
Definition: Global_as.h:49
Definition: DefineVideoStreamTag.h:43
Definition: GnashKey.h:132
Rectangle class, see swf defined rectangle record.
Definition: SWFRect.h:44
~DefineVideoStreamTag()
Definition: DefineVideoStreamTag.cpp:48
Definition: GnashKey.h:155
Definition: GnashKey.h:159
void addVideoFrameTag(std::unique_ptr< media::EncodedVideoFrame > frame)
Definition: DefineVideoStreamTag.cpp:107
media::VideoInfo * getVideoInfo() const
Get info about video embedded in this definition.
Definition: DefineVideoStreamTag.h:108
Definition: GnashKey.h:331
SWF stream wrapper class.
Definition: SWFStream.h:58