diff options
author | Gloria Wang <gwang@google.com> | 2010-11-01 15:53:16 -0700 |
---|---|---|
committer | Gloria Wang <gwang@google.com> | 2010-11-05 10:33:58 -0700 |
commit | b371426ce4cf2fa6d8c3d1903b61322feb165d35 (patch) | |
tree | ce2c36b33cf39e393b68d5feba1cb03d7ef0ed53 /media/libstagefright/include | |
parent | a935bc4696e4060c362b0f6913cc220331667a35 (diff) | |
download | frameworks_av-b371426ce4cf2fa6d8c3d1903b61322feb165d35.zip frameworks_av-b371426ce4cf2fa6d8c3d1903b61322feb165d35.tar.gz frameworks_av-b371426ce4cf2fa6d8c3d1903b61322feb165d35.tar.bz2 |
Add support for WV DRM
Change-Id: I0408c5e0a488f112a84337b21b0cd4613a4da461
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r-- | media/libstagefright/include/NuCachedSource2.h | 2 | ||||
-rw-r--r-- | media/libstagefright/include/NuHTTPDataSource.h | 7 | ||||
-rw-r--r-- | media/libstagefright/include/WVMExtractor.h | 51 |
3 files changed, 60 insertions, 0 deletions
diff --git a/media/libstagefright/include/NuCachedSource2.h b/media/libstagefright/include/NuCachedSource2.h index 1fb2088..4067585 100644 --- a/media/libstagefright/include/NuCachedSource2.h +++ b/media/libstagefright/include/NuCachedSource2.h @@ -37,6 +37,8 @@ struct NuCachedSource2 : public DataSource { virtual status_t getSize(off_t *size); virtual uint32_t flags(); + virtual DecryptHandle* DrmInitialization(DrmManagerClient *client); + virtual void getDrmInfo(DecryptHandle **handle, DrmManagerClient **client); //////////////////////////////////////////////////////////////////////////// size_t cachedSize(); diff --git a/media/libstagefright/include/NuHTTPDataSource.h b/media/libstagefright/include/NuHTTPDataSource.h index 8593a91..93b7a76 100644 --- a/media/libstagefright/include/NuHTTPDataSource.h +++ b/media/libstagefright/include/NuHTTPDataSource.h @@ -26,6 +26,9 @@ struct NuHTTPDataSource : public DataSource { virtual status_t getSize(off_t *size); virtual uint32_t flags(); + virtual DecryptHandle* DrmInitialization(DrmManagerClient *client); + virtual void getDrmInfo(DecryptHandle **handle, DrmManagerClient **client); + protected: virtual ~NuHTTPDataSource(); @@ -44,12 +47,16 @@ private: unsigned mPort; String8 mPath; String8 mHeaders; + String8 mUri; HTTPStream mHTTP; off_t mOffset; off_t mContentLength; bool mContentLengthValid; + DecryptHandle *mDecryptHandle; + DrmManagerClient *mDrmManagerClient; + status_t connect( const char *uri, const String8 &headers, off_t offset); diff --git a/media/libstagefright/include/WVMExtractor.h b/media/libstagefright/include/WVMExtractor.h new file mode 100644 index 0000000..0da45a8 --- /dev/null +++ b/media/libstagefright/include/WVMExtractor.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef WVM_EXTRACTOR_H_ + +#define WVM_EXTRACTOR_H_ + +#include <media/stagefright/MediaExtractor.h> + +namespace android { + +class DataSource; + +class WVMExtractor : public MediaExtractor { +public: + WVMExtractor(const sp<DataSource> &source); + + virtual size_t countTracks(); + virtual sp<MediaSource> getTrack(size_t index); + virtual sp<MetaData> getTrackMetaData(size_t index, uint32_t flags); + virtual sp<MetaData> getMetaData(); + +protected: + virtual ~WVMExtractor(); + +private: + sp<DataSource> mDataSource; + sp<MediaExtractor> mImpl; + + WVMExtractor(const WVMExtractor &); + WVMExtractor &operator=(const WVMExtractor &); + +}; + +} // namespace android + +#endif // DRM_EXTRACTOR_H_ + |