Report media::PipelineMetadata when Video/AudioDecoderConfig changes |
||
Issue descriptionmedia::PipelineMetadata is currently only reported once after Demuxer is initialized. https://cs.chromium.org/chromium/src/media/base/pipeline_impl.cc?rcl=1483532378&l=246 This metadata is used by Media Remoting to switch between default and remoting renderers, and to scale the remoting interstitial. It should be reported when Video/AudioDecoderConfig changes. Solution: 1. Add callback to DemuxerStream to inform Demuxer when config changes. 2. Notify PipelineImpl::RendererWrapper through the DemuxerHost interface. 3. Call PipelineImpl::RendererWrapper::ReportMetadata() to report the metadata. sandersd@ and xhwang@: sgty?
,
Jan 4 2017
Currently we need to know the change on natural size and codec. But we may need more (or add more) in Audio/VideoDecoderConfig, for example, fps, profile, to check whether it matches receiver's capability. I do see some of the config changes are reported via OnVideoNatrualSizeChanged() and OnVideoOpacityChange() by Renderer. Since either the natural size or the video opacity can only be changed when config changes, can we just call OnMetaData() to report the new config to WMPI when config config changes (instead checking in VideoRendererImpl::CheckForMetadataChanges())? Currently the natural size is reported both through OnMetaData() and OnVideoNaturalSizeChanged() in WMPI. It seems that both Renderer and DemuxerStream can know when config changes. Is there any preference on who should report the change?
,
Jan 6 2017
CL is out for review: https://codereview.chromium.org/2620433002/, which directly inform MediaObserver with updated meta data when OnVideoNaturalSizeChanged().
,
Jan 6 2017
Another issue is to estimate the frame rate and report changes. For non-mse sources, the "r_frame_rate" field in AVStream is the estimated frame rate (https://cs.chromium.org/chromium/src/third_party/ffmpeg/libavformat/avformat.h?rcl=0&l=1094). But for mse sources, no frame rate is estimated. I tried estimate it in VideoRendererImpl::FrameReady() using the following logic: fps = 1000.0 / (frame->timestamp()-last_frame_ready_).InMillisecondsF(); It seems work pretty well for both local sources and mse sources (YouTube, Vimeo). The estimate is also stable (almost constant). And then we can report any changes by adding a callback (similar to that for the natural size change). sg?
,
Jan 6 2017
I don't expect this computation to be very stable; in particular blackness is often encoded with extra long frames; you probably want the maximum frame rate over a window. What exactly are you using the frame rate for? Perhaps the requirements you have are different from what I imagine.
,
Jan 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/516ef6d9c0c19352fb80ecaa4e635e60501125fb commit 516ef6d9c0c19352fb80ecaa4e635e60501125fb Author: xjz <xjz@chromium.org> Date: Sat Jan 07 00:23:06 2017 Inform MediaObserver when video natural size changes. BUG= 678339 Review-Url: https://codereview.chromium.org/2620433002 Cr-Commit-Position: refs/heads/master@{#442107} [modify] https://crrev.com/516ef6d9c0c19352fb80ecaa4e635e60501125fb/media/blink/webmediaplayer_impl.cc
,
Jan 12 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by sande...@chromium.org
, Jan 4 2017