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

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

Issue 10535029: Add support for encrypted WebM files as defined in the RFC. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressing comments in the CL. Created 8 years, 6 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
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_FFMPEG_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 18 matching lines...) Expand all
29 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, 29 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream,
30 const PipelineStatusCB& status_cb, 30 const PipelineStatusCB& status_cb,
31 const StatisticsCB& statistics_cb) OVERRIDE; 31 const StatisticsCB& statistics_cb) OVERRIDE;
32 virtual void Read(const ReadCB& read_cb) OVERRIDE; 32 virtual void Read(const ReadCB& read_cb) OVERRIDE;
33 virtual void Reset(const base::Closure& closure) OVERRIDE; 33 virtual void Reset(const base::Closure& closure) OVERRIDE;
34 virtual void Stop(const base::Closure& closure) OVERRIDE; 34 virtual void Stop(const base::Closure& closure) OVERRIDE;
35 virtual const gfx::Size& natural_size() OVERRIDE; 35 virtual const gfx::Size& natural_size() OVERRIDE;
36 36
37 // Must be called prior to initialization if decrypted buffers will be 37 // Must be called prior to initialization if decrypted buffers will be
38 // encountered. 38 // encountered.
39 void set_decryptor(AesDecryptor* decryptor); 39 void set_decryptor(HmacAesDecryptor* decryptor);
40 40
41 protected: 41 protected:
42 virtual ~FFmpegVideoDecoder(); 42 virtual ~FFmpegVideoDecoder();
43 43
44 private: 44 private:
45 enum DecoderState { 45 enum DecoderState {
46 kUninitialized, 46 kUninitialized,
47 kNormal, 47 kNormal,
48 kFlushCodec, 48 kFlushCodec,
49 kDecodeFinished, 49 kDecodeFinished,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 int frame_rate_numerator_; 95 int frame_rate_numerator_;
96 int frame_rate_denominator_; 96 int frame_rate_denominator_;
97 97
98 // TODO(scherkus): I think this should be calculated by VideoRenderers based 98 // TODO(scherkus): I think this should be calculated by VideoRenderers based
99 // on information provided by VideoDecoders (i.e., aspect ratio). 99 // on information provided by VideoDecoders (i.e., aspect ratio).
100 gfx::Size natural_size_; 100 gfx::Size natural_size_;
101 101
102 // Pointer to the demuxer stream that will feed us compressed buffers. 102 // Pointer to the demuxer stream that will feed us compressed buffers.
103 scoped_refptr<DemuxerStream> demuxer_stream_; 103 scoped_refptr<DemuxerStream> demuxer_stream_;
104 104
105 AesDecryptor* decryptor_; 105 HmacAesDecryptor* decryptor_;
106 106
107 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); 107 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder);
108 }; 108 };
109 109
110 } // namespace media 110 } // namespace media
111 111
112 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ 112 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698