Page 1 of 1

How to read the instance specific vlc log messages

Posted: 27 Apr 2009 16:11
by Khenatram
Hi All,

I am using VLC 0.8.6.i version of VLC.

If I have more than 1 instance of VLC control in my c# application, where each instance is using "libvlc_log_open" to read the vlc log messages. But I am getting same log messages for both the instances.

Is this the expected behavior?

Is there any way to get the instance specific log messages?

Any help would be highly appreciated.

Regards,

Ram

Re: How to read the instance specific vlc log messages

Posted: 28 Apr 2009 17:26
by VLC_help
You can force the VLC to write message log to specific file and then open it manually.

If libvlc_log_open returns same log for both instances, then it is a bug.

Re: How to read the instance specific vlc log messages

Posted: 29 Apr 2009 09:55
by Khenatram
Thanks for reply.

Unfortunately this is not happening :( .

Even if I write the log messages in a file from two different VLC instances, both files contain same log messages.

Is there any option/command that will give me the messages generated for that specific instance only.

I am reading the log messages to get the codec used by current instance. If you have any other idea about determining the Codec name from a C# program , please share it with me.

Re: How to read the instance specific vlc log messages

Posted: 29 Apr 2009 15:47
by VLC_help
Mediainfo is much better tool for figuring out used video codec and other similar things.
http://mediainfo.sourceforge.net/

Re: How to read the instance specific vlc log messages

Posted: 29 Apr 2009 16:38
by Khenatram
Thanks again for prompt reply.

I guess mediainfo does not work with streamed media. Please correct me if I am wrong.
I need to read the codec name of the streamed video source that my C# application is currently playing.

Re: How to read the instance specific vlc log messages

Posted: 30 Apr 2009 18:11
by VLC_help
Then you cannot use Mediainfo.

Re: How to read the instance specific vlc log messages

Posted: 05 May 2009 05:59
by Khenatram
Is there any other way to get the codec name using functions from libvlc DLL?

Re: How to read the instance specific vlc log messages

Posted: 05 May 2009 15:38
by VLC_help
There is mention of libvlc_input_get_information in Wiki, but I don't find any documentation for it.

Re: How to read the instance specific vlc log messages

Posted: 05 May 2009 16:09
by Khenatram
Hi,

I could not found this method in source code of 0.8.6. version of VLC. :( .

Is there any other alternative?

Re: How to read the instance specific vlc log messages

Posted: 06 May 2009 17:52
by VLC_help
It is the only one I found. You could also look from wxwindow GUI source code and see how it gets the info.

Re: How to read the instance specific vlc log messages

Posted: 07 May 2009 16:07
by Khenatram
yes, I am trying to do that . To do so I have created the following structure for input_item_t.

Code: Select all

[StructLayout(LayoutKind.Sequential)] struct input_item_t { public IntPtr psz_name; public IntPtr psz_uri; public int i_options; /**< Number of input options */ public IntPtr ppsz_options; public mtime_t i_duration; /**< A hint about the duration of this * item, in milliseconds*/ public int i_id; /**< Identifier of the item */ public uint i_type; /**< Type (file, disc, ...) */ public int i_categories; /**< Number of info categories */ public IntPtr pp_categories; /**< Pointer to the first info category */ public IntPtr i_es; /**< Number of es format descriptions */ IntPtr es; /**< Pointer to an array of es formats */ public vlc_bool_t b_fixed_name; /**< Can the interface change the name ?*/ public IntPtr input_stats_t; /**< Statistics */ public vlc_mutex_t lockObj; /**< Item cannot be changed without this lock */ };


and I am creating its object as follows


Code: Select all

VlcObject vobj = new VlcObject(this.vlcHandle, ObjectType.VLC_OBJECT_VLC); input_item_t it = (input_item_t)Marshal.PtrToStructure(vobj.Vlc, typeof(input_item_t));

But I am getting "0" value for pp_categories. Am I missing anything here?