Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: services/media/framework_ffmpeg/av_packet.h

Issue 1814553002: Motown: Improvements to packet definition (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Added a comment. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_AV_PACKET_H_
6 #define SERVICES_MEDIA_FRAMEWORK_FFMPEG_AV_PACKET_H_
7
8 extern "C" {
9 #include "third_party/ffmpeg/libavcodec/avcodec.h"
10 #include "third_party/ffmpeg/libavformat/avformat.h"
11 }
12
13 namespace mojo {
14 namespace media {
15 namespace ffmpeg {
16
17 struct AVPacketDeleter {
18 inline void operator()(AVPacket* ptr) const {
19 av_free_packet(ptr);
20 }
21 };
22
23 using AvPacketPtr = std::unique_ptr<AVPacket, AVPacketDeleter>;
24
25 struct AvPacket{
26 static AvPacketPtr Create() {
27 AVPacket* av_packet = new AVPacket();
28 av_init_packet(av_packet);
29 return AvPacketPtr(av_packet);
30 }
31 };
32
33 } // namespace ffmpeg
34 } // namespace media
35 } // namespace mojo
36
37 #endif // SERVICES_MEDIA_FRAMEWORK_FFMPEG_AV_PACKET_H_
OLDNEW
« no previous file with comments | « services/media/framework_ffmpeg/av_frame.h ('k') | services/media/framework_ffmpeg/ffmpeg_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698