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

Unified Diff: media/filters/decrypting_video_decoder.h

Issue 16274005: Separate DemuxerStream and VideoDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win64 Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/decrypting_demuxer_stream.h ('k') | media/filters/decrypting_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decrypting_video_decoder.h
diff --git a/media/filters/decrypting_video_decoder.h b/media/filters/decrypting_video_decoder.h
index 6cbf9bc0fc7659ad4c4dd3b3866130902f4ec119..af9099feb80fb011a16671ecf78fc42fd2c82b96 100644
--- a/media/filters/decrypting_video_decoder.h
+++ b/media/filters/decrypting_video_decoder.h
@@ -8,8 +8,8 @@
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
#include "media/base/decryptor.h"
-#include "media/base/demuxer_stream.h"
#include "media/base/video_decoder.h"
+#include "media/base/video_decoder_config.h"
namespace base {
class MessageLoopProxy;
@@ -32,10 +32,11 @@ class MEDIA_EXPORT DecryptingVideoDecoder : public VideoDecoder {
virtual ~DecryptingVideoDecoder();
// VideoDecoder implementation.
- virtual void Initialize(DemuxerStream* stream,
+ virtual void Initialize(const VideoDecoderConfig& config,
const PipelineStatusCB& status_cb,
const StatisticsCB& statistics_cb) OVERRIDE;
- virtual void Read(const ReadCB& read_cb) OVERRIDE;
+ virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer,
+ const ReadCB& read_cb) OVERRIDE;
virtual void Reset(const base::Closure& closure) OVERRIDE;
virtual void Stop(const base::Closure& closure) OVERRIDE;
@@ -48,7 +49,6 @@ class MEDIA_EXPORT DecryptingVideoDecoder : public VideoDecoder {
kDecryptorRequested,
kPendingDecoderInit,
kIdle,
- kPendingDemuxerRead,
kPendingDecode,
kWaitingForKey,
kDecodeFinished,
@@ -62,12 +62,6 @@ class MEDIA_EXPORT DecryptingVideoDecoder : public VideoDecoder {
// Callback for Decryptor::InitializeVideoDecoder() during initialization.
void FinishInitialization(bool success);
- void ReadFromDemuxerStream();
-
- // Callback for DemuxerStream::Read().
- void DecryptAndDecodeBuffer(DemuxerStream::Status status,
- const scoped_refptr<DecoderBuffer>& buffer);
-
void DecodePendingBuffer();
// Callback for Decryptor::DecryptAndDecodeVideo().
@@ -96,15 +90,14 @@ class MEDIA_EXPORT DecryptingVideoDecoder : public VideoDecoder {
ReadCB read_cb_;
base::Closure reset_cb_;
- // Pointer to the demuxer stream that will feed us compressed buffers.
- DemuxerStream* demuxer_stream_;
+ VideoDecoderConfig config_;
// Callback to request/cancel decryptor creation notification.
SetDecryptorReadyCB set_decryptor_ready_cb_;
Decryptor* decryptor_;
- // The buffer returned by the demuxer that needs decrypting/decoding.
+ // The buffer that needs decrypting/decoding.
scoped_refptr<media::DecoderBuffer> pending_buffer_to_decode_;
// Indicates the situation where new key is added during pending decode
« no previous file with comments | « media/filters/decrypting_demuxer_stream.h ('k') | media/filters/decrypting_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698