OLD | NEW |
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 #include "base/logging.h" | 5 #include "base/logging.h" |
6 #include "services/media/framework_ffmpeg/ffmpeg_video_decoder.h" | 6 #include "services/media/framework_ffmpeg/ffmpeg_video_decoder.h" |
7 | 7 |
8 namespace mojo { | 8 namespace mojo { |
9 namespace media { | 9 namespace media { |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 PacketPtr FfmpegVideoDecoder::CreateOutputPacket( | 39 PacketPtr FfmpegVideoDecoder::CreateOutputPacket( |
40 const AVFrame& av_frame, | 40 const AVFrame& av_frame, |
41 PayloadAllocator* allocator) { | 41 PayloadAllocator* allocator) { |
42 DCHECK(allocator); | 42 DCHECK(allocator); |
43 | 43 |
44 // End of stream is indicated when we're draining and produce no packet. | 44 // End of stream is indicated when we're draining and produce no packet. |
45 // TODO(dalesat): This is just a copy of the audio version. | 45 // TODO(dalesat): This is just a copy of the audio version. |
46 return Packet::Create( | 46 return Packet::Create( |
47 av_frame.pts, | 47 av_frame.pts, |
48 av_frame.pkt_duration, | |
49 false, | 48 false, |
50 packet_size_, | 49 packet_size_, |
51 av_frame.data[0], | 50 av_frame.data[0], |
52 allocator); | 51 allocator); |
53 } | 52 } |
54 | 53 |
55 PacketPtr FfmpegVideoDecoder::CreateOutputEndOfStreamPacket() { | 54 PacketPtr FfmpegVideoDecoder::CreateOutputEndOfStreamPacket() { |
56 // TODO(dalesat): Presentation time for this packet. | 55 // TODO(dalesat): Presentation time for this packet. |
57 return Packet::CreateEndOfStream(0); | 56 return Packet::CreateEndOfStream(0); |
58 } | 57 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 104 } |
106 | 105 |
107 void FfmpegVideoDecoder::ReleaseBufferForAvFrame( | 106 void FfmpegVideoDecoder::ReleaseBufferForAvFrame( |
108 void* opaque, uint8_t* buffer) { | 107 void* opaque, uint8_t* buffer) { |
109 // Nothing to do. | 108 // Nothing to do. |
110 // TODO(dalesat): Can we get rid of this method altogether? | 109 // TODO(dalesat): Can we get rid of this method altogether? |
111 } | 110 } |
112 | 111 |
113 } // namespace media | 112 } // namespace media |
114 } // namespace mojo | 113 } // namespace mojo |
OLD | NEW |