diff options
author | Chong Zhang <chz@google.com> | 2015-02-06 16:36:43 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-02-06 16:36:43 +0000 |
commit | bb7ea7fd0e8738043a13c7c25178e2acc54796cc (patch) | |
tree | ad3833241b354d72b86a4cdaada78aa7006b6920 /media | |
parent | ca50950615848b02bee9ab5f2463ede6cc016bf0 (diff) | |
parent | 29eb804501a993ecdd4d1073240f2998264508ff (diff) | |
download | frameworks_av-bb7ea7fd0e8738043a13c7c25178e2acc54796cc.zip frameworks_av-bb7ea7fd0e8738043a13c7c25178e2acc54796cc.tar.gz frameworks_av-bb7ea7fd0e8738043a13c7c25178e2acc54796cc.tar.bz2 |
am 29eb8045: am 99cef1ef: allow HLS streams with CLOSED-CAPTIONS tag to play
* commit '29eb804501a993ecdd4d1073240f2998264508ff':
allow HLS streams with CLOSED-CAPTIONS tag to play
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/httplive/M3UParser.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libstagefright/httplive/M3UParser.cpp b/media/libstagefright/httplive/M3UParser.cpp index eb62c7a..997b694 100644 --- a/media/libstagefright/httplive/M3UParser.cpp +++ b/media/libstagefright/httplive/M3UParser.cpp @@ -35,6 +35,7 @@ struct M3UParser::MediaGroup : public RefBase { TYPE_AUDIO, TYPE_VIDEO, TYPE_SUBS, + TYPE_CC, }; enum FlagBits { @@ -991,6 +992,8 @@ status_t M3UParser::parseMedia(const AString &line) { groupType = MediaGroup::TYPE_AUDIO; } else if (!strcasecmp("video", val.c_str())) { groupType = MediaGroup::TYPE_VIDEO; + } else if (!strcasecmp("closed-captions", val.c_str())){ + groupType = MediaGroup::TYPE_CC; } else { ALOGE("Invalid media group type '%s'", val.c_str()); return ERROR_MALFORMED; @@ -1103,6 +1106,13 @@ status_t M3UParser::parseMedia(const AString &line) { return ERROR_MALFORMED; } + if (groupType == MediaGroup::TYPE_CC) { + // TODO: ignore this for now. + // CC track will be detected by CCDecoder. But we still need to + // pass the CC track flags (lang, auto) to the app in the future. + return OK; + } + uint32_t flags = 0; if (haveGroupAutoselect && groupAutoselect) { flags |= MediaGroup::FLAG_AUTOSELECT; |