How to get " input_item_t " in C#

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 get " input_item_t " in C#

Postby Khenatram » 04 May 2009 06:09

Hello,

I want to use following function of VLC 0.8.6.i

Code: Select all

VLC_EXPORT( char *, vlc_input_item_GetInfo, ( input_item_t *p_i, const char *psz_cat,const char *psz_name ) );
But the issue is I am not able to get the "input_item_t" object.

Can anyone help me in getting the input_item_t object in C#.

Thanks,
Ram

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 get " input_item_t " in C#

Postby Khenatram » 07 May 2009 09:47

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: No registered users and 45 guests