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

Unified Diff: media/formats/mp2t/es_parser_adts.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: rebase Created 4 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
« no previous file with comments | « media/formats/mp2t/es_parser.h ('k') | media/formats/mp2t/es_parser_adts.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp2t/es_parser_adts.h
diff --git a/media/formats/mp2t/es_parser_adts.h b/media/formats/mp2t/es_parser_adts.h
index a7adfc5b299fdee63966c8cee1dacd35d6acd88b..3b52f6edeb573b0c9ea6f8b50a3feebdc137eba0 100644
--- a/media/formats/mp2t/es_parser_adts.h
+++ b/media/formats/mp2t/es_parser_adts.h
@@ -16,9 +16,11 @@
#include "base/macros.h"
#include "base/time/time.h"
#include "media/base/audio_decoder_config.h"
+#include "media/base/decrypt_config.h"
#include "media/base/media_export.h"
#include "media/formats/mp2t/es_parser.h"
#include "media/formats/mpeg/adts_stream_parser.h"
+#include "media/media_features.h"
namespace media {
class AudioTimestampHelper;
@@ -34,6 +36,14 @@ class MEDIA_EXPORT EsParserAdts : public EsParser {
EsParserAdts(const NewAudioConfigCB& new_audio_config_cb,
const EmitBufferCB& emit_buffer_cb,
bool sbr_in_mimetype);
+#if BUILDFLAG(ENABLE_HLS_SAMPLE_AES)
+ EsParserAdts(const NewAudioConfigCB& new_audio_config_cb,
+ const EmitBufferCB& emit_buffer_cb,
+ const GetDecryptConfigCB& get_decrypt_config_cb,
+ bool use_hls_sample_aes,
+ bool sbr_in_mimetype);
+#endif
+
~EsParserAdts() override;
// EsParser implementation.
@@ -61,11 +71,21 @@ class MEDIA_EXPORT EsParserAdts : public EsParser {
// a supported ADTS audio config.
bool UpdateAudioConfiguration(const uint8_t* adts_header, int size);
+#if BUILDFLAG(ENABLE_HLS_SAMPLE_AES)
+ void CalculateSubsamplesForAdtsFrame(const AdtsFrame& adts_frame,
+ std::vector<SubsampleEntry>* subsamples);
+#endif
+
// Callbacks:
// - to signal a new audio configuration,
// - to send ES buffers.
NewAudioConfigCB new_audio_config_cb_;
EmitBufferCB emit_buffer_cb_;
+#if BUILDFLAG(ENABLE_HLS_SAMPLE_AES)
+ // - to obtain the current decrypt_config. Only called if use_hls_sample_aes_.
+ GetDecryptConfigCB get_decrypt_config_cb_;
+ bool use_hls_sample_aes_;
+#endif
// True when AAC SBR extension is signalled in the mimetype
// (mp4a.40.5 in the codecs parameter).
« no previous file with comments | « media/formats/mp2t/es_parser.h ('k') | media/formats/mp2t/es_parser_adts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698