How to obtain statics about stream using LibVLC

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
equitel
New Cone
New Cone
Posts: 6
Joined: 19 Oct 2007 11:47

How to obtain statics about stream using LibVLC

Postby equitel » 16 Jan 2008 11:17

Hello,

I want to get the stream information using libvlc, I thought about the the function mediacontrol_get_stream_information but doesn't work. Please somebody can help me. The code that doesn't work is bellow, thanks

public long GetStreamInfo3()
{
long l = 0;
strInfo sif;
sif.bitrate = 0;

try
{
using (VlcPlaylistObject vpobj = new VlcPlaylistObject(this.vlcHandle))
{
if (vpobj.SubObject != IntPtr.Zero)
{
IntPtr p_input = libvlc_playlist_get_input(ref vpobj.libvlc, ref vpobj.exception);
if (vpobj.exception.WasExceptionRaised())
{
this.lastErrorMessage = Marshal.PtrToStringAnsi(vpobj.exception.psz_message);
}
else
{
try
{
sif = mediacontrol_get_stream_information(p_input,
mediacontrol_PositionKey.mediacontrol_MediaTime,
ref vpobj.exception);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
libvlc_input_free(p_input);
}
}
}
}
}
catch (Exception ex)
{
this.lastErrorMessage = ex.Message;
}

return (long)sif.bitrate;
}

kaiser
New Cone
New Cone
Posts: 3
Joined: 27 Mar 2008 13:50

Re: How to obtain statics about stream using LibVLC

Postby kaiser » 27 Mar 2008 17:25

Hi,
did you managed how to get the statistics from a stream? I´m also searching about how to do that.

Greetings,

Kaiser


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 15 guests