forked from ArduPilot/MissionPlanner
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLibVLCLibrary.Core.cs
188 lines (148 loc) · 6.41 KB
/
LibVLCLibrary.Core.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
////////////////////////////////////////////////////////////////////////////////
//
// LibVLCLibrary.Core.cs - This file is part of LibVLC.NET.
//
// Copyright (C) 2011 Boris Richter <himself@boris-richter.net>
//
// ==========================================================================
//
// LibVLC.NET is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or (at
// your option) any later version.
//
// LibVLC.NET is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
// License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with LibVLC.NET; if not, see http://www.gnu.org/licenses/.
//
// ==========================================================================
//
// $LastChangedRevision$
// $LastChangedDate$
// $LastChangedBy$
//
////////////////////////////////////////////////////////////////////////////////
using System;
using System.Runtime.InteropServices;
#pragma warning disable 1591
namespace LibVLC.NET
{
//****************************************************************************
partial class LibVLCLibrary
{
// libvlc_instance_t * libvlc_new (int argc, const char *const *argv)
//==========================================================================
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate IntPtr libvlc_new_signature(int argc, string[] argv);
//==========================================================================
public readonly libvlc_new_signature m_libvlc_new;
//==========================================================================
/// <summary>
/// Create and initialize a libvlc instance.
/// </summary>
/// <returns>
/// The libvlc instance or NULL in case of error.
/// </returns>
public IntPtr libvlc_new()
{
VerifyAccess();
return m_libvlc_new(0, null);
}
// void libvlc_release (libvlc_instance_t *p_instance)
//==========================================================================
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void libvlc_release_signature(IntPtr p_instance);
//==========================================================================
private readonly libvlc_release_signature m_libvlc_release;
//==========================================================================
/// <summary>
/// Decrement the reference count of a libvlc instance, and destroy it if
/// it reaches zero.
/// </summary>
/// <param name="p_instance">
/// The instance to the reference.
/// </param>
public void libvlc_release(IntPtr p_instance)
{
VerifyAccess();
m_libvlc_release(p_instance);
}
/*
void libvlc_retain (libvlc_instance_t *p_instance)
Increments the reference count of a libvlc instance.
int libvlc_add_intf (libvlc_instance_t *p_instance, const char *name)
Try to start a user interface for the libvlc instance.
void libvlc_set_exit_handler (libvlc_instance_t *p_instance, void(*cb)(void *), void *opaque)
Registers a callback for the LibVLC exit event.
void libvlc_wait (libvlc_instance_t *p_instance)
Waits until an interface causes the instance to exit.
void libvlc_set_user_agent (libvlc_instance_t *p_instance, const char *name, const char *http)
Sets the application name.
*/
// const char * libvlc_get_version (void)
//==========================================================================
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate string libvlc_get_version_signature();
//==========================================================================
private readonly libvlc_get_version_signature m_libvlc_get_version;
//==========================================================================
public string libvlc_get_version()
{
VerifyAccess();
return m_libvlc_get_version();
}
// const char * libvlc_get_compiler (void)
//==========================================================================
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate string libvlc_get_compiler_signature();
//==========================================================================
private readonly libvlc_get_compiler_signature m_libvlc_get_compiler;
//==========================================================================
/// <summary>
/// Retrieve libvlc compiler version.
/// </summary>
/// <returns>
/// A string containing the libvlc compiler version.
/// </returns>
public string libvlc_get_compiler()
{
VerifyAccess();
return m_libvlc_get_compiler();
}
// const char * libvlc_get_changeset (void)
//==========================================================================
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate string libvlc_get_changeset_signature();
//==========================================================================
private readonly libvlc_get_changeset_signature m_libvlc_get_changeset;
//==========================================================================
/// <summary>
/// Retrieve libvlc changeset.
/// </summary>
/// <returns>
/// A string containing the libvlc changeset.
/// </returns>
public string libvlc_get_changeset()
{
VerifyAccess();
return m_libvlc_get_changeset();
}
//==========================================================================
// void libvlc_free (void* ptr)
//==========================================================================
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void libvlc_free_signature(IntPtr ptr);
//==========================================================================
private readonly libvlc_free_signature m_libvlc_free;
//==========================================================================
public void libvlc_free(IntPtr ptr)
{
VerifyAccess();
m_libvlc_free(ptr);
}
} // class LibVLCLibrary
}