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

Side by Side Diff: media/filters/decoder_stream_traits.cc

Issue 339653003: No EOS frame in {Audio|Video}Decoder::OutputCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « media/filters/decoder_stream_traits.h ('k') | media/filters/decrypting_audio_decoder.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/filters/decoder_stream_traits.h" 5 #include "media/filters/decoder_stream_traits.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/base/audio_buffer.h"
8 #include "media/base/audio_decoder.h" 9 #include "media/base/audio_decoder.h"
9 #include "media/base/audio_decoder_config.h" 10 #include "media/base/audio_decoder_config.h"
10 #include "media/base/video_decoder.h" 11 #include "media/base/video_decoder.h"
11 #include "media/base/video_decoder_config.h" 12 #include "media/base/video_decoder_config.h"
13 #include "media/base/video_frame.h"
12 14
13 namespace media { 15 namespace media {
14 16
15 std::string DecoderStreamTraits<DemuxerStream::AUDIO>::ToString() { 17 std::string DecoderStreamTraits<DemuxerStream::AUDIO>::ToString() {
16 return "Audio"; 18 return "Audio";
17 } 19 }
18 20
19 void DecoderStreamTraits<DemuxerStream::AUDIO>::Initialize( 21 void DecoderStreamTraits<DemuxerStream::AUDIO>::Initialize(
20 DecoderType* decoder, 22 DecoderType* decoder,
21 const DecoderConfigType& config, 23 const DecoderConfigType& config,
(...skipping 23 matching lines...) Expand all
45 statistics.audio_bytes_decoded = bytes_decoded; 47 statistics.audio_bytes_decoded = bytes_decoded;
46 statistics_cb.Run(statistics); 48 statistics_cb.Run(statistics);
47 } 49 }
48 50
49 DecoderStreamTraits<DemuxerStream::AUDIO>::DecoderConfigType 51 DecoderStreamTraits<DemuxerStream::AUDIO>::DecoderConfigType
50 DecoderStreamTraits<DemuxerStream::AUDIO>::GetDecoderConfig( 52 DecoderStreamTraits<DemuxerStream::AUDIO>::GetDecoderConfig(
51 DemuxerStream& stream) { 53 DemuxerStream& stream) {
52 return stream.audio_decoder_config(); 54 return stream.audio_decoder_config();
53 } 55 }
54 56
57 scoped_refptr<DecoderStreamTraits<DemuxerStream::AUDIO>::OutputType>
58 DecoderStreamTraits<DemuxerStream::AUDIO>::CreateEOSOutput() {
59 return OutputType::CreateEOSBuffer();
60 }
61
55 std::string DecoderStreamTraits<DemuxerStream::VIDEO>::ToString() { 62 std::string DecoderStreamTraits<DemuxerStream::VIDEO>::ToString() {
56 return "Video"; 63 return "Video";
57 } 64 }
58 65
59 void DecoderStreamTraits<DemuxerStream::VIDEO>::Initialize( 66 void DecoderStreamTraits<DemuxerStream::VIDEO>::Initialize(
60 DecoderType* decoder, 67 DecoderType* decoder,
61 const DecoderConfigType& config, 68 const DecoderConfigType& config,
62 bool low_delay, 69 bool low_delay,
63 const PipelineStatusCB& status_cb, 70 const PipelineStatusCB& status_cb,
64 const OutputCB& output_cb) { 71 const OutputCB& output_cb) {
(...skipping 22 matching lines...) Expand all
87 statistics.video_bytes_decoded = bytes_decoded; 94 statistics.video_bytes_decoded = bytes_decoded;
88 statistics_cb.Run(statistics); 95 statistics_cb.Run(statistics);
89 } 96 }
90 97
91 DecoderStreamTraits<DemuxerStream::VIDEO>::DecoderConfigType 98 DecoderStreamTraits<DemuxerStream::VIDEO>::DecoderConfigType
92 DecoderStreamTraits<DemuxerStream::VIDEO>::GetDecoderConfig( 99 DecoderStreamTraits<DemuxerStream::VIDEO>::GetDecoderConfig(
93 DemuxerStream& stream) { 100 DemuxerStream& stream) {
94 return stream.video_decoder_config(); 101 return stream.video_decoder_config();
95 } 102 }
96 103
104 scoped_refptr<DecoderStreamTraits<DemuxerStream::VIDEO>::OutputType>
105 DecoderStreamTraits<DemuxerStream::VIDEO>::CreateEOSOutput() {
106 return OutputType::CreateEOSFrame();
107 }
108
97 } // namespace media 109 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/decoder_stream_traits.h ('k') | media/filters/decrypting_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698