Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Issue 1677563003: Implemented parsing for H.264/AVC codec ids (Closed)

Created:
4 years, 10 months ago by servolk
Modified:
4 years, 10 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implemented parsing for H.264/AVC codec ids This CL implements parsing of avc1/avc3 codec ids from the mime type string. Compared to the previous implementation (ParseH264CodecId in mime_util.cpp) this one handles all H.264/AVC codec profiles defined in the ISO standard and implements handling of constraint set flags 0 through 2. BUG=456408 Committed: https://crrev.com/6e41da7fca39986672740e07d37fa6d5ef71b3b4 Cr-Commit-Position: refs/heads/master@{#376078}

Patch Set 1 #

Patch Set 2 : nits #

Patch Set 3 : ps2 #

Patch Set 4 : Refactoring #

Patch Set 5 : wip #

Patch Set 6 : wip #

Patch Set 7 : Clean up level_idc handling #

Patch Set 8 : Include stdint.h into video_codecs.h #

Patch Set 9 : Fixed unit tests #

Total comments: 23

Patch Set 10 : Fixed ordering of test case + improved test cases for reserved bits #

Total comments: 8

Patch Set 11 : Adjusted unit tests #

Total comments: 9

Patch Set 12 : Rebase + resolve conflicts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -151 lines) Patch
M content/browser/media/media_canplaytype_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +102 lines, -76 lines 0 comments Download
M media/base/mime_util_internal.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -3 lines 0 comments Download
M media/base/mime_util_internal.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +29 lines, -72 lines 0 comments Download
M media/base/video_codecs.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M media/base/video_codecs.cc View 1 2 3 4 5 6 2 chunks +94 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 27 (11 generated)
servolk
4 years, 10 months ago (2016-02-08 20:01:13 UTC) #3
servolk
On 2016/02/08 20:01:13, servolk wrote: ping
4 years, 10 months ago (2016-02-16 23:17:01 UTC) #4
sandersd (OOO until July 31)
lgtm
4 years, 10 months ago (2016-02-16 23:27:18 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1677563003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1677563003/160001
4 years, 10 months ago (2016-02-17 19:10:58 UTC) #8
ddorwin
Apologies for not getting to this sooner. https://codereview.chromium.org/1677563003/diff/160001/content/browser/media/media_canplaytype_browsertest.cc File content/browser/media/media_canplaytype_browsertest.cc (right): https://codereview.chromium.org/1677563003/diff/160001/content/browser/media/media_canplaytype_browsertest.cc#newcode632 content/browser/media/media_canplaytype_browsertest.cc:632: EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; ...
4 years, 10 months ago (2016-02-17 19:31:20 UTC) #10
servolk
https://codereview.chromium.org/1677563003/diff/160001/content/browser/media/media_canplaytype_browsertest.cc File content/browser/media/media_canplaytype_browsertest.cc (right): https://codereview.chromium.org/1677563003/diff/160001/content/browser/media/media_canplaytype_browsertest.cc#newcode632 content/browser/media/media_canplaytype_browsertest.cc:632: EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.42E01E\"'")); On 2016/02/17 19:31:20, ddorwin wrote: > ...
4 years, 10 months ago (2016-02-17 19:49:54 UTC) #11
ddorwin
Thanks. Changes LG except some duplicate code. See also comments in PS9. https://codereview.chromium.org/1677563003/diff/160001/content/browser/media/media_canplaytype_browsertest.cc File content/browser/media/media_canplaytype_browsertest.cc ...
4 years, 10 months ago (2016-02-17 21:44:21 UTC) #12
servolk
https://codereview.chromium.org/1677563003/diff/160001/content/browser/media/media_canplaytype_browsertest.cc File content/browser/media/media_canplaytype_browsertest.cc (right): https://codereview.chromium.org/1677563003/diff/160001/content/browser/media/media_canplaytype_browsertest.cc#newcode632 content/browser/media/media_canplaytype_browsertest.cc:632: EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.42E01E\"'")); On 2016/02/17 21:44:21, ddorwin wrote: > ...
4 years, 10 months ago (2016-02-17 23:57:15 UTC) #13
ddorwin
Thanks. I noticed some gaps in old-style avc1 testing. Feel free to address those separately. ...
4 years, 10 months ago (2016-02-18 00:32:23 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1677563003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1677563003/220001
4 years, 10 months ago (2016-02-18 00:51:28 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/175352)
4 years, 10 months ago (2016-02-18 01:08:55 UTC) #18
servolk
https://codereview.chromium.org/1677563003/diff/200001/content/browser/media/media_canplaytype_browsertest.cc File content/browser/media/media_canplaytype_browsertest.cc (right): https://codereview.chromium.org/1677563003/diff/200001/content/browser/media/media_canplaytype_browsertest.cc#newcode635 content/browser/media/media_canplaytype_browsertest.cc:635: EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc1.100.40\"'")); On 2016/02/18 00:32:23, ddorwin wrote: > ...
4 years, 10 months ago (2016-02-18 01:37:51 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1677563003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1677563003/220001
4 years, 10 months ago (2016-02-18 02:07:53 UTC) #22
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 10 months ago (2016-02-18 02:48:28 UTC) #24
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/6e41da7fca39986672740e07d37fa6d5ef71b3b4 Cr-Commit-Position: refs/heads/master@{#376078}
4 years, 10 months ago (2016-02-18 02:49:51 UTC) #26
ddorwin
4 years, 10 months ago (2016-02-18 17:51:06 UTC) #27
Message was sent while issue was closed.
https://codereview.chromium.org/1677563003/diff/200001/content/browser/media/...
File content/browser/media/media_canplaytype_browsertest.cc (right):

https://codereview.chromium.org/1677563003/diff/200001/content/browser/media/...
content/browser/media/media_canplaytype_browsertest.cc:635: EXPECT_EQ(kNot,
CanPlay("'video/mp4; codecs=\"avc1.100.40\"'"));
On 2016/02/18 01:37:50, servolk wrote:
> On 2016/02/18 00:32:23, ddorwin wrote:
> > Should we have an avc3 entry too? Or add it to
> TestMPEGUnacceptableCombinations
> > as I mention below.
> 
> We have never seen avc3 being used in old-style codecs so far and the codec id
> translation handles only avc1 cases. And a few quick searches for exact
strings
> "avc3.100.40", "avc3.77.31" and "avc3.66.13" gave no results. So I think we
> don't need to support old-style avc3 codec ids. But indeed we could add a
couple
> of old-style avc3 cases to TestMPEGUnacceptableCombinations.

Acknowledged.

https://codereview.chromium.org/1677563003/diff/200001/content/browser/media/...
content/browser/media/media_canplaytype_browsertest.cc:1183:
IN_PROC_BROWSER_TEST_F(MediaCanPlayTypeTest, CodecSupportTest_HLS) {
On 2016/02/18 01:37:50, servolk wrote:
> On 2016/02/18 00:32:23, ddorwin wrote:
> > Both HLS variants are missing a test for old-style avc1.
> 
> These are Android tests and Android uses a different HLS path. The old-style
> translation that I've added is only enabled for video/mp2t mime types and
> guarded by BUILDFLAG(ENABLE_MSE_MPEG2TS_DEMUX), so it won't work on Android
ATM,
> only on Chromecast.

Agreed. I meant that we should have a negative test for old-style avc1 like we
do for all non-mp2t containers that can contain avc1. I'll add this comment to
the new CL you mentioned below.

https://codereview.chromium.org/1677563003/diff/200001/content/browser/media/...
content/browser/media/media_canplaytype_browsertest.cc:1396:
EXPECT_EQ(kMp2tsProbably, CanPlay("'video/mp2t; codecs=\"avc1.66.10\"'"));
On 2016/02/18 01:37:50, servolk wrote:
> On 2016/02/18 00:32:23, ddorwin wrote:
> > Is this supported for avc3? If not, let's add at least one negative entry.
> > Perhaps to TestMPEGUnacceptableCombinations.
> 
> https://codereview.chromium.org/1709803003

Acknowledged. Thanks.

Powered by Google App Engine
This is Rietveld 408576698