Chromium Code Reviews| Index: media/filters/ffmpeg_demuxer.h |
| diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h |
| index 1056d07dc9a561d3562ef36a7caa647ab98f86cc..b270d95b94824c40bc50a7d7638632ac9e53fcbf 100644 |
| --- a/media/filters/ffmpeg_demuxer.h |
| +++ b/media/filters/ffmpeg_demuxer.h |
| @@ -22,6 +22,7 @@ |
| #ifndef MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
| #define MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
| +#include <string> |
| #include <vector> |
| #include "base/callback.h" |
| @@ -42,6 +43,14 @@ struct AVStream; |
| namespace media { |
| +// A new potentially encrypted stream has been parsed. |
| +// First parameter - The type of encryption. |
|
ddorwin
2013/03/10 21:29:39
s/encryption/initialization data/
fgalligan1
2013/03/12 00:42:42
Done.
|
| +// Second parameter - The initialization data associated with the stream. |
| +// Third parameter - Number of bytes of the initialization data. |
| +typedef base::Callback<void(const std::string& type, |
| + scoped_array<uint8> init_data, |
| + int init_data_size)> FFmpegNeedKeyCB; |
| + |
| class FFmpegDemuxer; |
| class FFmpegGlue; |
| class FFmpegH264ToAnnexBBitstreamConverter; |
| @@ -121,13 +130,17 @@ class FFmpegDemuxerStream : public DemuxerStream { |
| scoped_ptr<FFmpegH264ToAnnexBBitstreamConverter> bitstream_converter_; |
| bool bitstream_converter_enabled_; |
| + std::string audio_encryption_key_id_; |
|
ddorwin
2013/03/10 21:29:39
A demuxer stream only supports audio or video, rig
fgalligan1
2013/03/12 00:42:42
Done.
|
| + std::string video_encryption_key_id_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerStream); |
| }; |
| class MEDIA_EXPORT FFmpegDemuxer : public Demuxer { |
| public: |
| FFmpegDemuxer(const scoped_refptr<base::MessageLoopProxy>& message_loop, |
| - const scoped_refptr<DataSource>& data_source); |
| + const scoped_refptr<DataSource>& data_source, |
| + const FFmpegNeedKeyCB& need_key_cb); |
| // Demuxer implementation. |
| virtual void Initialize(DemuxerHost* host, |
| @@ -140,6 +153,11 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer { |
| DemuxerStream::Type type) OVERRIDE; |
| virtual base::TimeDelta GetStartTime() const OVERRIDE; |
| + // Calls |need_key_cb_| with the encryption key id of the decryption key |
|
ddorwin
2013/03/10 21:29:39
// Calls |need_key_cb_| with the initialization da
fgalligan1
2013/03/12 00:42:42
Done. I agree.
|
| + // that is needed. |
| + void FireNeedKey(const std::string& init_data_type, |
| + const std::string& encryption_key_id); |
| + |
| // Allow FFmpegDemuxerStream to notify us when there is updated information |
| // about capacity and what buffered data is available. |
| void NotifyCapacityAvailable(); |
| @@ -233,6 +251,8 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer { |
| BlockingUrlProtocol url_protocol_; |
| scoped_ptr<FFmpegGlue> glue_; |
| + const FFmpegNeedKeyCB need_key_cb_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
| }; |