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

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: 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/base/bit_reader.h
diff --git a/media/base/bit_reader.h b/media/base/bit_reader.h
index fda854162a64f23478302625af58c8f39dbe8dba..341c7f71d1794cedf9f1d6f57a33cc2b58e9c020 100644
--- a/media/base/bit_reader.h
+++ b/media/base/bit_reader.h
@@ -5,6 +5,8 @@
#ifndef MEDIA_BASE_BIT_READER_H_
#define MEDIA_BASE_BIT_READER_H_
+#include <string>
+
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
@@ -33,6 +35,10 @@ class MEDIA_EXPORT BitReader
return bit_reader_core_.SkipBits(num_bits);
}
+ // Read |num_bits| of binary data into |str|. |num_bits| must be a multiple
ddorwin 2015/12/10 20:10:58 nit: move up with the other Read*().
dougsteed 2015/12/14 22:51:46 Done.
+ // of 8. This is not efficient for extracting large strings.
+ bool ReadString(int num_bits, std::string* str);
+
int bits_available() const {
return initial_size_ * 8 - bits_read();
}

Powered by Google App Engine
This is Rietveld 408576698