[osg-users] [osgPlugins] iOS/OSX: avfoundation plugin not reporting correct media duration

Alessandro Terenzi a.terenzi at gmail.com
Fri Jan 19 00:50:19 PST 2018


Hi,
I found out that when you want to know the duration of a media file, specifically a movie, the instruction:


Code:
_videoDuration = CMTimeGetSeconds([_data->avplayer.currentItem duration]);



returns 0, I tried to use the following instead:


Code:
_videoDuration = CMTimeGetSeconds([[_data->avplayer.currentItem asset] duration]);



that seems to return the correct movie's duration in seconds.

If you agree I will send a pull request about this fix.

Cheers,
Alessandro

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72784#72784







More information about the osg-users mailing list