Page 1 of 1

Wrong states in VLCMediaPlayerDelegate method !!

Posted: 17 Aug 2015 10:31
by huiZhang
Hi,
I found there are something wrong in method - (void)mediaPlayerStateChanged:(NSNotification *)aNotification of delegate VLCMediaPlayerDelegate;
i used VLCMediaPlayerState currentState = mediaPlayer.state to get the state, when mediaPlayerStateChanged called, but the result is always VLCMediaPlayerStateBuffering, only changed when the video played complete it got VLCMediaPlayerStateStopped, or i paused the video then it got VLCMediaPlayerStatePaused, and then it got VLCMediaPlayerStatePlaying when i play the video again.
isn't it got VLCMediaPlayerStateBuffering when i open video ,then got VLCMediaPlayerStatePlaying when the player is playing ? why it is always VLCMediaPlayerStateBuffering even video is begin play? and if i am wrong, how to get the correct state?
Thank you for your help !
2015-08-17 16:19:35.479 ELearningQSXT[4793:240305] VLCMediaPlayerStateBuffering <----------- begin play video
2015-08-17 16:19:35.663 ELearningQSXT[4793:240305] VLCMediaPlayerStateBuffering
2015-08-17 16:19:35.686 ELearningQSXT[4793:240305] VLCMediaPlayerStateBuffering
2015-08-17 16:19:37.110 ELearningQSXT[4793:240305] VLCMediaPlayerStateBuffering
2015-08-17 16:19:38.026 ELearningQSXT[4793:240305] VLCMediaPlayerStateBuffering
2015-08-17 16:19:38.085 ELearningQSXT[4793:240305] VLCMediaPlayerStateBuffering
2015-08-17 16:19:38.100 ELearningQSXT[4793:240305] VLCMediaPlayerStateBuffering
2015-08-17 16:19:42.769 ELearningQSXT[4793:240305] VLCMediaPlayerStatePaused <----------- when i pause the video
2015-08-17 16:19:44.572 ELearningQSXT[4793:240305] VLCMediaPlayerStatePlaying <----------- when i rePlay the video
2015-08-17 16:19:47.169 ELearningQSXT[4793:240305] VLCMediaPlayerStateBuffering
2015-08-17 16:19:48.090 ELearningQSXT[4793:240305] VLCMediaPlayerStateBuffering
2015-08-17 16:19:48.102 ELearningQSXT[4793:240305] VLCMediaPlayerStateBuffering
2015-08-17 16:19:48.151 ELearningQSXT[4793:240305] VLCMediaPlayerStateBuffering
2015-08-17 16:19:49.069 ELearningQSXT[4793:240305] VLCMediaPlayerStateBuffering
2015-08-17 16:20:08.604 ELearningQSXT[4793:240305] VLCMediaPlayerStateStopped <----------- video end

Re: Wrong states in VLCMediaPlayerDelegate method !!

Posted: 18 Aug 2015 20:41
by fkuehne
It is falling back to buffering if it needs to re-buffer after playback started because your input media isn't provided fast enough, which is typical for network connections.

Re: Wrong states in VLCMediaPlayerDelegate method !!

Posted: 24 Aug 2015 06:59
by huiZhang
It is falling back to buffering if it needs to re-buffer after playback started because your input media isn't provided fast enough, which is typical for network connections.
Thanks , but how can i check the correct state, i need to show some alert words when player is buffering and hide after buffering end.

Re: Wrong states in VLCMediaPlayerDelegate method !!

Posted: 24 Aug 2015 10:27
by fkuehne
There is no BufferingEnd event at this point, even though that might be useful indeed. If you don't receive a new "buffering" event within half a second, it is safe to assume that VLC is not buffering actively.

Re: Wrong states in VLCMediaPlayerDelegate method !!

Posted: 25 Aug 2015 09:06
by huiZhang
There is no BufferingEnd event at this point, even though that might be useful indeed. If you don't receive a new "buffering" event within half a second, it is safe to assume that VLC is not buffering actively.
:) Ok ,Thanks for your help!