diff options
author | Lajos Molnar <lajos@google.com> | 2014-03-18 19:46:52 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2014-03-19 10:20:22 -0700 |
commit | d74110cdef2becd4f7fd2334c34c3ca73f56b355 (patch) | |
tree | e2c336f499b4d56fecb122dc0f203217ab5e9103 /include | |
parent | 8c75ab3416313843314446c5bbeafa62b83f0d63 (diff) | |
download | frameworks_av-d74110cdef2becd4f7fd2334c34c3ca73f56b355.zip frameworks_av-d74110cdef2becd4f7fd2334c34c3ca73f56b355.tar.gz frameworks_av-d74110cdef2becd4f7fd2334c34c3ca73f56b355.tar.bz2 |
stagefright: add include support for MediaCodecList xml parser
One can include full-formed XML files using <Include href=".." />.
For security/simplicity, file names must be in the form of
"media_codecs_.*\.xml"
Change-Id: Id039a4fd0ade390224485fcf5ecc1d107b2bdb9a
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/MediaCodecList.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/media/stagefright/MediaCodecList.h b/include/media/stagefright/MediaCodecList.h index 590623b..01a5daf 100644 --- a/include/media/stagefright/MediaCodecList.h +++ b/include/media/stagefright/MediaCodecList.h @@ -60,6 +60,7 @@ private: SECTION_DECODER, SECTION_ENCODERS, SECTION_ENCODER, + SECTION_INCLUDE, }; struct CodecInfo { @@ -73,7 +74,9 @@ private: status_t mInitCheck; Section mCurrentSection; + Vector<Section> mPastSections; int32_t mDepth; + AString mHrefBase; Vector<CodecInfo> mCodecInfos; KeyedVector<AString, size_t> mCodecQuirks; @@ -83,7 +86,8 @@ private: ~MediaCodecList(); status_t initCheck() const; - void parseXMLFile(FILE *file); + void parseXMLFile(const char *path); + void parseTopLevelXMLFile(const char *path); static void StartElementHandlerWrapper( void *me, const char *name, const char **attrs); @@ -93,6 +97,7 @@ private: void startElementHandler(const char *name, const char **attrs); void endElementHandler(const char *name); + status_t includeXMLFile(const char **attrs); status_t addMediaCodecFromAttributes(bool encoder, const char **attrs); void addMediaCodec(bool encoder, const char *name, const char *type = NULL); |