Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
7c1e2611
Commit
7c1e2611
authored
Apr 08, 2008
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes to JVLC class
parent
1d1c5f07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
34 deletions
+30
-34
bindings/java/core/src/main/java/org/videolan/jvlc/JVLC.java
bindings/java/core/src/main/java/org/videolan/jvlc/JVLC.java
+30
-34
No files found.
bindings/java/core/src/main/java/org/videolan/jvlc/JVLC.java
View file @
7c1e2611
...
@@ -48,7 +48,7 @@ public class JVLC
...
@@ -48,7 +48,7 @@ public class JVLC
private
VLM
vlm
;
private
VLM
vlm
;
private
volatile
boolean
released
;
private
volatile
boolean
released
;
public
JVLC
()
public
JVLC
()
{
{
...
@@ -67,11 +67,21 @@ public class JVLC
...
@@ -67,11 +67,21 @@ public class JVLC
this
(
args
.
split
(
" "
));
this
(
args
.
split
(
" "
));
}
}
/*
* Core methods
*/
private
LibVlcInstance
createInstance
(
String
[]
args
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
return
libvlc
.
libvlc_new
(
args
.
length
,
args
,
exception
);
}
public
MediaInstance
play
(
String
media
)
public
MediaInstance
play
(
String
media
)
{
{
MediaDescriptor
mediaDescriptor
=
new
MediaDescriptor
(
this
,
media
);
MediaDescriptor
mediaDescriptor
=
new
MediaDescriptor
(
this
,
media
);
MediaInstance
mediaInstance
=
new
MediaInstance
(
mediaDescriptor
);
MediaInstance
mediaInstance
=
new
MediaInstance
(
mediaDescriptor
);
mediaInstance
.
play
();
mediaInstance
.
play
();
mediaDescriptor
.
release
();
return
mediaInstance
;
return
mediaInstance
;
}
}
...
@@ -82,22 +92,20 @@ public class JVLC
...
@@ -82,22 +92,20 @@ public class JVLC
libvlc
.
libvlc_video_set_parent
(
instance
,
drawable
,
exception
);
libvlc
.
libvlc_video_set_parent
(
instance
,
drawable
,
exception
);
}
}
/*
* Core methods
*/
private
LibVlcInstance
createInstance
(
String
[]
args
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_exception_init
(
exception
);
return
libvlc
.
libvlc_new
(
args
.
length
,
args
,
exception
);
}
public
Logger
getLogger
()
public
Logger
getLogger
()
{
{
return
new
Logger
(
this
);
return
new
Logger
(
this
);
}
}
/**
* Returns the mediaList.
* @return the mediaList
*/
public
MediaList
getMediaList
()
{
return
mediaList
;
}
public
VLM
getVLM
()
public
VLM
getVLM
()
{
{
if
(
vlm
!=
null
)
if
(
vlm
!=
null
)
...
@@ -145,16 +153,17 @@ public class JVLC
...
@@ -145,16 +153,17 @@ public class JVLC
*/
*/
public
void
release
()
public
void
release
()
{
{
if
(
!
released
)
if
(
released
)
{
{
released
=
true
;
return
;
if
(
vlm
!=
null
)
{
vlm
.
release
();
vlm
=
null
;
}
libvlc
.
libvlc_release
(
instance
);
}
}
released
=
true
;
if
(
vlm
!=
null
)
{
vlm
.
release
();
vlm
=
null
;
}
libvlc
.
libvlc_release
(
instance
);
}
}
/*
/*
...
@@ -164,21 +173,8 @@ public class JVLC
...
@@ -164,21 +173,8 @@ public class JVLC
@Override
@Override
protected
void
finalize
()
throws
Throwable
protected
void
finalize
()
throws
Throwable
{
{
if
(!
released
)
release
();
{
released
=
true
;
libvlc
.
libvlc_release
(
instance
);
}
super
.
finalize
();
super
.
finalize
();
}
}
/**
* Returns the mediaList.
* @return the mediaList
*/
public
MediaList
getMediaList
()
{
return
mediaList
;
}
}
}
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