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

Side by Side Diff: services/media/framework_ffmpeg/ffmpeg_decoder_base.cc

Issue 1833323002: Motown: Add ActiveMultistreamSource model in preparation for the ffmpeg demux with async I/O (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: dalesat Created 4 years, 8 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
« no previous file with comments | « services/media/framework/stages/util.cc ('k') | services/media/framework_mojo/mojo_producer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "base/logging.h" 5 #include "base/logging.h"
6 #include "services/media/framework_ffmpeg/av_codec_context.h" 6 #include "services/media/framework_ffmpeg/av_codec_context.h"
7 #include "services/media/framework_ffmpeg/ffmpeg_decoder_base.h" 7 #include "services/media/framework_ffmpeg/ffmpeg_decoder_base.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 namespace media { 10 namespace media {
11 11
12 FfmpegDecoderBase::FfmpegDecoderBase(AvCodecContextPtr av_codec_context) 12 FfmpegDecoderBase::FfmpegDecoderBase(AvCodecContextPtr av_codec_context)
13 : av_codec_context_(std::move(av_codec_context)), 13 : av_codec_context_(std::move(av_codec_context)),
14 av_frame_ptr_(av_frame_alloc()) { 14 av_frame_ptr_(ffmpeg::AvFrame::Create()) {
15 DCHECK(av_codec_context_); 15 DCHECK(av_codec_context_);
16 } 16 }
17 17
18 FfmpegDecoderBase::~FfmpegDecoderBase() {} 18 FfmpegDecoderBase::~FfmpegDecoderBase() {}
19 19
20 std::unique_ptr<StreamType> FfmpegDecoderBase::output_stream_type() { 20 std::unique_ptr<StreamType> FfmpegDecoderBase::output_stream_type() {
21 return AvCodecContext::GetStreamType(*av_codec_context_); 21 return AvCodecContext::GetStreamType(*av_codec_context_);
22 } 22 }
23 23
24 void FfmpegDecoderBase::Flush() { 24 void FfmpegDecoderBase::Flush() {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 av_packet_.size = 0; 90 av_packet_.size = 0;
91 av_packet_.data = nullptr; 91 av_packet_.data = nullptr;
92 92
93 return true; 93 return true;
94 } 94 }
95 95
96 } // namespace media 96 } // namespace media
97 } // namespace mojo 97 } // namespace mojo
OLDNEW
« no previous file with comments | « services/media/framework/stages/util.cc ('k') | services/media/framework_mojo/mojo_producer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698