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

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

Issue 1666653002: media: Remove SetCdmReadyCB and CdmReadyCB (part 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and fix compile errors Created 4 years, 10 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 | « media/filters/decoder_stream.cc ('k') | media/filters/decoder_stream_traits.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 #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/cdm_context.h" 8 #include "media/base/cdm_context.h"
9 #include "media/base/demuxer_stream.h" 9 #include "media/base/demuxer_stream.h"
10 #include "media/base/pipeline_status.h" 10 #include "media/base/pipeline_status.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 class AudioBuffer; 14 class AudioBuffer;
15 class AudioDecoder; 15 class AudioDecoder;
16 class CdmContext;
16 class DecryptingAudioDecoder; 17 class DecryptingAudioDecoder;
17 class DecryptingVideoDecoder; 18 class DecryptingVideoDecoder;
18 class DemuxerStream; 19 class DemuxerStream;
19 class VideoDecoder; 20 class VideoDecoder;
20 class VideoFrame; 21 class VideoFrame;
21 22
22 template <DemuxerStream::Type StreamType> 23 template <DemuxerStream::Type StreamType>
23 struct DecoderStreamTraits {}; 24 struct DecoderStreamTraits {};
24 25
25 template <> 26 template <>
26 struct DecoderStreamTraits<DemuxerStream::AUDIO> { 27 struct DecoderStreamTraits<DemuxerStream::AUDIO> {
27 typedef AudioBuffer OutputType; 28 typedef AudioBuffer OutputType;
28 typedef AudioDecoder DecoderType; 29 typedef AudioDecoder DecoderType;
29 typedef DecryptingAudioDecoder DecryptingDecoderType; 30 typedef DecryptingAudioDecoder DecryptingDecoderType;
30 typedef base::Callback<void(bool success)> InitCB; 31 typedef base::Callback<void(bool success)> InitCB;
31 typedef base::Callback<void(const scoped_refptr<OutputType>&)> OutputCB; 32 typedef base::Callback<void(const scoped_refptr<OutputType>&)> OutputCB;
32 33
33 static std::string ToString(); 34 static std::string ToString();
34 static void InitializeDecoder(DecoderType* decoder, 35 static void InitializeDecoder(DecoderType* decoder,
35 DemuxerStream* stream, 36 DemuxerStream* stream,
36 const SetCdmReadyCB& set_cdm_ready_cb, 37 CdmContext* cdm_context,
37 const InitCB& init_cb, 38 const InitCB& init_cb,
38 const OutputCB& output_cb); 39 const OutputCB& output_cb);
39 static bool NeedsBitstreamConversion(DecoderType* decoder) { return false; } 40 static bool NeedsBitstreamConversion(DecoderType* decoder) { return false; }
40 static void ReportStatistics(const StatisticsCB& statistics_cb, 41 static void ReportStatistics(const StatisticsCB& statistics_cb,
41 int bytes_decoded); 42 int bytes_decoded);
42 static scoped_refptr<OutputType> CreateEOSOutput(); 43 static scoped_refptr<OutputType> CreateEOSOutput();
43 }; 44 };
44 45
45 template <> 46 template <>
46 struct DecoderStreamTraits<DemuxerStream::VIDEO> { 47 struct DecoderStreamTraits<DemuxerStream::VIDEO> {
47 typedef VideoFrame OutputType; 48 typedef VideoFrame OutputType;
48 typedef VideoDecoder DecoderType; 49 typedef VideoDecoder DecoderType;
49 typedef DecryptingVideoDecoder DecryptingDecoderType; 50 typedef DecryptingVideoDecoder DecryptingDecoderType;
50 typedef base::Callback<void(bool success)> InitCB; 51 typedef base::Callback<void(bool success)> InitCB;
51 typedef base::Callback<void(const scoped_refptr<OutputType>&)> OutputCB; 52 typedef base::Callback<void(const scoped_refptr<OutputType>&)> OutputCB;
52 53
53 static std::string ToString(); 54 static std::string ToString();
54 static void InitializeDecoder(DecoderType* decoder, 55 static void InitializeDecoder(DecoderType* decoder,
55 DemuxerStream* stream, 56 DemuxerStream* stream,
56 const SetCdmReadyCB& set_cdm_ready_cb, 57 CdmContext* cdm_context,
57 const InitCB& init_cb, 58 const InitCB& init_cb,
58 const OutputCB& output_cb); 59 const OutputCB& output_cb);
59 static bool NeedsBitstreamConversion(DecoderType* decoder); 60 static bool NeedsBitstreamConversion(DecoderType* decoder);
60 static void ReportStatistics(const StatisticsCB& statistics_cb, 61 static void ReportStatistics(const StatisticsCB& statistics_cb,
61 int bytes_decoded); 62 int bytes_decoded);
62 static scoped_refptr<OutputType> CreateEOSOutput(); 63 static scoped_refptr<OutputType> CreateEOSOutput();
63 }; 64 };
64 65
65 } // namespace media 66 } // namespace media
66 67
67 #endif // MEDIA_FILTERS_DECODER_STREAM_TRAITS_H_ 68 #endif // MEDIA_FILTERS_DECODER_STREAM_TRAITS_H_
OLDNEW
« no previous file with comments | « media/filters/decoder_stream.cc ('k') | media/filters/decoder_stream_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698