[英]Android Kitkat 4.4.2: Adaptive Playback impact on SurfaceFlinger
I came across this generic question on Adaptive Playback in Android
Kitkat
in SO. 我在
Android
Kitkat
的SO中遇到了有关自适应播放的通用问题 。 However, I have some specific queries as below: 但是,我有一些特定的查询,如下所示:
I am able to understand the implications on the codec
and the related framework. 我能够理解对
codec
和相关框架的影响。 However, there is one specific point which I am unable to understand completely. 但是,有一点我无法完全理解。
In case of adaptive playback, the codec employs a metadata
on it's output port which basically abstracts and packages an underlying buffer handle (in all probability a gralloc
handle). 在自适应播放的情况下,编解码器会在其输出端口上使用
metadata
,该metadata
基本上会抽象并打包基础缓冲区句柄(很可能是gralloc
句柄)。 If a resolution changes, I presume the codec
updates the gralloc
handle attributes directly and sends the buffer back to the OMX
Client without a port settings change. 如果分辨率发生变化,我认为
codec
将直接更新gralloc
句柄属性,并将缓冲区发送回OMX
客户端,而无需更改端口设置。
My first question is: Is my understanding and assumption correct? 我的第一个问题是:我的理解和假设正确吗?
If so, how does the Surfaceflinger
/ SurfaceTexture
know that the incoming payload is in metadata
format and how does it retrieve the width
and height
from the underlying gralloc
implementation? 如果是这样,
Surfaceflinger
/ SurfaceTexture
如何知道传入的有效载荷是metadata
格式,以及它如何从底层gralloc
实现中检索width
和height
?
Can you please point me to the relevant sources which will help me to understand this issue better? 您能否指出我相关的资源,以帮助我更好地理解这个问题?
Many thanks in advance. 提前谢谢了。
sendFormatChange=>kWhatOutputFormatChange=>MEDIA_SET_VIDEO_SIZE=> ... =>native_window_set_buffers_dimensions sendFormatChange => kWhatOutputFormatChange => MEDIA_SET_VIDEO_SIZE => ... =>本机窗口集_缓冲区大小
Just a clarification, lets use QC example, component recognize crop change - look for OMX_IndexConfigCommonOutputCrop
here omx_vdec , then ACodec clears mSentFormat
this makes ACodec to call sendFormatChange
which sends kWhatOutputFormatChange
event to NuPlayer which sends MEDIA_SET_VIDEO_SIZE
to media player. 只是澄清一下,让我们使用QC示例,组件识别作物变化-在此处查找
OMX_IndexConfigCommonOutputCrop
omx_vdec ,然后ACodec清除mSentFormat
这使ACodec调用sendFormatChange
,后者将kWhatOutputFormatChange
事件发送到NuPlayer,后者将MEDIA_SET_VIDEO_SIZE
发送到媒体播放器。 At the second side of stick you will get native_window_set_buffers_geometry
which forces Surface::setBuffersDimensions
. 在摇杆的第二侧,您将获得
native_window_set_buffers_geometry
,该值强制Surface::setBuffersDimensions
。
While OMXCodec is used OMX_IndexConfigCommonOutputCrop
received sets mOutputPortSettingsHaveChanged
, nearest call of OMXCodec::read
will return INFO_FORMAT_CHANGED
this in AwesomePlayer will make notifyVideoSize_l
to be called and this one sends to listener MEDIA_SET_VIDEO_SIZE
当使用
OMX_IndexConfigCommonOutputCrop
接收到的集合mOutputPortSettingsHaveChanged
,最接近的OMXCodec::read
调用将返回INFO_FORMAT_CHANGED
这在AwesomePlayer中将使notifyVideoSize_l
被调用,并且该消息将发送到侦听器MEDIA_SET_VIDEO_SIZE
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.