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
1f4b06d6
Commit
1f4b06d6
authored
Feb 21, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend Media class
parent
73f14c79
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
2 deletions
+58
-2
bindings/cil/src/libvlc.cs
bindings/cil/src/libvlc.cs
+1
-1
bindings/cil/src/media.cs
bindings/cil/src/media.cs
+57
-1
No files found.
bindings/cil/src/libvlc.cs
View file @
1f4b06d6
...
...
@@ -117,7 +117,7 @@ namespace VideoLAN.LibVLC
public static extern
MediaListHandle MediaSubItems (MediaHandle media, NativeException ex);*/
/*[DllImport ("libvlc.dll", EntryPoint="libvlc_media_
get_state
")]
/*[DllImport ("libvlc.dll", EntryPoint="libvlc_media_
event_manager
")]
public static extern
EventManagerHandle MediaGetEventManager (MediaHandle media,
NativeException ex);*/
...
...
bindings/cil/src/media.cs
View file @
1f4b06d6
...
...
@@ -47,7 +47,7 @@ namespace VideoLAN.LibVLC
* @ingroup API
* Each media object represents an input media, such as a file or an URL.
*/
public
class
Media
:
BaseObject
public
class
Media
:
BaseObject
,
ICloneable
{
internal
MediaHandle
Handle
{
...
...
@@ -94,5 +94,61 @@ namespace VideoLAN.LibVLC
LibVLC
.
MediaAddUntrustedOption
(
Handle
,
uopts
,
ex
);
Raise
();
}
/**
* The media location (file path, URL, ...).
*/
public
string
Location
{
get
{
MemoryHandle
str
=
LibVLC
.
MediaGetMRL
(
Handle
,
ex
);
Raise
();
return
str
.
Transform
();
}
}
private
Media
(
MediaHandle
handle
)
{
this
.
handle
=
handle
;
}
/**
* Duplicates a media object.
*/
public
object
Clone
()
{
return
new
Media
(
LibVLC
.
MediaDuplicate
(
Handle
));
}
/**
* Duration of the media in microseconds. The precision of the result
* depends on the input stram protocol and file format. The value
* might be incorrect and unknown (VLC usually returns 0 then).
*/
public
long
Duration
{
get
{
long
duration
=
LibVLC
.
MediaGetDuration
(
Handle
,
ex
);
Raise
();
return
duration
;
}
}
/**
* Whether the media was "preparsed". If true, the meta-infos were
* extracted, even before the media was played. This is normally only
* available if the input files is stored on a local filesystem.
*/
public
bool
IsPreparsed
{
get
{
int
preparsed
=
LibVLC
.
MediaIsPreparsed
(
Handle
,
ex
);
Raise
();
return
preparsed
!=
0
;
}
}
};
};
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