2017-06-29 32 views
0

在我们的设备上使用钴进行360视频测试时,应用程序渲染器线程会经常调用函数SbPlayerGetCurrentFrame(),但没有SbDecodeTargetGetInfo()和SbDecodeTargetRelease即使我们通过函数SbPlayerGetCurrentFrame()返回了SbDecodeTarget对象。在howto_decode_to_texture.md,它告知:渲染器线程在播放360视频时不会调用SbDecodeTargetGetInfo()

Once the application has acquired a valid SbDecodeTarget object through a call to SbPlayerGetCurrentFrame(), it will call SbDecodeTargetGetInfo() on it. 

这是否意味着我们不会在功能SbPlayerGetCurrentFrame()返回一个有效的SbDecodeTarget,如果是这样,如何渲染线程检查SbDecodeTarget是否有效? Cobalt版本是10.56829。

+0

我将通过代码在这里追踪:https://cobalt.googlesource.com/cobalt/+/master/src/cobalt/layout/box_generator.cc#68,看看解码目标是否有效。如果它是有效的,那么对第71行的CreateImageFromSbDecodeTarget()的调用将导致对SbDecodeTargetGetInfo()的调用。 –

+1

嗨,安德鲁, 感谢您的帮助,跟踪您提到的代码,我发现我们调用SbPlayerGetCurrentFrame()而不返回正确的解码目标,以便渲染器线程获取无效的目标对象,并且不要调用SbDecodeTargetGetInfo()和SbDecodeTargetRelease()。 –

+0

很高兴听到你解决了这个问题! –

回答

1

我发现我们没有返回正确的解码目标调用SbPlayerGetCurrentFrame(),从而使渲染线程得到无效的目标对象和不调用SbDecodeTargetGetInfo()和SbDecodeTargetRelease()