How to read the instance specific vlc log messages

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
Khenatram
Blank Cone
Blank Cone
Posts: 61
Joined: 11 Nov 2008 10:55
VLC version: 0.8.6.i
Operating System: Windows

How to read the instance specific vlc log messages

Postby Khenatram » 27 Apr 2009 16:11

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

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: How to read the instance specific vlc log messages

Postby VLC_help » 28 Apr 2009 17:26

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.

Khenatram
Blank Cone
Blank Cone
Posts: 61
Joined: 11 Nov 2008 10:55
VLC version: 0.8.6.i
Operating System: Windows

Re: How to read the instance specific vlc log messages

Postby Khenatram » 29 Apr 2009 09:55

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.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: How to read the instance specific vlc log messages

Postby VLC_help » 29 Apr 2009 15:47

Mediainfo is much better tool for figuring out used video codec and other similar things.
http://mediainfo.sourceforge.net/

Khenatram
Blank Cone
Blank Cone
Posts: 61
Joined: 11 Nov 2008 10:55
VLC version: 0.8.6.i
Operating System: Windows

Re: How to read the instance specific vlc log messages

Postby Khenatram » 29 Apr 2009 16:38

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.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: How to read the instance specific vlc log messages

Postby VLC_help » 30 Apr 2009 18:11

Then you cannot use Mediainfo.

Khenatram
Blank Cone
Blank Cone
Posts: 61
Joined: 11 Nov 2008 10:55
VLC version: 0.8.6.i
Operating System: Windows

Re: How to read the instance specific vlc log messages

Postby Khenatram » 05 May 2009 05:59

Is there any other way to get the codec name using functions from libvlc DLL?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: How to read the instance specific vlc log messages

Postby VLC_help » 05 May 2009 15:38

There is mention of libvlc_input_get_information in Wiki, but I don't find any documentation for it.

Khenatram
Blank Cone
Blank Cone
Posts: 61
Joined: 11 Nov 2008 10:55
VLC version: 0.8.6.i
Operating System: Windows

Re: How to read the instance specific vlc log messages

Postby Khenatram » 05 May 2009 16:09

Hi,

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

Is there any other alternative?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: How to read the instance specific vlc log messages

Postby VLC_help » 06 May 2009 17:52

It is the only one I found. You could also look from wxwindow GUI source code and see how it gets the info.

Khenatram
Blank Cone
Blank Cone
Posts: 61
Joined: 11 Nov 2008 10:55
VLC version: 0.8.6.i
Operating System: Windows

Re: How to read the instance specific vlc log messages

Postby Khenatram » 07 May 2009 16:07

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?


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 24 guests