Skip to content

Commit

Permalink
media: Support AV1 in CdmAdapter
Browse files Browse the repository at this point in the history
Integration test of playing encrypted AV1 using ClearKeyCdm requires
more refactoring and will be landed in a later CL.

TBR=jrummell@chromium.org

Bug: 884898
Change-Id: I17e113a0d384e12a3e2590866a86c2f168b9ab9a
Reviewed-on: https://chromium-review.googlesource.com/1229299
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: John Rummell <jrummell@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592649}
  • Loading branch information
xhwang-chromium authored and Commit Bot committed Sep 20, 2018
1 parent c67f594 commit 3f032ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ deps = {
},

'src/media/cdm/api':
Var('chromium_git') + '/chromium/cdm.git' + '@' + '6f92d7c0e62b135511744ce6bcf0dd2ff364df09',
Var('chromium_git') + '/chromium/cdm.git' + '@' + '1007f88b61d3dce70269923e30a536cc7c466a17',

'src/native_client': {
'url': Var('chromium_git') + '/native_client/src/native_client.git' + '@' + Var('nacl_revision'),
Expand Down
8 changes: 8 additions & 0 deletions media/cdm/cdm_adapter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ cdm::VideoCodec ToCdmVideoCodec(VideoCodec codec) {
return cdm::kCodecH264;
case kCodecVP9:
return cdm::kCodecVp9;
case kCodecAV1:
return cdm::kCodecAv1;
default:
DVLOG(1) << "Unsupported VideoCodec " << codec;
return cdm::kUnknownVideoCodec;
Expand Down Expand Up @@ -223,6 +225,12 @@ cdm::VideoCodecProfile ToCdmVideoCodecProfile(VideoCodecProfile profile) {
return cdm::kH264ProfileHigh422;
case H264PROFILE_HIGH444PREDICTIVEPROFILE:
return cdm::kH264ProfileHigh444Predictive;
case AV1PROFILE_PROFILE_MAIN:
return cdm::kAv1ProfileMain;
case AV1PROFILE_PROFILE_HIGH:
return cdm::kAv1ProfileHigh;
case AV1PROFILE_PROFILE_PRO:
return cdm::kAv1ProfilePro;
default:
DVLOG(1) << "Unsupported VideoCodecProfile " << profile;
return cdm::kUnknownVideoCodecProfile;
Expand Down

0 comments on commit 3f032ef

Please sign in to comment.