| Index: services/media/framework_ffmpeg/av_frame.h
|
| diff --git a/services/media/framework_ffmpeg/av_frame.h b/services/media/framework_ffmpeg/av_frame.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fa6a2ee39c57581c574609a5490acbb03729e991
|
| --- /dev/null
|
| +++ b/services/media/framework_ffmpeg/av_frame.h
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef SERVICES_MEDIA_FRAMEWORK_FFMPEG_AV_FRAME_H_
|
| +#define SERVICES_MEDIA_FRAMEWORK_FFMPEG_AV_FRAME_H_
|
| +
|
| +extern "C" {
|
| +#include "third_party/ffmpeg/libavutil/frame.h"
|
| +}
|
| +
|
| +namespace mojo {
|
| +namespace media {
|
| +
|
| +struct AVFrameDeleter {
|
| + inline void operator()(AVFrame* ptr) const {
|
| + av_frame_free(&ptr);
|
| + }
|
| +};
|
| +
|
| +using AvFramePtr = std::unique_ptr<AVFrame, AVFrameDeleter>;
|
| +
|
| +struct AvFrame{
|
| + static AvFramePtr Create() {
|
| + return AvFramePtr(av_frame_alloc());
|
| + }
|
| +};
|
| +
|
| +} // namespace media
|
| +} // namespace mojo
|
| +
|
| +#endif // SERVICES_MEDIA_FRAMEWORK_FFMPEG_AV_FRAME_H_
|
|
|