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

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

Issue 11745026: Encrypted Media: Add config change support in DecryptingVideoDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove ffvd changes; will do that in another CL Created 7 years, 11 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 | « no previous file | media/filters/decrypting_video_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DECRYPTING_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "media/base/decryptor.h" 10 #include "media/base/decryptor.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 private: 49 private:
50 // For a detailed state diagram please see this link: http://goo.gl/8jAok 50 // For a detailed state diagram please see this link: http://goo.gl/8jAok
51 // TODO(xhwang): Add a ASCII state diagram in this file after this class 51 // TODO(xhwang): Add a ASCII state diagram in this file after this class
52 // stabilizes. 52 // stabilizes.
53 enum State { 53 enum State {
54 kUninitialized = 0, 54 kUninitialized = 0,
55 kDecryptorRequested, 55 kDecryptorRequested,
56 kPendingDecoderInit, 56 kPendingDecoderInit,
57 kIdle, 57 kIdle,
58 kPendingConfigChange,
58 kPendingDemuxerRead, 59 kPendingDemuxerRead,
59 kPendingDecode, 60 kPendingDecode,
60 kWaitingForKey, 61 kWaitingForKey,
61 kDecodeFinished, 62 kDecodeFinished,
62 kStopped 63 kStopped
63 }; 64 };
64 65
65 // Callback for DecryptorHost::RequestDecryptor(). 66 // Callback for DecryptorHost::RequestDecryptor().
66 void SetDecryptor(Decryptor* decryptor); 67 void SetDecryptor(Decryptor* decryptor);
67 68
68 // Callback for Decryptor::InitializeVideoDecoder(). 69 // Callback for Decryptor::InitializeVideoDecoder() during initialization.
69 void FinishInitialization(bool success); 70 void FinishInitialization(bool success);
70 71
72 // Callback for Decryptor::InitializeVideoDecoder() during config change.
73 void FinishConfigChange(bool success);
74
71 void ReadFromDemuxerStream(); 75 void ReadFromDemuxerStream();
72 76
73 // Callback for DemuxerStream::Read(). 77 // Callback for DemuxerStream::Read().
74 void DecryptAndDecodeBuffer(DemuxerStream::Status status, 78 void DecryptAndDecodeBuffer(DemuxerStream::Status status,
75 const scoped_refptr<DecoderBuffer>& buffer); 79 const scoped_refptr<DecoderBuffer>& buffer);
76 80
77 void DecodePendingBuffer(); 81 void DecodePendingBuffer();
78 82
79 // Callback for Decryptor::DecryptAndDecodeVideo(). 83 // Callback for Decryptor::DecryptAndDecodeVideo().
80 void DeliverFrame(int buffer_size, 84 void DeliverFrame(int buffer_size,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // A unique ID to trace Decryptor::DecryptAndDecodeVideo() call and the 125 // A unique ID to trace Decryptor::DecryptAndDecodeVideo() call and the
122 // matching DecryptCB call (in DoDeliverFrame()). 126 // matching DecryptCB call (in DoDeliverFrame()).
123 uint32 trace_id_; 127 uint32 trace_id_;
124 128
125 DISALLOW_COPY_AND_ASSIGN(DecryptingVideoDecoder); 129 DISALLOW_COPY_AND_ASSIGN(DecryptingVideoDecoder);
126 }; 130 };
127 131
128 } // namespace media 132 } // namespace media
129 133
130 #endif // MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_ 134 #endif // MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/decrypting_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698