OLD | NEW |
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_buffer.h" |
9 #include "media/base/audio_decoder.h" | 9 #include "media/base/audio_decoder.h" |
10 #include "media/base/audio_decoder_config.h" | 10 #include "media/base/audio_decoder_config.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 DecoderType* decoder, | 22 DecoderType* decoder, |
23 DemuxerStream* stream, | 23 DemuxerStream* stream, |
24 CdmContext* cdm_context, | 24 CdmContext* cdm_context, |
25 const InitCB& init_cb, | 25 const InitCB& init_cb, |
26 const OutputCB& output_cb) { | 26 const OutputCB& output_cb) { |
27 DCHECK(stream->audio_decoder_config().IsValidConfig()); | 27 DCHECK(stream->audio_decoder_config().IsValidConfig()); |
28 decoder->Initialize(stream->audio_decoder_config(), cdm_context, init_cb, | 28 decoder->Initialize(stream->audio_decoder_config(), cdm_context, init_cb, |
29 output_cb); | 29 output_cb); |
30 } | 30 } |
31 | 31 |
| 32 bool DecoderStreamTraits<DemuxerStream::AUDIO>::NeedsBitstreamConversion( |
| 33 DecoderType* decoder) { |
| 34 return decoder->NeedsBitstreamConversion(); |
| 35 } |
| 36 |
32 void DecoderStreamTraits<DemuxerStream::AUDIO>::ReportStatistics( | 37 void DecoderStreamTraits<DemuxerStream::AUDIO>::ReportStatistics( |
33 const StatisticsCB& statistics_cb, | 38 const StatisticsCB& statistics_cb, |
34 int bytes_decoded) { | 39 int bytes_decoded) { |
35 PipelineStatistics statistics; | 40 PipelineStatistics statistics; |
36 statistics.audio_bytes_decoded = bytes_decoded; | 41 statistics.audio_bytes_decoded = bytes_decoded; |
37 statistics_cb.Run(statistics); | 42 statistics_cb.Run(statistics); |
38 } | 43 } |
39 | 44 |
40 scoped_refptr<DecoderStreamTraits<DemuxerStream::AUDIO>::OutputType> | 45 scoped_refptr<DecoderStreamTraits<DemuxerStream::AUDIO>::OutputType> |
41 DecoderStreamTraits<DemuxerStream::AUDIO>::CreateEOSOutput() { | 46 DecoderStreamTraits<DemuxerStream::AUDIO>::CreateEOSOutput() { |
(...skipping 28 matching lines...) Expand all Loading... |
70 statistics.video_bytes_decoded = bytes_decoded; | 75 statistics.video_bytes_decoded = bytes_decoded; |
71 statistics_cb.Run(statistics); | 76 statistics_cb.Run(statistics); |
72 } | 77 } |
73 | 78 |
74 scoped_refptr<DecoderStreamTraits<DemuxerStream::VIDEO>::OutputType> | 79 scoped_refptr<DecoderStreamTraits<DemuxerStream::VIDEO>::OutputType> |
75 DecoderStreamTraits<DemuxerStream::VIDEO>::CreateEOSOutput() { | 80 DecoderStreamTraits<DemuxerStream::VIDEO>::CreateEOSOutput() { |
76 return OutputType::CreateEOSFrame(); | 81 return OutputType::CreateEOSFrame(); |
77 } | 82 } |
78 | 83 |
79 } // namespace media | 84 } // namespace media |
OLD | NEW |