0

While testing 360 video on our device with cobalt, the application renderer thread will call function SbPlayerGetCurrentFrame() frequently, but there is no SbDecodeTargetGetInfo() and SbDecodeTargetRelease() even we returned SbDecodeTarget object by function SbPlayerGetCurrentFrame(). In howto_decode_to_texture.md, it told that:

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

Does this mean that we don't return a valid SbDecodeTarget in function SbPlayerGetCurrentFrame(), if so, how does renderer thread check the SbDecodeTarget is valid or not? The Cobalt version is 10.56829.

Kai Wang
  • 25
  • 5
  • I would trace through the code here: https://cobalt.googlesource.com/cobalt/+/master/src/cobalt/layout/box_generator.cc#68 and see if the decode target is valid or not. If it is valid, the call to CreateImageFromSbDecodeTarget() on line 71 should result in a call to SbDecodeTargetGetInfo(). – Andrew Top Jun 29 '17 at 20:50
  • 1
    Hi, Andrew, Thanks for your help, with trace the code you mentioned, I found that we called SbPlayerGetCurrentFrame() without return the correct decode target, so that the renderer thread get invalid target object and don't call SbDecodeTargetGetInfo() and SbDecodeTargetRelease(). – Kai Wang Jun 30 '17 at 02:21
  • Happy to hear you got this resolved! – Andrew Top Jul 05 '17 at 15:47
  • Hi Kai, I suggest you to post your comment as the answer. Perhaps it'll be useful for someone else. – mmotorny Oct 31 '17 at 18:12

1 Answers1

1

I found that we called SbPlayerGetCurrentFrame() without return the correct decode target, so that the renderer thread get invalid target object and don't call SbDecodeTargetGetInfo() and SbDecodeTargetRelease()

Kai Wang
  • 25
  • 5