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

Unified Diff: media/base/bit_reader.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/BUILD.gn ('k') | media/base/bit_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/bit_reader.h
diff --git a/media/base/bit_reader.h b/media/base/bit_reader.h
index f17b201213dd6c63dc1ae0701d15b82a9d3a48e2..b3f230b31884384e3b5a6de27d27c85dd8256111 100644
--- a/media/base/bit_reader.h
+++ b/media/base/bit_reader.h
@@ -6,6 +6,7 @@
#define MEDIA_BASE_BIT_READER_H_
#include <stdint.h>
+#include <string>
#include "base/compiler_specific.h"
#include "base/macros.h"
@@ -30,6 +31,11 @@ class MEDIA_EXPORT BitReader
return bit_reader_core_.ReadFlag(flag);
}
+ // Read |num_bits| of binary data into |str|. |num_bits| must be a positive
+ // multiple of 8. This is not efficient for extracting large strings.
+ // If false is returned, |str| may not be valid.
+ bool ReadString(int num_bits, std::string* str);
+
bool SkipBits(int num_bits) {
return bit_reader_core_.SkipBits(num_bits);
}
« no previous file with comments | « media/BUILD.gn ('k') | media/base/bit_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698