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 #ifndef MEDIA_FILTERS_DECODER_STREAM_TRAITS_H_ | 5 #ifndef MEDIA_FILTERS_DECODER_STREAM_TRAITS_H_ |
6 #define MEDIA_FILTERS_DECODER_STREAM_TRAITS_H_ | 6 #define MEDIA_FILTERS_DECODER_STREAM_TRAITS_H_ |
7 | 7 |
8 #include "media/base/demuxer_stream.h" | 8 #include "media/base/demuxer_stream.h" |
9 #include "media/base/pipeline_status.h" | 9 #include "media/base/pipeline_status.h" |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 const DecoderConfigType& config, | 35 const DecoderConfigType& config, |
36 bool low_delay, | 36 bool low_delay, |
37 const PipelineStatusCB& status_cb, | 37 const PipelineStatusCB& status_cb, |
38 const OutputCB& output_cb); | 38 const OutputCB& output_cb); |
39 static bool FinishInitialization(const StreamInitCB& init_cb, | 39 static bool FinishInitialization(const StreamInitCB& init_cb, |
40 DecoderType* decoder, | 40 DecoderType* decoder, |
41 DemuxerStream* stream); | 41 DemuxerStream* stream); |
42 static void ReportStatistics(const StatisticsCB& statistics_cb, | 42 static void ReportStatistics(const StatisticsCB& statistics_cb, |
43 int bytes_decoded); | 43 int bytes_decoded); |
44 static DecoderConfigType GetDecoderConfig(DemuxerStream& stream); | 44 static DecoderConfigType GetDecoderConfig(DemuxerStream& stream); |
| 45 static scoped_refptr<OutputType> CreateEOSOutput(); |
45 }; | 46 }; |
46 | 47 |
47 template <> | 48 template <> |
48 struct DecoderStreamTraits<DemuxerStream::VIDEO> { | 49 struct DecoderStreamTraits<DemuxerStream::VIDEO> { |
49 typedef VideoFrame OutputType; | 50 typedef VideoFrame OutputType; |
50 typedef VideoDecoder DecoderType; | 51 typedef VideoDecoder DecoderType; |
51 typedef VideoDecoderConfig DecoderConfigType; | 52 typedef VideoDecoderConfig DecoderConfigType; |
52 typedef DecryptingVideoDecoder DecryptingDecoderType; | 53 typedef DecryptingVideoDecoder DecryptingDecoderType; |
53 typedef base::Callback<void(bool success)> StreamInitCB; | 54 typedef base::Callback<void(bool success)> StreamInitCB; |
54 typedef base::Callback<void(const scoped_refptr<OutputType>&)> OutputCB; | 55 typedef base::Callback<void(const scoped_refptr<OutputType>&)> OutputCB; |
55 | 56 |
56 static std::string ToString(); | 57 static std::string ToString(); |
57 static void Initialize(DecoderType* decoder, | 58 static void Initialize(DecoderType* decoder, |
58 const DecoderConfigType& config, | 59 const DecoderConfigType& config, |
59 bool low_delay, | 60 bool low_delay, |
60 const PipelineStatusCB& status_cb, | 61 const PipelineStatusCB& status_cb, |
61 const OutputCB& output_cb); | 62 const OutputCB& output_cb); |
62 static bool FinishInitialization(const StreamInitCB& init_cb, | 63 static bool FinishInitialization(const StreamInitCB& init_cb, |
63 DecoderType* decoder, | 64 DecoderType* decoder, |
64 DemuxerStream* stream); | 65 DemuxerStream* stream); |
65 static void ReportStatistics(const StatisticsCB& statistics_cb, | 66 static void ReportStatistics(const StatisticsCB& statistics_cb, |
66 int bytes_decoded); | 67 int bytes_decoded); |
67 static DecoderConfigType GetDecoderConfig(DemuxerStream& stream); | 68 static DecoderConfigType GetDecoderConfig(DemuxerStream& stream); |
| 69 static scoped_refptr<OutputType> CreateEOSOutput(); |
68 }; | 70 }; |
69 | 71 |
70 } // namespace media | 72 } // namespace media |
71 | 73 |
72 #endif // MEDIA_FILTERS_DECODER_STREAM_TRAITS_H_ | 74 #endif // MEDIA_FILTERS_DECODER_STREAM_TRAITS_H_ |
OLD | NEW |