Media: Unify and clean up logic related to checking codec platform support |
|||||
Issue descriptionmedia::MimeUtil has too many paths responsible for checking whether a platform supports a given codec, profile, etc. Also, the responsibility for parsing a codec string into various properties is conflated with some of those checks. The result is that it is difficult to get a picture of what is supported and whether the logic is correct. We need to establish clear responsibilities and expectations. Current issues include: 1. MimeUtil::StringToCodec() performs some checks and returns whether a codec string is supported and ambiguous. One might assume that it is solely responsible for this. 2. There are multiple paths that check whether the platform supports a codec: * MediaClient::IsSupportedVideoConfig() * IsCodecSupported() and IsCodecSupportedOnPlatform() 3. The second path is called in cases that the former is not.
,
Dec 8 2016
,
Dec 8 2016
,
Feb 1 2017
Will take this as part of media capabilities work.
,
Feb 3 2017
> For example, we would want them to check specific profiles and not just check the one that is most interesting or only the subset currently supported by media/ at the moment. Can you illustrate your concern here with an example. My current ambition is move all platform checks, including android's, into MediaClient. The contract should be the client says "yes" to any codec it supports, otherwise "no". Not sure if this addresses your concern.
,
Feb 9 2017
I think the concern was that embedders would implement to the current media/ implementation in a way that does not handle changes to media/, such as adding support for new profiles. Since we don't control all embedders, it's not possible for us to even check whether such changes might break something. (This comment may have been prompted by a case where code was only checking a single VP9 profile and maybe ignoring the level. That may have been sufficient at the time, but would have been buggy as we added more support.)
,
Feb 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/38e97f421bcf90b224b895a405f3ba0de3efe5ac commit 38e97f421bcf90b224b895a405f3ba0de3efe5ac Author: chcunningham <chcunningham@chromium.org> Date: Wed Feb 22 22:43:20 2017 Various MimeUtil cleanups. Cleanly separate roles of codec parsing from checking codec support. Merge various codec support checks into single function. Separate notions of ambiguous codec strings from ambiguous support. Make ambiguous codec strings less extensible (avoid adding more). Prepare to eliminate notions of ambiguous support. Naming improvements. More details in the bug. Kudos to ddorwin. BUG= 672327 Review-Url: https://codereview.chromium.org/2700893003 Cr-Commit-Position: refs/heads/master@{#452243} [modify] https://crrev.com/38e97f421bcf90b224b895a405f3ba0de3efe5ac/content/renderer/media/recorder/media_recorder_handler.cc [modify] https://crrev.com/38e97f421bcf90b224b895a405f3ba0de3efe5ac/media/base/mime_util.cc [modify] https://crrev.com/38e97f421bcf90b224b895a405f3ba0de3efe5ac/media/base/mime_util.h [modify] https://crrev.com/38e97f421bcf90b224b895a405f3ba0de3efe5ac/media/base/mime_util_internal.cc [modify] https://crrev.com/38e97f421bcf90b224b895a405f3ba0de3efe5ac/media/base/mime_util_internal.h [modify] https://crrev.com/38e97f421bcf90b224b895a405f3ba0de3efe5ac/media/base/mime_util_unittest.cc [modify] https://crrev.com/38e97f421bcf90b224b895a405f3ba0de3efe5ac/media/blink/key_system_config_selector.cc [modify] https://crrev.com/38e97f421bcf90b224b895a405f3ba0de3efe5ac/media/filters/chunk_demuxer.cc [modify] https://crrev.com/38e97f421bcf90b224b895a405f3ba0de3efe5ac/media/filters/source_buffer_state.cc [modify] https://crrev.com/38e97f421bcf90b224b895a405f3ba0de3efe5ac/third_party/WebKit/Source/platform/network/mime/MIMETypeRegistry.cpp
,
Feb 22 2017
,
Jan 4 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/06c7c30815f180a0b1279298a933236ffdfed955 commit 06c7c30815f180a0b1279298a933236ffdfed955 Author: Xiaohan Wang <xhwang@chromium.org> Date: Thu Jan 04 03:55:52 2018 media: Remove MimeUtil::IsSimpleCodecSupported() It seems this function is not used anywhere. BUG= 672327 Change-Id: I8c2f9ddb7d3099f769c33ef7885544fddcdc99af Reviewed-on: https://chromium-review.googlesource.com/849645 Reviewed-by: Chrome Cunningham <chcunningham@chromium.org> Commit-Queue: Xiaohan Wang <xhwang@chromium.org> Cr-Commit-Position: refs/heads/master@{#526911} [modify] https://crrev.com/06c7c30815f180a0b1279298a933236ffdfed955/media/base/mime_util_internal.cc [modify] https://crrev.com/06c7c30815f180a0b1279298a933236ffdfed955/media/base/mime_util_internal.h |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by ddorwin@chromium.org
, Dec 8 2016