New issue
Advanced search Search tips

Issue 679946 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug
57



Sign in to add a comment

MediaRecorder: prefer using (a) hardware accelerated encoder when available if the user doesn't choose one

Project Member Reported by mcasas@chromium.org, Jan 11 2017

Issue description

MediaRecorderHandler chooses VP8 somewhat arbitrarily [1]. 
Instead, if the JS user leaves the codec/mime type unspecified,
try to use a hardware encoder.


See https://github.com/miguelao/mediacapture-record-implementation-status/blob/master/chromium.md
for the hardware acceleration wiring status.

[1] https://cs.chromium.org/chromium/src/content/renderer/media/media_recorder_handler.cc?dr=C&q=mediarecorderhandler&sq=package:chromium&l=55
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/904b7a6f6dffa9cee5ac930c37dd591c330d14c6

commit 904b7a6f6dffa9cee5ac930c37dd591c330d14c6
Author: mcasas <mcasas@chromium.org>
Date: Thu Jan 12 06:04:41 2017

MediaRecorder: use VideoTrackRecorder::GetPreferredCodecId() when available

This CL adds a static method to VTR to query which
one, if any, is the preferred video codec.

A new singleton Lazy Leaky class CodecEnumerator is
added to encapsulate poking the VEA to see which
codecs are supported, and to further query
a) the preferred codec id
b) if a given codec is supported
and wraps the previous CodecIdToVEAProfile()
functionality.

BUG= 679946 

Review-Url: https://codereview.chromium.org/2624053002
Cr-Commit-Position: refs/heads/master@{#443165}

[modify] https://crrev.com/904b7a6f6dffa9cee5ac930c37dd591c330d14c6/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
[modify] https://crrev.com/904b7a6f6dffa9cee5ac930c37dd591c330d14c6/content/renderer/media/media_recorder_handler.cc
[modify] https://crrev.com/904b7a6f6dffa9cee5ac930c37dd591c330d14c6/content/renderer/media/video_track_recorder.cc
[modify] https://crrev.com/904b7a6f6dffa9cee5ac930c37dd591c330d14c6/content/renderer/media/video_track_recorder.h

Project Member

Comment 2 by bugdroid1@chromium.org, Jan 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c104b1c42724791fc3dd69ebbea6e915cab8bedc

commit c104b1c42724791fc3dd69ebbea6e915cab8bedc
Author: xlai <xlai@chromium.org>
Date: Thu Jan 12 16:14:29 2017

Revert of MediaRecorder: use VideoTrackRecorder::GetPreferredCodecId() when available (patchset #5 id:250001 of https://codereview.chromium.org/2624053002/ )

Reason for revert:
Suspected CL-to-blame for webkit tests failing on Mac Retina:
fast/mediacapturefromelement/HTMLMediaElementCapture-capture.html
fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0.html

https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.11%20%28retina%29/builds/10965

Original issue's description:
> MediaRecorder: use VideoTrackRecorder::GetPreferredCodecId() when available
>
> This CL adds a static method to VTR to query which
> one, if any, is the preferred video codec.
>
> A new singleton Lazy Leaky class CodecEnumerator is
> added to encapsulate poking the VEA to see which
> codecs are supported, and to further query
> a) the preferred codec id
> b) if a given codec is supported
> and wraps the previous CodecIdToVEAProfile()
> functionality.
>
> BUG= 679946 
>
> Review-Url: https://codereview.chromium.org/2624053002
> Cr-Commit-Position: refs/heads/master@{#443165}
> Committed: https://chromium.googlesource.com/chromium/src/+/904b7a6f6dffa9cee5ac930c37dd591c330d14c6

TBR=emircan@chromium.org,chfremer@chromium.org,mcasas@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 679946 

Review-Url: https://codereview.chromium.org/2622273006
Cr-Commit-Position: refs/heads/master@{#443251}

[modify] https://crrev.com/c104b1c42724791fc3dd69ebbea6e915cab8bedc/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
[modify] https://crrev.com/c104b1c42724791fc3dd69ebbea6e915cab8bedc/content/renderer/media/media_recorder_handler.cc
[modify] https://crrev.com/c104b1c42724791fc3dd69ebbea6e915cab8bedc/content/renderer/media/video_track_recorder.cc
[modify] https://crrev.com/c104b1c42724791fc3dd69ebbea6e915cab8bedc/content/renderer/media/video_track_recorder.h

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/05574f4462f910edf41883479fcffabc21e2198f

commit 05574f4462f910edf41883479fcffabc21e2198f
Author: mcasas <mcasas@chromium.org>
Date: Fri Jan 13 00:11:42 2017

RELAND: MediaRecorder: use VideoTrackRecorder::GetPreferredCodecId() when available

Original CL got reverted due to 2 LayoutTests failing in a single bot:
(Mac Retina bot)
fast/mediacapturefromelement/HTMLMediaElementCapture-capture.html
fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0.html

This bot compiles with no proprietary codecs. H264 was selected
as potentially accelerated by the platform (correct) but H264 was
not enabled in this platform, so we hit a DCHECK().

This CL makes sure that H264 is not considered if
#if BUILDFLAG(RTC_USE_H264
is false.

Original CL description ------------------------------------------------
MediaRecorder: use VideoTrackRecorder::GetPreferredCodecId() when available

This CL adds a static method to VTR to query which
one, if any, is the preferred video codec.

A new singleton Lazy Leaky class CodecEnumerator is
added to encapsulate poking the VEA to see which
codecs are supported, and to further query
a) the preferred codec id
b) if a given codec is supported
and wraps the previous CodecIdToVEAProfile()
functionality.

BUG= 679946 

Review-Url: https://codereview.chromium.org/2623353004
Cr-Commit-Position: refs/heads/master@{#443400}

[modify] https://crrev.com/05574f4462f910edf41883479fcffabc21e2198f/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
[modify] https://crrev.com/05574f4462f910edf41883479fcffabc21e2198f/content/renderer/media/media_recorder_handler.cc
[modify] https://crrev.com/05574f4462f910edf41883479fcffabc21e2198f/content/renderer/media/video_track_recorder.cc
[modify] https://crrev.com/05574f4462f910edf41883479fcffabc21e2198f/content/renderer/media/video_track_recorder.h

Comment 4 by mcasas@chromium.org, Jan 17 2017

Status: Fixed (was: Started)

Comment 5 by mcasas@chromium.org, Jan 18 2017

Components: Blink>MediaRecording

Comment 6 by mcasas@chromium.org, Jan 18 2017

Components: -Blink>MediaStream>Recording
 Issue 676423  has been merged into this issue.
Labels: 57
Commit 05574f44... initially landed in 57.0.2980.0


Sign in to add a comment