Ejemplo n.º 1
0
 public void release() {
   if (released) {
     return;
   }
   released = true;
   libvlc.libvlc_media_release(instance);
 }
Ejemplo n.º 2
0
 public String getMrl() {
   libvlc_exception_t exception = new libvlc_exception_t();
   return libvlc.libvlc_media_get_mrl(instance, exception);
 }
Ejemplo n.º 3
0
 MediaDescriptor(JVLC jvlc, LibVlcMedia instance) {
   libvlc_exception_t exception = new libvlc_exception_t();
   libvlc = jvlc.getLibvlc();
   this.instance = instance;
   eventManager = libvlc.libvlc_media_event_manager(instance, exception);
 }
Ejemplo n.º 4
0
 public void addOption(String option) {
   libvlc_exception_t exception = new libvlc_exception_t();
   libvlc.libvlc_media_add_option(instance, option, exception);
 }
Ejemplo n.º 5
0
 /* (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);
 }
Ejemplo n.º 6
0
 /**
  * @param jvlc The jvlc instance to create the media descriptor for.
  * @param media The media string
  */
 public MediaDescriptor(JVLC jvlc, String media) {
   libvlc_exception_t exception = new libvlc_exception_t();
   libvlc = jvlc.getLibvlc();
   instance = libvlc.libvlc_media_new(jvlc.getInstance(), media, exception);
   eventManager = libvlc.libvlc_media_event_manager(instance, exception);
 }
Ejemplo n.º 7
0
 /* (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_height(media.getInstance(), exception);
 }
Ejemplo n.º 8
0
 /* (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);
 }
Ejemplo n.º 9
0
 /* (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);
 }
Ejemplo n.º 10
0
 /* (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;
 }
Ejemplo n.º 11
0
 /* (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);
 }
Ejemplo n.º 12
0
 /* (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);
 }
Ejemplo n.º 13
0
 /* (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);
 }