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;
}