Offline playback for fastball
[ Merge of http://go/wvgerrit/18560 ] This adds support for offline playback. If the content contains mutiple playlists which contain differing EXT-X-KEY attribute lists, each of those keys will need to be saved and restored into separate sessions. b/30041089 Test: Added unit tests to cover new functionality. Some oem_crypto, request_license_test failures but the same as without this CL. Change-Id: Ia1b877e12a67e8a720d29897ac7e2da236090123
This commit is contained in:
@@ -98,6 +98,13 @@ class DeviceFiles {
|
||||
CdmKeyMessage* license_request,
|
||||
CdmKeyResponse* license_response);
|
||||
|
||||
virtual bool StoreHlsAttributes(const std::string& key_set_id,
|
||||
const CdmHlsMethod method,
|
||||
const std::vector<uint8_t>& media_segment_iv);
|
||||
virtual bool RetrieveHlsAttributes(const std::string& key_set_id,
|
||||
CdmHlsMethod* method,
|
||||
std::vector<uint8_t>* media_segment_iv);
|
||||
virtual bool DeleteHlsAttributes(const std::string& key_set_id);
|
||||
private:
|
||||
// Helpers that wrap the File interface and automatically handle hashing, as
|
||||
// well as adding the device files base path to to the file name.
|
||||
@@ -112,6 +119,7 @@ class DeviceFiles {
|
||||
ssize_t GetFileSize(const std::string& name);
|
||||
|
||||
static std::string GetCertificateFileName();
|
||||
static std::string GetHlsAttributesFileNameExtension();
|
||||
static std::string GetLicenseFileNameExtension();
|
||||
static std::string GetUsageInfoFileName(const std::string& app_id);
|
||||
static std::string GetFileNameSafeHash(const std::string& input);
|
||||
@@ -122,6 +130,9 @@ class DeviceFiles {
|
||||
FRIEND_TEST(DeviceCertificateTest, ReadCertificate);
|
||||
FRIEND_TEST(DeviceCertificateTest, HasCertificate);
|
||||
FRIEND_TEST(DeviceFilesStoreTest, StoreLicense);
|
||||
FRIEND_TEST(DeviceFilesHlsAttributesTest, Delete);
|
||||
FRIEND_TEST(DeviceFilesHlsAttributesTest, Read);
|
||||
FRIEND_TEST(DeviceFilesHlsAttributesTest, Store);
|
||||
FRIEND_TEST(DeviceFilesTest, DeleteLicense);
|
||||
FRIEND_TEST(DeviceFilesTest, ReserveLicenseIdsDoesNotUseFileSystem);
|
||||
FRIEND_TEST(DeviceFilesTest, RetrieveLicenses);
|
||||
|
||||
Reference in New Issue
Block a user