I've the following error in my jvlc-java player:
- when I get a video-stream and display it, all works fine until the end of the stream, then the player crashes:
Code: Select all
run:
[00000001] main libvlc debug: VLC media player - version 0.9.4 Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--build=i486-linux-gnu' '--enable-maintaner-mode' '--enable-release' '--prefix=/usr' '--enable-libtool' '--enable-fast-install' '--with-binary-version=1ubuntu3.1' '--disable-update-check' '--disable-gnome' '--disable-gtk' '--disable-familiar' '--disable-fb' '--enable-ggi' '--enable-sdl' '--enable-esd' '--enable-mad' '--enable-arts' '--enable-jack' '--enable-pulse' '--enable-lirc' '--enable-a52' '--enable-aa' '--enable-dvbpsi' '--enable-mozilla' '--with-mozilla-pkg=libxul-plugin' '--disable-kde' '--enable-mp4' '--enable-dvb' '--disable-satellite' '--enable-ogg' '--enable-vorbis' '--enable-shout' '--enable-qt4' '--disable-slp' '--enable-flac' '--disable-skins' '--disable-basic-skins' '--enable-skins2' '--enable-freetype' '--enable-mkv' '--enable-speex' '--enable-caca' '--enable-live555' '--enable-libmpeg2' '--enable-fribidi' '--enable-cdio' '--enable-mod' '--enable-theora' '--enable-modplug' '--enable-dvdnav' '--enable-gnutls' '--enable-ffmpeg' '--enable-ncurses' '--enable-smb' '--disable-gnomevfs' '--enable-bonjour' '--enable-mpc' '--enable-vcd' '--enable-vcdx' '--enable-notify' '--enable-twolame' '--enable-x264' '--enable-faad' '--disable-zvbi' '--enable-telx' '--enable-mediacontrol-bindings' '--disable-atmo' '--enable-taglib' '--enable-libass' '--enable-libdca' '--enable-alsa' '--enable-dv' '--enable-v4l' '--enable-v4l2' '--enable-pvr' '--enable-svgalib' '--enable-dvd' '--without-dvdcss' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2' 'LDFLAGS=-Wl,--as-needed' 'CPPFLAGS=' 'CXXFLAGS=-g -O2'
[00000001] main libvlc debug: translation test: code is "C"
[00000376] main libvlc debug: VLC media player - version 0.9.4 Grishenko - (c) 1996-2008 the VideoLAN team
[00000376] main libvlc debug: libvlc was configured with ./configure '--build=i486-linux-gnu' '--enable-maintaner-mode' '--enable-release' '--prefix=/usr' '--enable-libtool' '--enable-fast-install' '--with-binary-version=1ubuntu3.1' '--disable-update-check' '--disable-gnome' '--disable-gtk' '--disable-familiar' '--disable-fb' '--enable-ggi' '--enable-sdl' '--enable-esd' '--enable-mad' '--enable-arts' '--enable-jack' '--enable-pulse' '--enable-lirc' '--enable-a52' '--enable-aa' '--enable-dvbpsi' '--enable-mozilla' '--with-mozilla-pkg=libxul-plugin' '--disable-kde' '--enable-mp4' '--enable-dvb' '--disable-satellite' '--enable-ogg' '--enable-vorbis' '--enable-shout' '--enable-qt4' '--disable-slp' '--enable-flac' '--disable-skins' '--disable-basic-skins' '--enable-skins2' '--enable-freetype' '--enable-mkv' '--enable-speex' '--enable-caca' '--enable-live555' '--enable-libmpeg2' '--enable-fribidi' '--enable-cdio' '--enable-mod' '--enable-theora' '--enable-modplug' '--enable-dvdnav' '--enable-gnutls' '--enable-ffmpeg' '--enable-ncurses' '--enable-smb' '--disable-gnomevfs' '--enable-bonjour' '--enable-mpc' '--enable-vcd' '--enable-vcdx' '--enable-notify' '--enable-twolame' '--enable-x264' '--enable-faad' '--disable-zvbi' '--enable-telx' '--enable-mediacontrol-bindings' '--disable-atmo' '--enable-taglib' '--enable-libass' '--enable-libdca' '--enable-alsa' '--enable-dv' '--enable-v4l' '--enable-v4l2' '--enable-pvr' '--enable-svgalib' '--enable-dvd' '--without-dvdcss' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2' 'LDFLAGS=-Wl,--as-needed' 'CPPFLAGS=' 'CXXFLAGS=-g -O2'
[00000376] main libvlc debug: translation test: code is "C"
[00000389] main libvlc debug: VLC media player - version 0.9.4 Grishenko - (c) 1996-2008 the VideoLAN team
[00000389] main libvlc debug: libvlc was configured with ./configure '--build=i486-linux-gnu' '--enable-maintaner-mode' '--enable-release' '--prefix=/usr' '--enable-libtool' '--enable-fast-install' '--with-binary-version=1ubuntu3.1' '--disable-update-check' '--disable-gnome' '--disable-gtk' '--disable-familiar' '--disable-fb' '--enable-ggi' '--enable-sdl' '--enable-esd' '--enable-mad' '--enable-arts' '--enable-jack' '--enable-pulse' '--enable-lirc' '--enable-a52' '--enable-aa' '--enable-dvbpsi' '--enable-mozilla' '--with-mozilla-pkg=libxul-plugin' '--disable-kde' '--enable-mp4' '--enable-dvb' '--disable-satellite' '--enable-ogg' '--enable-vorbis' '--enable-shout' '--enable-qt4' '--disable-slp' '--enable-flac' '--disable-skins' '--disable-basic-skins' '--enable-skins2' '--enable-freetype' '--enable-mkv' '--enable-speex' '--enable-caca' '--enable-live555' '--enable-libmpeg2' '--enable-fribidi' '--enable-cdio' '--enable-mod' '--enable-theora' '--enable-modplug' '--enable-dvdnav' '--enable-gnutls' '--enable-ffmpeg' '--enable-ncurses' '--enable-smb' '--disable-gnomevfs' '--enable-bonjour' '--enable-mpc' '--enable-vcd' '--enable-vcdx' '--enable-notify' '--enable-twolame' '--enable-x264' '--enable-faad' '--disable-zvbi' '--enable-telx' '--enable-mediacontrol-bindings' '--disable-atmo' '--enable-taglib' '--enable-libass' '--enable-libdca' '--enable-alsa' '--enable-dv' '--enable-v4l' '--enable-v4l2' '--enable-pvr' '--enable-svgalib' '--enable-dvd' '--without-dvdcss' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2' 'LDFLAGS=-Wl,--as-needed' 'CPPFLAGS=' 'CXXFLAGS=-g -O2'
[00000389] main libvlc debug: translation test: code is "C"
[00000402] main libvlc debug: VLC media player - version 0.9.4 Grishenko - (c) 1996-2008 the VideoLAN team
[00000402] main libvlc debug: libvlc was configured with ./configure '--build=i486-linux-gnu' '--enable-maintaner-mode' '--enable-release' '--prefix=/usr' '--enable-libtool' '--enable-fast-install' '--with-binary-version=1ubuntu3.1' '--disable-update-check' '--disable-gnome' '--disable-gtk' '--disable-familiar' '--disable-fb' '--enable-ggi' '--enable-sdl' '--enable-esd' '--enable-mad' '--enable-arts' '--enable-jack' '--enable-pulse' '--enable-lirc' '--enable-a52' '--enable-aa' '--enable-dvbpsi' '--enable-mozilla' '--with-mozilla-pkg=libxul-plugin' '--disable-kde' '--enable-mp4' '--enable-dvb' '--disable-satellite' '--enable-ogg' '--enable-vorbis' '--enable-shout' '--enable-qt4' '--disable-slp' '--enable-flac' '--disable-skins' '--disable-basic-skins' '--enable-skins2' '--enable-freetype' '--enable-mkv' '--enable-speex' '--enable-caca' '--enable-live555' '--enable-libmpeg2' '--enable-fribidi' '--enable-cdio' '--enable-mod' '--enable-theora' '--enable-modplug' '--enable-dvdnav' '--enable-gnutls' '--enable-ffmpeg' '--enable-ncurses' '--enable-smb' '--disable-gnomevfs' '--enable-bonjour' '--enable-mpc' '--enable-vcd' '--enable-vcdx' '--enable-notify' '--enable-twolame' '--enable-x264' '--enable-faad' '--disable-zvbi' '--enable-telx' '--enable-mediacontrol-bindings' '--disable-atmo' '--enable-taglib' '--enable-libass' '--enable-libdca' '--enable-alsa' '--enable-dv' '--enable-v4l' '--enable-v4l2' '--enable-pvr' '--enable-svgalib' '--enable-dvd' '--without-dvdcss' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2' 'LDFLAGS=-Wl,--as-needed' 'CPPFLAGS=' 'CXXFLAGS=-g -O2'
[00000402] main libvlc debug: translation test: code is "C"
[b]*** LibVLC Exception not handled: No active input
Set a breakpoint in 'libvlc_exception_not_handled' to debug.
#
# An unexpected error has been detected by Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x90335b9b, pid=7698, tid=2114976656
#
# Java VM: Java HotSpot(TM) Server VM (11.0-b15 mixed mode linux-x86)
# Problematic frame:
# C [libvlc.so.2.0.2+0x10b9b]
#
# An error report file with more information is saved as:
# /home/peach/HTA/Diplomarbeit/videostreaming/streaming_test/hs_err_pid7698.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Java Result: 134
BUILD SUCCESSFUL (total time: 2 minutes 49 seconds)[/b]
Here the code of my player:
Code: Select all
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* LectureScreen.java
*
* Created on Mar 26, 2009, 5:45:53 PM
*/
package ch.hslu.bda.wonderland.streaming;
import java.awt.Canvas;
import javax.swing.JOptionPane;
import org.videolan.jvlc.JVLC;
import org.videolan.jvlc.MediaDescriptor;
import org.videolan.jvlc.MediaList;
import org.videolan.jvlc.MediaListPlayer;
import org.videolan.jvlc.MediaPlayer;
/**
*
* @author peach
*/
public class LectureScreen extends javax.swing.JPanel {
//JVLC
private Canvas jvcanvas;
private JVLC jvlc;
private MediaListPlayer medialistPlayer;
private MediaPlayer mediaPlayer;
private MediaDescriptor mediaDescriptor;
/** Creates new form LectureScreen */
public LectureScreen() {
initComponents();
//JVLC
jvlcSetup();
}
private void jvlcSetup() {
jvcanvas = new java.awt.Canvas();
jvcanvas.setSize(400, 200);
jPanel_document.add(jvcanvas);
String[] arg = new String[4];
arg[0] = "--intf=dummy";
arg[1] = "--ignore-config";
arg[2] = "--no-plugins-cache";
arg[3] = "--plugin-path=plugins";
jvlc = new JVLC(arg);
medialistPlayer = new MediaListPlayer(jvlc);
mediaDescriptor = new MediaDescriptor(jvlc, "http://192.168.1.38:8080");
//mediaDescriptor = new MediaDescriptor(jvlc, "rtsp://localhost:5554/testclip");
mediaPlayer = new MediaPlayer(mediaDescriptor);
medialistPlayer.setMediaInstance(mediaPlayer);
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jButton_play = new javax.swing.JButton();
jButton_pause = new javax.swing.JButton();
jButton_stop = new javax.swing.JButton();
jPanel_document = new javax.swing.JPanel();
btnDebug = new javax.swing.JButton();
txtPosition = new javax.swing.JTextField();
lblPosition = new javax.swing.JLabel();
btnApply = new javax.swing.JButton();
jButton_play.setText("Play");
jButton_play.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton_playActionPerformed(evt);
}
});
jButton_pause.setText("Pause");
jButton_pause.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton_pauseActionPerformed(evt);
}
});
jButton_stop.setText("Stop");
jButton_stop.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton_stopActionPerformed(evt);
}
});
jPanel_document.setPreferredSize(new java.awt.Dimension(400, 200));
javax.swing.GroupLayout jPanel_documentLayout = new javax.swing.GroupLayout(jPanel_document);
jPanel_document.setLayout(jPanel_documentLayout);
jPanel_documentLayout.setHorizontalGroup(
jPanel_documentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 493, Short.MAX_VALUE)
);
jPanel_documentLayout.setVerticalGroup(
jPanel_documentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 247, Short.MAX_VALUE)
);
btnDebug.setLabel("debug");
btnDebug.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnDebugActionPerformed(evt);
}
});
txtPosition.setText("0.0");
lblPosition.setText("position:");
btnApply.setText("apply");
btnApply.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnApplyActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel_document, javax.swing.GroupLayout.DEFAULT_SIZE, 493, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
.addGroup(layout.createSequentialGroup()
.addComponent(jButton_play)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton_pause)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton_stop)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 110, Short.MAX_VALUE)
.addComponent(btnDebug)
.addGap(18, 18, 18)
.addComponent(lblPosition)
.addGap(3, 3, 3)
.addComponent(txtPosition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnApply)
.addGap(25, 25, 25)))
.addGap(18, 18, 18))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel_document, javax.swing.GroupLayout.DEFAULT_SIZE, 247, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtPosition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblPosition)
.addComponent(btnApply)
.addComponent(jButton_play)
.addComponent(jButton_pause)
.addComponent(jButton_stop)
.addComponent(btnDebug))
.addContainerGap())
);
}// </editor-fold>
private void jButton_playActionPerformed(java.awt.event.ActionEvent evt) {
//medialistPlayer.play();
jvlc.setVideoOutput(jvcanvas);
mediaPlayer.play();
}
private void jButton_pauseActionPerformed(java.awt.event.ActionEvent evt) {
mediaPlayer.pause();
}
private void jButton_stopActionPerformed(java.awt.event.ActionEvent evt) {
mediaPlayer.stop();
}
private void btnDebugActionPerformed(java.awt.event.ActionEvent evt) {
//mediaPlayer.setPosition(0.3f);
//mediaPlayer.setTime(5000000);
String length, position, fps, rate, time, msg;
length = String.valueOf(mediaPlayer.getLength());
position = String.valueOf(mediaPlayer.getPosition());
fps = String.valueOf(mediaPlayer.getFPS());
rate = String.valueOf(mediaPlayer.getRate());
time = String.valueOf(mediaPlayer.getTime());
msg = "length: " + length +
"\nposition: " + position +
"\nfps: " + fps +
"\nrate: " + rate +
"\ntime: " + time;
JOptionPane.showMessageDialog(null, msg, "debug", JOptionPane.OK_CANCEL_OPTION);
}
private void btnApplyActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
mediaPlayer.setPosition(Float.parseFloat(txtPosition.getText()));
}
// Variables declaration - do not modify
private javax.swing.JButton btnApply;
private javax.swing.JButton btnDebug;
private javax.swing.JButton jButton_pause;
private javax.swing.JButton jButton_play;
private javax.swing.JButton jButton_stop;
private javax.swing.JPanel jPanel_document;
private javax.swing.JLabel lblPosition;
private javax.swing.JTextField txtPosition;
// End of variables declaration
}
Thanks for your help.
Peter