Chromium Code Reviews| Index: media/filters/ffmpeg_glue.h |
| diff --git a/media/filters/ffmpeg_glue.h b/media/filters/ffmpeg_glue.h |
| index a98c50219d1445083f086af4e8637ab4770a7ead..324547bbcc64df0ea83496a0c99be434d284721b 100644 |
| --- a/media/filters/ffmpeg_glue.h |
| +++ b/media/filters/ffmpeg_glue.h |
| @@ -64,6 +64,30 @@ class FFmpegURLProtocol { |
| DISALLOW_COPY_AND_ASSIGN(FFmpegURLProtocol); |
| }; |
| +// Simple FFmpegURLProtocol that reads from a buffer. |
| +// NOTE: This object does not copy the buffer so the |
| +// buffer pointer passed into the constructor |
| +// needs to remain valid for the entire lifetime of |
| +// this object. |
| +class BufferUrlProtocol : public FFmpegURLProtocol { |
|
scherkus (not reviewing)
2011/06/22 17:31:09
any reason why this class can't be a part of the c
acolwell GONE FROM CHROMIUM
2011/06/23 16:51:28
Done. Moved code to media/filters/buffer_url_proto
|
| + public: |
| + BufferUrlProtocol(const uint8* buf, int size, bool streaming); |
| + virtual ~BufferUrlProtocol(); |
| + |
| + // FFmpegURLProtocol methods. |
| + virtual int Read(int size, uint8* data); |
| + virtual bool GetPosition(int64* position_out); |
| + virtual bool SetPosition(int64 position); |
| + virtual bool GetSize(int64* size_out); |
| + virtual bool IsStreaming(); |
| + |
| + private: |
| + const uint8* buf_; |
| + int size_; |
| + int offset_; |
| + bool streaming_; |
| +}; |
|
scherkus (not reviewing)
2011/06/22 17:31:09
DISALLOW etc.
acolwell GONE FROM CHROMIUM
2011/06/23 16:51:28
Done.
|
| + |
| class FFmpegGlue { |
| public: |
| // Returns the singleton instance. |