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
e143f0ec
Commit
e143f0ec
authored
Aug 30, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jvlc_video: soemetics.
parent
2605808e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
87 deletions
+86
-87
bindings/java/core/src/main/java/org/videolan/jvlc/Video.java
...ings/java/core/src/main/java/org/videolan/jvlc/Video.java
+86
-87
No files found.
bindings/java/core/src/main/java/org/videolan/jvlc/Video.java
View file @
e143f0ec
...
...
@@ -36,102 +36,101 @@ import org.videolan.jvlc.internal.LibVlc.libvlc_exception_t;
public
class
Video
{
private
final
LibVlcInstance
libvlcInstance
;
private
final
LibVlcInstance
libvlcInstance
;
private
final
LibVlc
libvlc
;
public
Video
(
JVLC
jvlc
)
{
this
.
libvlcInstance
=
jvlc
.
getInstance
();
this
.
libvlc
=
jvlc
.
getLibvlc
();
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#destroyVideo()
*/
public
void
destroyVideo
(
MediaPlayer
media
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
public
Video
(
JVLC
jvlc
)
{
this
.
libvlcInstance
=
jvlc
.
getInstance
();
this
.
libvlc
=
jvlc
.
getLibvlc
();
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#destroyVideo()
*/
public
void
destroyVideo
(
MediaPlayer
media
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_video_destroy
(
media
.
getInstance
(),
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#getFullscreen()
*/
public
boolean
getFullscreen
(
MediaPlayer
media
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
return
libvlc
.
libvlc_get_fullscreen
(
media
.
getInstance
(),
exception
)
==
1
?
true
:
false
;
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#getSnapshot(java.lang.String)
*/
public
void
getSnapshot
(
MediaPlayer
media
,
String
filepath
,
int
width
,
int
height
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_video_take_snapshot
(
media
.
getInstance
(),
filepath
,
width
,
height
,
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#getVideoHeight()
*/
public
int
getHeight
(
MediaPlayer
media
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
return
libvlc
.
libvlc_video_get_height
(
media
.
getInstance
(),
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#getVideoWidth()
*/
public
int
getWidth
(
MediaPlayer
media
)
{
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#getFullscreen()
*/
public
boolean
getFullscreen
(
MediaPlayer
media
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
return
libvlc
.
libvlc_get_fullscreen
(
media
.
getInstance
(),
exception
)
==
1
?
true
:
false
;
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#getSnapshot(java.lang.String)
*/
public
void
getSnapshot
(
MediaPlayer
media
,
String
filepath
,
int
width
,
int
height
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_video_take_snapshot
(
media
.
getInstance
(),
filepath
,
width
,
height
,
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#getVideoHeight()
*/
public
int
getHeight
(
MediaPlayer
media
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
return
libvlc
.
libvlc_video_get_height
(
media
.
getInstance
(),
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#getVideoWidth()
*/
public
int
getWidth
(
MediaPlayer
media
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
return
libvlc
.
libvlc_video_get_width
(
media
.
getInstance
(),
exception
);
}
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#reparentVideo(java.awt.Component)
*/
public
void
reparent
(
MediaPlayer
media
,
java
.
awt
.
Canvas
canvas
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#reparentVideo(java.awt.Component)
*/
public
void
reparent
(
MediaPlayer
media
,
java
.
awt
.
Canvas
canvas
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
long
drawable
=
com
.
sun
.
jna
.
Native
.
getComponentID
(
canvas
);
libvlc
.
libvlc_video_reparent
(
media
.
getInstance
(),
drawable
,
exception
);
}
libvlc
.
libvlc_video_reparent
(
media
.
getInstance
(),
drawable
,
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#resizeVideo(int, int)
*/
public
void
setSize
(
int
width
,
int
height
)
{
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#resizeVideo(int, int)
*/
public
void
setSize
(
int
width
,
int
height
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_video_set_size
(
libvlcInstance
,
width
,
height
,
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#setFullscreen(boolean)
*/
public
void
setFullscreen
(
MediaPlayer
media
,
boolean
fullscreen
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_set_fullscreen
(
media
.
getInstance
(),
fullscreen
?
1
:
0
,
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#toggleFullscreen()
*/
public
void
toggleFullscreen
(
MediaPlayer
media
)
{
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#setFullscreen(boolean)
*/
public
void
setFullscreen
(
MediaPlayer
media
,
boolean
fullscreen
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_set_fullscreen
(
media
.
getInstance
(),
fullscreen
?
1
:
0
,
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#toggleFullscreen()
*/
public
void
toggleFullscreen
(
MediaPlayer
media
)
{
libvlc_exception_t
exception
=
new
libvlc_exception_t
();
libvlc
.
libvlc_toggle_fullscreen
(
media
.
getInstance
(),
exception
);
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#getSize()
*/
public
Dimension
getSize
(
MediaPlayer
media
)
{
return
new
Dimension
(
getWidth
(
media
),
getHeight
(
media
));
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#setSize(java.awt.Dimension)
*/
public
void
setSize
(
Dimension
d
)
{
setSize
(
d
.
width
,
d
.
height
);
}
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#getSize()
*/
public
Dimension
getSize
(
MediaPlayer
media
)
{
return
new
Dimension
(
getWidth
(
media
),
getHeight
(
media
));
}
/* (non-Javadoc)
* @see org.videolan.jvlc.VideoIntf#setSize(java.awt.Dimension)
*/
public
void
setSize
(
Dimension
d
)
{
setSize
(
d
.
width
,
d
.
height
);
}
}
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