Reputation: 146
When using mobileVLCKit.framework to play a live view streaming via RTSP protocol, I can't get fps info even if the displaying view is correctly shown.
Here is my code
NSLog(@"%.1f FPS", self.player.framesPerSecond);
The result is always "0.0 FPS", and is not reasonable.
I used framesPerSecond since fps is deprecated, as said in http://cocoadocs.org/docsets/MobileVLCKit/2.2.1/Classes/VLCMediaPlayer.html
Tracing to VLC source and I found
- (float)framesPerSecond
{
return libvlc_media_player_get_fps(_playerInstance);
}
it looks correct, but I still don't know why the result is wrong.
Could someone give me suggestion or some work around method to get fps info?
Any reply would be appreciated. Thanks!
Upvotes: 1
Views: 1846
Reputation: 1831
We don't enable statistics on iOS / within MobileVLCKit by default, so any statistic value will always be 0. To enable it, you need to compile the framework yourself.
To enable stats, remove @"--no-stats"
from VLCLibrary.m. Further, after the build script downloaded MobileVLCKit/ImportedSources/vlc
, stop its execution, edit MobileVLCKit/ImportedSources/vlc/extras/package/ios/build.sh
, remove the line stats
from the blacklist, and restart the script.
Upvotes: 1