19 #ifndef GNASH_SWF_DEFINEVIDEOSTREAMTAG_H
20 #define GNASH_SWF_DEFINEVIDEOSTREAMTAG_H
22 #include <boost/shared_array.hpp>
23 #include <boost/thread/mutex.hpp>
24 #include <boost/ptr_container/ptr_vector.hpp>
35 class movie_definition;
47 VideoData(boost::shared_array<boost::uint8_t>
data, boost::uint32_t size,
74 typedef boost::ptr_vector<media::EncodedVideoFrame> EmbeddedFrames;
83 typedef EmbeddedFrames::const_reference Frame;
85 bool operator()(Frame frame,
size_t i)
const {
86 return frame.frameNum() <
i;
89 bool operator()(
size_t i, Frame frame)
const {
90 return i < frame.frameNum();
141 size_t visitSlice(
const T&
t, boost::uint32_t from, boost::uint32_t to)
const {
143 boost::mutex::scoped_lock lock(_video_mutex);
146 EmbeddedFrames::const_iterator lower = std::lower_bound(
147 _video_frames.begin(), _video_frames.end(), from, FrameFinder());
149 EmbeddedFrames::const_iterator upper = std::upper_bound(
150 lower, _video_frames.end(), to, FrameFinder());
153 return (upper - lower);
172 boost::uint8_t m_reserved_flags;
175 boost::uint8_t m_deblocking_flags;
178 bool m_smoothing_flags;
186 boost::uint16_t m_num_frames;
202 mutable boost::mutex _video_mutex;
204 EmbeddedFrames _video_frames;
207 boost::uint32_t _width;
210 boost::uint32_t _height;
216 std::auto_ptr<media::VideoInfo> _videoInfo;
224 #endif // GNASH_VIDEO_STREAM_DEF_H