OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SERVICES_MEDIA_FRAMEWORK_FFMPEG_FFMPEG_IO_H_ |
| 6 #define SERVICES_MEDIA_FRAMEWORK_FFMPEG_FFMPEG_IO_H_ |
| 7 |
| 8 #include "services/media/framework/parts/reader.h" |
| 9 extern "C" { |
| 10 #include "third_party/ffmpeg/libavformat/avio.h" |
| 11 } |
| 12 |
| 13 namespace mojo { |
| 14 namespace media { |
| 15 |
| 16 struct AVIOContextDeleter { |
| 17 void operator()(AVIOContext* context) const { |
| 18 av_free(context->buffer); |
| 19 av_free(context); |
| 20 } |
| 21 }; |
| 22 |
| 23 using AvioContextPtr = std::unique_ptr<AVIOContext, AVIOContextDeleter>; |
| 24 |
| 25 // Creates an ffmpeg avio_context for a given reader. |
| 26 AvioContextPtr CreateAvioContext(Reader* reader); |
| 27 |
| 28 } // namespace media |
| 29 } // namespace mojo |
| 30 |
| 31 #endif // SERVICES_MEDIA_FRAMEWORK_FFMPEG_FFMPEG_IO_H_ |
OLD | NEW |