Events catching when receiving net stream

This forum is about all development around libVLC.
Tommy_y
New Cone
New Cone
Posts: 9
Joined: 21 May 2012 02:44

Events catching when receiving net stream

Postby Tommy_y » 21 May 2012 03:38

Hi, hope my poor English can clearly describe my questions:
1. How can I catch the state when receiving steam from network? I'd like to show some local picture on the output dialog when the net status is not good(I mean, always buffering, can not play smoothly).
2. What can I do when access to the MRL interrupted? Seems the player will not automatically resume, even call libvlc_media_player_play() function is useless. I think perhaps I'll have to recreate a libvlc_media_t type object after receiving a specific event.

To solve the first problem, I tried the libvlc_event_attach() function, to catch some events like libvlc_MediaPlayerBuffering,libvlc_MediaPlayerSeekableChanged, and so on, but they are just not the right ones.
I also tried to compare the libvlc_media_stats_t at two times, if i_decoded_video data of libvlc_media_stats_t didn't change, then the steam might be buffering. Hoever, this is not efficent. Is there a better solution?
And I searched from google, but can't find a appropriate keyword, so I did not get the information I need.

At last, thank you all.

Tommy_y
New Cone
New Cone
Posts: 9
Joined: 21 May 2012 02:44

Re: Events catching when receiving net stream

Postby Tommy_y » 22 May 2012 04:50

Is it too stupid? then would you please give me a link of relevant documents or demo :( ..

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Events catching when receiving net stream

Postby Jean-Baptiste Kempf » 23 May 2012 14:15

To solve the first problem, I tried the libvlc_event_attach() function, to catch some events like libvlc_MediaPlayerBuffering,libvlc_MediaPlayerSeekableChanged, and so on, but they are just not the right ones.
How so?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Tommy_y
New Cone
New Cone
Posts: 9
Joined: 21 May 2012 02:44

Re: Events catching when receiving net stream

Postby Tommy_y » 25 May 2012 03:21

I expect the libvlc_MediaPlayerBuffering event would be sent, but I simulated a streaming interruption, nothing happened, no event triggered.
I attached all events to a callback and output triggered events, result is :
258||270||269||273||260||273||
268||267||268||267||268||267||268||267||268||267||268||267||268||267||268||267||268||267||268||267||268||267||268||267||268||267||268||267||268||267||268||267||268||267||268||267||
258 ->libvlc_MediaPlayerOpening
270 ->libvlc_MediaPlayerPausableChanged
269 ->libvlc_MediaPlayerSeekableChanged
273 ->libvlc_MediaPlayerLengthChanged
260 ->libvlc_MediaPlayerPlaying
267 ->libvlc_MediaPlayerTimeChanged
268 ->libvlc_MediaPlayerPositionChanged
---------------------------------------------------------------------

nothing special happened when a flow stopped, but the libvlc_MediaPlayerTimeChanged no longer be sent. I think this information is not enough to identify if the media was played smothly or not.
Last edited by Tommy_y on 25 May 2012 03:25, edited 1 time in total.

Tommy_y
New Cone
New Cone
Posts: 9
Joined: 21 May 2012 02:44

Re: Events catching when receiving net stream

Postby Tommy_y » 25 May 2012 03:24

Sorry, Jean-Baptiste Kempf I didn't notice that we should not PM...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 19 guests