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

Unified Diff: media/formats/mp2t/es_parser_h264.h

Issue 1517473002: Support HLS MPEG2 TS with SAMPLE-AES encryption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@encryption_scheme
Patch Set: tidying up prior to review Created 5 years 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
Index: media/formats/mp2t/es_parser_h264.h
diff --git a/media/formats/mp2t/es_parser_h264.h b/media/formats/mp2t/es_parser_h264.h
index b9d391daf9b16067cf9aa0401fbbf95617a4e895..cc30d5af11848299df80259cfd5678e41511a95b 100644
--- a/media/formats/mp2t/es_parser_h264.h
+++ b/media/formats/mp2t/es_parser_h264.h
@@ -13,6 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "media/base/media_export.h"
+#include "media/base/ranges.h"
#include "media/base/video_decoder_config.h"
#include "media/formats/mp2t/es_adapter_video.h"
#include "media/formats/mp2t/es_parser.h"
@@ -41,6 +42,12 @@ class MEDIA_EXPORT EsParserH264 : public EsParser {
EsParserH264(const NewVideoConfigCB& new_video_config_cb,
const EmitBufferCB& emit_buffer_cb);
+#ifdef ENABLE_HLS_SAMPLE_AES
+ EsParserH264(const NewVideoConfigCB& new_video_config_cb,
+ const EmitBufferCB& emit_buffer_cb,
+ const GetDecryptConfigCB& get_decrypt_config_cb,
+ bool use_hls_sample_aes);
+#endif
~EsParserH264() override;
// EsParser implementation.
@@ -76,6 +83,13 @@ class MEDIA_EXPORT EsParserH264 : public EsParser {
scoped_ptr<H264Parser> h264_parser_;
int64 current_access_unit_pos_;
int64 next_access_unit_pos_;
+#ifdef ENABLE_HLS_SAMPLE_AES
+ Ranges<int> protected_blocks_;
+ // Callback to obtain the current decrypt_config.
+ // Only called if use_hls_sample_aes_ is true.
+ GetDecryptConfigCB get_decrypt_config_cb_;
+ bool use_hls_sample_aes_;
+#endif
// Last video decoder config.
VideoDecoderConfig last_video_decoder_config_;

Powered by Google App Engine
This is Rietveld 408576698