Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
98743759
Commit
98743759
authored
Feb 22, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate MemoryHandle and StringHandle
parent
247431e0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
bindings/cil/src/libvlc.cs
bindings/cil/src/libvlc.cs
+1
-1
bindings/cil/src/media.cs
bindings/cil/src/media.cs
+1
-1
bindings/cil/src/ustring.cs
bindings/cil/src/ustring.cs
+13
-1
No files found.
bindings/cil/src/libvlc.cs
View file @
98743759
...
@@ -98,7 +98,7 @@ namespace VideoLAN.LibVLC
...
@@ -98,7 +98,7 @@ namespace VideoLAN.LibVLC
[
DllImport
(
"libvlc.dll"
,
EntryPoint
=
"libvlc_media_get_mrl"
)]
[
DllImport
(
"libvlc.dll"
,
EntryPoint
=
"libvlc_media_get_mrl"
)]
public
static
extern
public
static
extern
Memory
Handle
MediaGetMRL
(
MediaHandle
media
,
NativeException
ex
);
String
Handle
MediaGetMRL
(
MediaHandle
media
,
NativeException
ex
);
[
DllImport
(
"libvlc.dll"
,
EntryPoint
=
"libvlc_media_duplicate"
)]
[
DllImport
(
"libvlc.dll"
,
EntryPoint
=
"libvlc_media_duplicate"
)]
public
static
extern
public
static
extern
...
...
bindings/cil/src/media.cs
View file @
98743759
...
@@ -102,7 +102,7 @@ namespace VideoLAN.LibVLC
...
@@ -102,7 +102,7 @@ namespace VideoLAN.LibVLC
{
{
get
get
{
{
Memory
Handle
str
=
LibVLC
.
MediaGetMRL
(
Handle
,
ex
);
String
Handle
str
=
LibVLC
.
MediaGetMRL
(
Handle
,
ex
);
Raise
();
Raise
();
return
str
.
Transform
();
return
str
.
Transform
();
}
}
...
...
bindings/cil/src/ustring.cs
View file @
98743759
...
@@ -96,7 +96,7 @@ namespace VideoLAN.LibVLC
...
@@ -96,7 +96,7 @@ namespace VideoLAN.LibVLC
* @brief MemoryHandle: heap allocation by the C run-time
* @brief MemoryHandle: heap allocation by the C run-time
* @ingroup Internals
* @ingroup Internals
*/
*/
internal
sealed
class
MemoryHandle
:
NonNullHandle
internal
class
MemoryHandle
:
NonNullHandle
{
{
[
DllImport
(
"libvlc.dll"
,
EntryPoint
=
"libvlc_free"
)]
[
DllImport
(
"libvlc.dll"
,
EntryPoint
=
"libvlc_free"
)]
private
static
extern
void
Free
(
IntPtr
ptr
);
private
static
extern
void
Free
(
IntPtr
ptr
);
...
@@ -108,7 +108,19 @@ namespace VideoLAN.LibVLC
...
@@ -108,7 +108,19 @@ namespace VideoLAN.LibVLC
{
{
Free
(
handle
);
Free
(
handle
);
}
}
};
/**
* @brief StringHandle: heap-allocated characters array
* @ingroup Internals
*/
internal
sealed
class
StringHandle
:
MemoryHandle
{
/**
* Converts an heap-allocated nul-terminated UTF-8 characters array
* into a managed string.
* @return the resulting managed string.
*/
public
override
string
ToString
()
public
override
string
ToString
()
{
{
return
U8String
.
FromNative
(
handle
);
return
U8String
.
FromNative
(
handle
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment