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

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

Issue 1822333002: Motown: wholesale clang-format (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: dalesat 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 #ifndef SERVICES_MEDIA_FRAMEWORK_FFMPEG_AV_PACKET_H_ 5 #ifndef SERVICES_MEDIA_FRAMEWORK_FFMPEG_AV_PACKET_H_
6 #define SERVICES_MEDIA_FRAMEWORK_FFMPEG_AV_PACKET_H_ 6 #define SERVICES_MEDIA_FRAMEWORK_FFMPEG_AV_PACKET_H_
7 7
8 extern "C" { 8 extern "C" {
9 #include "third_party/ffmpeg/libavcodec/avcodec.h" 9 #include "third_party/ffmpeg/libavcodec/avcodec.h"
10 #include "third_party/ffmpeg/libavformat/avformat.h" 10 #include "third_party/ffmpeg/libavformat/avformat.h"
11 } 11 }
12 12
13 namespace mojo { 13 namespace mojo {
14 namespace media { 14 namespace media {
15 namespace ffmpeg { 15 namespace ffmpeg {
16 16
17 struct AVPacketDeleter { 17 struct AVPacketDeleter {
18 inline void operator()(AVPacket* ptr) const { 18 inline void operator()(AVPacket* ptr) const { av_free_packet(ptr); }
19 av_free_packet(ptr);
20 }
21 }; 19 };
22 20
23 using AvPacketPtr = std::unique_ptr<AVPacket, AVPacketDeleter>; 21 using AvPacketPtr = std::unique_ptr<AVPacket, AVPacketDeleter>;
24 22
25 struct AvPacket{ 23 struct AvPacket {
26 static AvPacketPtr Create() { 24 static AvPacketPtr Create() {
27 AVPacket* av_packet = new AVPacket(); 25 AVPacket* av_packet = new AVPacket();
28 av_init_packet(av_packet); 26 av_init_packet(av_packet);
29 return AvPacketPtr(av_packet); 27 return AvPacketPtr(av_packet);
30 } 28 }
31 }; 29 };
32 30
33 } // namespace ffmpeg 31 } // namespace ffmpeg
34 } // namespace media 32 } // namespace media
35 } // namespace mojo 33 } // namespace mojo
36 34
37 #endif // SERVICES_MEDIA_FRAMEWORK_FFMPEG_AV_PACKET_H_ 35 #endif // SERVICES_MEDIA_FRAMEWORK_FFMPEG_AV_PACKET_H_
OLDNEW
« no previous file with comments | « services/media/framework_ffmpeg/av_io_context.cc ('k') | services/media/framework_ffmpeg/ffmpeg_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698