20 #ifndef GNASH_MEDIAPARSER_FFMPEG_H 21 #define GNASH_MEDIAPARSER_FFMPEG_H 24 #include <boost/optional.hpp> 87 virtual bool seek(std::uint32_t&);
90 virtual bool parseNextChunk();
93 virtual std::uint64_t getBytesLoaded()
const;
95 virtual boost::optional<Id3Info> getId3Info()
const;
101 void initializeParser();
107 bool parseNextFrame();
110 int readPacket(std::uint8_t* buf,
int buf_size);
113 static int readPacketWrapper(
void* opaque, std::uint8_t* buf,
int buf_size);
116 std::int64_t seekMedia(std::int64_t offset,
int whence);
119 static std::int64_t seekMediaWrapper(
void *opaque, std::int64_t offset,
int whence);
122 AVInputFormat* probeStream();
124 AVInputFormat* _inputFmt;
127 AVFormatContext *_formatCtx;
130 int _videoStreamIndex;
133 AVStream* _videoStream;
136 int _audioStreamIndex;
139 AVStream* _audioStream;
142 AVIOContext* _avIOCxt;
149 static const size_t byteIOBufferSize = 1024;
151 std::unique_ptr<unsigned char[]> _byteIOBuffer;
154 std::uint64_t _lastParsedPosition;
160 std::uint16_t SampleFormatToSampleSize(AVSampleFormat fmt);
164 bool parseVideoFrame(AVPacket& packet);
167 bool parseAudioFrame(AVPacket& packet);
169 boost::optional<Id3Info> _id3Object;
177 #endif // __MEDIAPARSER_FFMPEG_H__
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40