Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // FFmpegGlue is an interface between FFmpeg and Chrome used to proxy FFmpeg's | 5 // FFmpegGlue is an interface between FFmpeg and Chrome used to proxy FFmpeg's |
| 6 // read and seek requests to Chrome's internal data structures. The glue works | 6 // read and seek requests to Chrome's internal data structures. The glue works |
| 7 // through the AVIO interface provided by FFmpeg. | 7 // through the AVIO interface provided by FFmpeg. |
| 8 // | 8 // |
| 9 // AVIO works through a special AVIOContext created through avio_alloc_context() | 9 // AVIO works through a special AVIOContext created through avio_alloc_context() |
| 10 // which is attached to the AVFormatContext used for demuxing. The AVIO context | 10 // which is attached to the AVFormatContext used for demuxing. The AVIO context |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 // FFmpegGlue is also responsible for initializing FFmpeg, which is done once | 21 // FFmpegGlue is also responsible for initializing FFmpeg, which is done once |
| 22 // per process. Initialization includes: turning off log messages, registering | 22 // per process. Initialization includes: turning off log messages, registering |
| 23 // a lock manager, and finally registering all demuxers and codecs. | 23 // a lock manager, and finally registering all demuxers and codecs. |
| 24 | 24 |
| 25 #ifndef MEDIA_FILTERS_FFMPEG_GLUE_H_ | 25 #ifndef MEDIA_FILTERS_FFMPEG_GLUE_H_ |
| 26 #define MEDIA_FILTERS_FFMPEG_GLUE_H_ | 26 #define MEDIA_FILTERS_FFMPEG_GLUE_H_ |
| 27 | 27 |
| 28 #include "base/basictypes.h" | 28 #include "base/basictypes.h" |
| 29 #include "base/memory/scoped_ptr.h" | 29 #include "base/memory/scoped_ptr.h" |
| 30 #include "media/base/media_export.h" | 30 #include "media/base/media_export.h" |
| 31 #include "media/ffmpeg/ffmpeg_common.h" | |
|
DaleCurtis
2012/11/05 19:24:31
You can't include this header in other .h files si
Paweł Hajdan Jr.
2012/11/05 19:31:37
In vanilla ffmpeg it is a typedef, so I had to inc
DaleCurtis
2012/11/05 19:34:41
I submitted an upstream patch to fix this a while
| |
| 31 | 32 |
| 32 struct AVFormatContext; | 33 struct AVFormatContext; |
| 33 struct AVIOContext; | |
| 34 | 34 |
| 35 namespace media { | 35 namespace media { |
| 36 | 36 |
| 37 class ScopedPtrAVFree; | 37 class ScopedPtrAVFree; |
| 38 | 38 |
| 39 class MEDIA_EXPORT FFmpegURLProtocol { | 39 class MEDIA_EXPORT FFmpegURLProtocol { |
| 40 public: | 40 public: |
| 41 // Read the given amount of bytes into data, returns the number of bytes read | 41 // Read the given amount of bytes into data, returns the number of bytes read |
| 42 // if successful, kReadError otherwise. | 42 // if successful, kReadError otherwise. |
| 43 virtual int Read(int size, uint8* data) = 0; | 43 virtual int Read(int size, uint8* data) = 0; |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 74 bool open_called_; | 74 bool open_called_; |
| 75 AVFormatContext* format_context_; | 75 AVFormatContext* format_context_; |
| 76 scoped_ptr_malloc<AVIOContext, ScopedPtrAVFree> avio_context_; | 76 scoped_ptr_malloc<AVIOContext, ScopedPtrAVFree> avio_context_; |
| 77 | 77 |
| 78 DISALLOW_COPY_AND_ASSIGN(FFmpegGlue); | 78 DISALLOW_COPY_AND_ASSIGN(FFmpegGlue); |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 } // namespace media | 81 } // namespace media |
| 82 | 82 |
| 83 #endif // MEDIA_FILTERS_FFMPEG_GLUE_H_ | 83 #endif // MEDIA_FILTERS_FFMPEG_GLUE_H_ |
| OLD | NEW |