Problems compiling Mplayer
I followed this guide to enable xvmc for Mplayer on my laptop, but when doing makepkg to compile it into an Arch linux package I get this error message:
GTK-2 devel packages were not found, trying GTK 1.2
Checking for GTK version ... gtk2 2.10.11-2
Error: The GUI requires GTK devel packages (which were not found).
Check "configure.log" if you do not understand why it failed.
sed: can't read config.mak: No such file or directory
Makefile:7: config.mak: No such file or directory
make: *** No rule to make target `config.mak'. Stop.
==> ERROR: Build Failed. Aborting...
My laptop is a Dell 9400 Inspiron with nVidia GeForce GO 7900 GS
Has anyone had any luck with this HOWTO?
This is my version of gtk:
pacman -Q gtk2
gtk2 2.10.11-2
Snowman wrote:try installing pkgconfig then rerun makepkg
I installed pkgconfig but running makepkg still failed. This is some of the output from the terminal:
lirc.c:2:21: error: lirc-dl.h: No such file or directory
lirc.c: In function 'mp_input_lirc_init':
lirc.c:23: error: dereferencing pointer to incomplete type
lirc.c:24: error: dereferencing pointer to incomplete type
lirc.c: In function 'mp_input_lirc_read':
lirc.c:31: error: dereferencing pointer to incomplete type
lirc.c:32: error: dereferencing pointer to incomplete type
lirc.c: In function 'mp_input_lirc_close':
lirc.c:38: error: dereferencing pointer to incomplete type
lirc.c:40: error: dereferencing pointer to incomplete type
make[1]: *** [lirc.o] Error 1
make[1]: Leaving directory `/var/abs/extra/multimedia/mplayer/src/MPlayer-1.0rc1/input'
make: *** [input/libinput.a] Error 2
==> ERROR: Build Failed. Aborting...
I am a newbie at compiling, so a bit lost here. Any help is appreciated.
This is a fresh install btw. I installed it yesterday (replacing Ubuntu Feisty).
Last edited by alphahsk (2007-03-20 19:24:08)
Similar Messages
-
Problem compiling Abstract class
Hi
I have writting an abstract class Sort.java and another class BubbleSort.java. I am having problems compiling BubbleSort.java class.
The following is the error message
BubbleSort.java:8: missing method body, or declare abstract
public int doSorting(int[] array);
^
BubbleSort.java:11: return outside method
return num;
^
The following is the code
public abstract class Sort
public abstract int doSorting(int[] array);
}// End of class
public class BubbleSort extends Sort
private int num = 2;
public int doSorting(int[] array);
num = num + 2;
return num;
} // end of classRemove the semi-colon.
public int doSorting(int[] array); // <------- there -
I've been trying to do the tutorials in a book titled Apache Jakarta-Tomcat as part of my introduction to JSP. I'm new to Java but do know the basics. I have on my machine Java 1.3, Java 1.4, Java FrameWorks 2.1 and Jython 2.1 on Win2000 Pro. So enough about my configuration. I have never worked with packages also.
I downloaded the files from the books site due to the fact I make a lot of typos when hand coding Java (I've become a pretty good debugger of my own code). But everytime I go to compile the *.java I get error messages. So below you will find HelloTag.java and beneath that the error messages that are thrown when I try and compile it. I tested other bits of *.java and have had no problem compiling them. Is there a JSP module I'm missing?
Am I doing something wrong or am I missing something from my configuration.
Marijan Madunic
package chapter2;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.tagext.TagSupport;
public class HelloTag extends TagSupport
public void HelloTag() {
// Method called when the closing hello tag is encountered
public int doEndTag() throws JspException {
try {
// We use the pageContext to get a Writer
// We then print the text string Hello
pageContext.getOut().print("Hello");
catch (Exception e) {
throw new JspTagException(e.getMessage());
// We want to return SKIP_BODY because this Tag does not support
// a Tag Body
return SKIP_BODY;
public void release() {
// Call the parent's release to release any resources
// used by the parent tag.
// This is just good practice for when you start creating
// hierarchies of tags.
super.release();
D:\Java\JDK 1.3\bin>javac HelloTag.java
HelloTag.java:3: cannot resolve symbol
symbol : class JspException
location: package jsp
import javax.servlet.jsp.JspException;
^
HelloTag.java:4: cannot resolve symbol
symbol : class JspTagException
location: package jsp
import javax.servlet.jsp.JspTagException;
^
HelloTag.java:5: cannot resolve symbol
symbol : class TagSupport
location: package tagext
import javax.servlet.jsp.tagext.TagSupport;
^
HelloTag.java:7: cannot resolve symbol
symbol : class TagSupport
location: class chapter2.HelloTag
public class HelloTag extends TagSupport
^
HelloTag.java:14: cannot resolve symbol
symbol : class JspException
location: class chapter2.HelloTag
public int doEndTag() throws JspException {
^
HelloTag.java:20: cannot resolve symbol
symbol : variable pageContext
location: class chapter2.HelloTag
pageContext.getOut().print("Hello");
^
HelloTag.java:24: cannot resolve symbol
symbol : class JspTagException
location: class chapter2.HelloTag
throw new JspTagException(e.getMessage());
^
HelloTag.java:28: cannot resolve symbol
symbol : variable SKIP_BODY
location: class chapter2.HelloTag
return SKIP_BODY;
^
HelloTag.java:37: cannot resolve symbol
symbol : variable super
location: class chapter2.HelloTag
super.release();
^
9 errorsWell, it looks like you've not got the servlet development kit JAR on your classpath. I think it'll probably be called servlet.jar on your system. Add that to the classpath if it's not already there.
Incidentally, you've bumped into one of the areas Java's slightly lenient - declaring a method that looks like a constructor:
public HelloTag() { }
public void HelloTag() { }The first is a constructor, the second is a normal method. I'm assuming you intended to have the former instead of the latter.
Anyway, hope this helps. -
Problems compiling Zaptel package [SOLVED-ISH]
Hey guys, I'm on an Arch64 system and I'm having problems compiling Zaptel (a dependancy for Asterisk).
Here's the pastebin of the errors I get from the Zaptel makefile: http://pastebin.com/776475
Here's my analysis so far:
There's a line in the Makefile for the zaptel driver that goes like this:
make -C /lib/modules/2.6.17-ARCH/build/ SUBDIRS=/home/woogie/zaptel/src/zaptel-1.2.8 modules
This line activates the kernel's makefile in order to build modules, but specifies that the source directory for zaptel should be included in the make process.
Then things go down the proverbial drain - linux/err_kernel_only.h gets included in the build process, which is designed to do one thing only - stop the build process. So I'm not entirely too sure what's going on here. Is there something misconfigured on my system, or is the Zaptel build system flawed somehow, such that I need to compensate for it?Further information:
I've manually run the problematic make command from /lib/modules/2.6.17-ARCH/build on my own. After reading the kernel makefile documentation, I've learned of the V=1 flag to show me exactly what's going on. The failing command is this one:
gcc -Wp,-MD,/home/cestus/zaptel/src/zaptel-1.2.8/.zaptel.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include -D__
KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2
-fomit-frame-pointer -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -fun
it-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wdeclaration-after-statement -Wno-pointer-sign -I. -Iinclude -O4 -g -Wall -DBUILDING_T
ONEZONE -m64 -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG="/etc/zaptel.conf" -DHOTPLUG_FIRMWARE -I/home/cestus/zaptel/src/zaptel-1.2.8//include
-I/home/cestus/zaptel/src/zaptel-1.2.8//include/oct6100api -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(zaptel)" -D"KBUIL
D_MODNAME=KBUILD_STR(zaptel)" -c -o /home/cestus/zaptel/src/zaptel-1.2.8/zaptel.o /home/cestus/zaptel/src/zaptel-1.2.8/zaptel.c
I've figured out that the bit which causes the failure is "-include include/linux/autoconf.h", because autoconf.h just includes the "err_kernel_only" header automatically, which then slays the build process. And I've also discovered that the Zaptel devs are uber-leet. They've found the magical -O4 level in gcc. You know, the one above 3, where the supported optimization levels in gcc are -O, -Os, -O2 and -O3 -
i'm new to java, just went through the tutorial just now..
tried compilling my program the first time on XP, but the system doesn't recognise the command JAVAC,
i've installed the java compiler (j2re-1_4_1_01-windows-i586.exe)
but it still isn't working.. any help?
thanks!then again.. i'm still having problems compiling..
i managed to install the right sdk, but.. i have to run the command javac from the bin directory.. else the command prompt won't recognise it..
anyway to get around this?
also.. because of this.. i can't compile my program.. :( -
I can't compile mplayer and FVWM because of missing X11 libs
when I compile fvwm 2.5.16, I got this error:
In file included from ../libs/FImage.h:10,
from Graphics.c:34:
../libs/FShm.h:19:33: error: X11/extensions/XShm.h: No such file or directory
In file included from ../libs/FImage.h:10,
from Graphics.c:34:
../libs/FShm.h:31: error: syntax error before 'FShmSeg'
../libs/FShm.h:31: warning: data definition has no type or storage class
../libs/FShm.h:32: error: syntax error before 'FShmSegmentInfo'
And when I compile mplayer in the newest abs tree:
$makepkg
Checking for X11 headers presence ... not found (check if the dev(el) packages are installed)
Checking for X11 libs presence ... yes (using /usr/lib)
Checking for X11 ... no
Error: X11 support required for GUI compilation
Check "configure.log" if you do not understand why it failed.
Makefile:7: config.mak: No such file or directory
make: *** No rule to make target `config.mak'. Stop.
==> ERROR: Build Failed. Aborting...
It seems to miss one or more x11-libs,but
$ pacman -Q |grep libx
libx11 1.0.0-1
libxau 1.0.0-1
libxaw 1.0.1-1
libxcomposite 0.2.2.2-1
libxcursor 1.1.5.2-1
libxdamage 1.0.2.2-1
libxdmcp 1.0.0-1
libxevie 1.0.0-1
libxext 1.0.0-1
libxfce4mcs 4.2.3-1
libxfce4util 4.2.3.2-1
libxfcegui4 4.2.3-1
libxfixes 3.0.1.2-1
libxfont 1.0.0-1
libxfontcache 1.0.1-1
libxft 2.1.8.2-1
libxi 1.0.0-1
libxinerama 1.0.0-1
libxkbfile 1.0.2-1
libxkbui 1.0.1-1
libxklavier 2.1-2
libxml2 2.6.23-1
libxmu 1.0.0-1
libxp 1.0.0-1
libxpm 3.5.4.2-1
libxprintapputil 1.0.1-1
libxprintutil 1.0.1-1
libxrandr 1.1.0.2-1
libxrender 0.9.0.2-1
libxres 1.0.0-1
libxslt 1.1.15-1
libxss 1.0.1-1
libxt 1.0.0-3
libxtrap 1.0.0-1
libxtst 1.0.1-1
libxv 1.0.1-1
libxvmc 1.0.1-1
libxxf86dga 1.0.0-1
libxxf86misc 1.0.0-1
libxxf86vm 1.0.0-1
PLEASE, tell me, what should I do? :?:You're welcome , plz mark it as solved
-
Having problems compiling script
I am rather new to java an started a couple of days ago and I ran into a problem compiling this script in the command line
class VariableDemo {
public static void main (String args[]) {
int num = 1000;
System.out.println (num + " is the value of num") ;
At first I forgot to capitolize the 'S' in System (which is why I was getting errors) but after I had corrected it , I still could not get it to compile in a command prompt
even after I corrected my mistakes, I still get this error:
error: cannot read: VariableDemo.java
1 error
When I ran it through JCreator it compiled it just fine and found no errors. SO I just want to know if it is some thing that has to do with the command line or is there an error I am not seeing?
I am running Windows XP Pro with service pack 2 and using JCreator 3.50.010Sorry, I am new to this I just called it script out of ignorance, but, yes it is in the same directory. I even Pathed it out again to be sure.
-
I'm running into the following error when I try to compile mplayer:
libvo/vo_gif89a.o: In function `uninit':
vo_gif89a.c:(.text+0x8d): undefined reference to `EGifPutComment'
vo_gif89a.c:(.text+0x99): undefined reference to `EGifCloseFile'
vo_gif89a.c:(.text+0xdd): undefined reference to `FreeMapObject'
libvo/vo_gif89a.o: In function `gif_reduce':
vo_gif89a.c:(.text+0x1de): undefined reference to `QuantizeBuffer'
libvo/vo_gif89a.o: In function `flip_page':
vo_gif89a.c:(.text+0x2e5): undefined reference to `EGifPutExtension'
vo_gif89a.c:(.text+0x310): undefined reference to `EGifPutImageDesc'
vo_gif89a.c:(.text+0x330): undefined reference to `EGifPutLine'
libvo/vo_gif89a.o: In function `config':
vo_gif89a.c:(.text+0x4e6): undefined reference to `EGifOpenFileName'
vo_gif89a.c:(.text+0x549): undefined reference to `MakeMapObject'
vo_gif89a.c:(.text+0x59c): undefined reference to `EGifPutScreenDesc'
libmpdemux/demux_gif.o: In function `demux_close_gif':
demux_gif.c:(.text+0x17): undefined reference to `DGifCloseFile'
demux_gif.c:(.text+0x39): undefined reference to `PrintGifError'
libmpdemux/demux_gif.o: In function `demux_open_gif':
demux_gif.c:(.text+0xa9): undefined reference to `DGifOpen'
demux_gif.c:(.text+0x181): undefined reference to `PrintGifError'
libmpdemux/demux_gif.o: In function `demux_gif_fill_buffer':
demux_gif.c:(.text+0x4c0): undefined reference to `DGifGetRecordType'
demux_gif.c:(.text+0x4fc): undefined reference to `DGifGetExtension'
demux_gif.c:(.text+0x544): undefined reference to `DGifGetImageDesc'
demux_gif.c:(.text+0x640): undefined reference to `DGifGetLine'
demux_gif.c:(.text+0x94c): undefined reference to `DGifGetScreenDesc'
demux_gif.c:(.text+0x9ad): undefined reference to `DGifGetExtensionNext'
demux_gif.c:(.text+0x9b9): undefined reference to `PrintGifError'
demux_gif.c:(.text+0x9ef): undefined reference to `DGifGetExtensionNext'
collect2: ld returned 1 exit status
make: *** [mplayer] Error 1
==> ERROR: Build Failed.
Aborting...
I get this whether I change PKGBULID or not. I've tried to change the following:
adding CFLAGS="-O2 -fomit-frame-pointer" before ./configure
adding --enable-vdpau
adding --enable-ass
What am I doing wrong?
Last edited by Berticus (2009-10-01 17:52:21)gen1s wrote:I successfully build it yesterday with CFLAGS="-march=core2 -msse4.1 -O2 -pipe" and LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed". It works fine.
gcc 4.4.1-1
mplayer-mt-git (from AUR)
1. The standard codebase builds fine (svn 29766) with unset CFLAGS LDFLAGS. Builds 29777-29779 produce the above mentioned error. All this with gcc 4.4.0.
2. mplayer-mt is a different code base.
3. If you build the standard codebase with gcc 4.4.1, it crashes with mkv containers.
Last edited by wantilles (2009-10-21 20:10:58) -
hello.
this is james mcfadden. i'm having problems compiling the Demo.java program. the Demo.java program is shown below along with the MediaPanel.java and MediaTest.java programs. when i compile the Demo.java program i get the following errors. i really need help in getting rid of these errors.
----jGRASP exec: javac -g X:\CP4B Project\Demo.java
Demo.java:297: cannot find symbol
symbol : class Media
location: class Demo
MediaTest media=new Media();
^
Demo.java:301: cannot find symbol
symbol : class Media
location: class Demo
MediaTest media=new Media();
^
Demo.java:305: cannot find symbol
symbol : class Media
location: class Demo
MediaTest media=new Media();
^
3 errors
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.
//Written by:Seamus McFadden
//Class:CP4B
//Program Number:1
//Program Name:Demo.java
//Description:
//Supervisor:Gerard McCloskey
import java.awt.*;//Contains all of the classes for creating user interfaces and for painting graphics and images
import java.awt.event.*;//Provides interfaces and classes for dealing with different types of events fired by AWT components
import javax.swing.*;//Provides a set of lightweight components that, to the maximum degree possible, work the same on all platforms
public class Demo extends JFrame{
public static void main(String[] args){
int choice=-1;//a variable of type int that is set to -1
choice=getChoice();//invokes the method getChoice()
if(choice!=0){
getSelected(choice);//invokes the method getSelected(choice)
}//end if
}//end main
public static int getChoice(){
String choice;//a variable of type string
int ch;//a variable of type int
choice=JOptionPane.showInputDialog(null,
"1. Product Menu\n" +
"2. Member Menu\n" +
"3. Rental Menu\n" +
"4. Media Menu\n" +
"5. Log Off\n\n" +
"Enter your choice");//asks the user for some input
ch=Integer.parseInt(choice);//a class that wraps a value of the primitive type int in an object
return ch;//a method that returns an integer value
}//end getChoice
public static void getSelected(int choice){
if(choice == 1) {
product();
}//end if
if(choice==2){
member();
}//end if
if(choice==3){
rental();
}//end if
if(choice==4){
media();
}//end if
if(choice==5){
LogOff logoff=new LogOff();
}//end if
else{
ErrorMessage error=new ErrorMessage();
}//end getSelected
public static void product(){
int productChoice=-1;//a variable of type int that is set to -1
productChoice=getProductChoice();//invokes the method getChoice()
if(productChoice!=0){
getProductSelected(productChoice);//invokes the method getSelected(choice)
}//end if
getChoice();
public static void member(){
int memberChoice=-1;//a variable of type int that is set to -1
memberChoice=getMemberChoice();//invokes the method getChoice()
if(memberChoice!=0){
getMemberSelected(memberChoice);//invokes the method getSelected(choice)
}//end if
getChoice();
public static void rental(){
int rentalChoice=-1;//a variable of type int that is set to -1
rentalChoice=getRentalChoice();//invokes the method getChoice()
if(rentalChoice!=0){
getRentalSelected(rentalChoice);//invokes the method getSelected(choice)
}//end if
getChoice();
public static void media(){
int mediaChoice=-1;//a variable of type int that is set to -1
mediaChoice=getMediaChoice();//invokes the method getChoice()
if(mediaChoice!=0){
getMediaSelected(mediaChoice);//invokes the method getSelected(choice)
}//end if
getChoice();
public static int getProductChoice(){
String productChoice;//a variable of type string
int pch;//a variable of type int
productChoice=JOptionPane.showInputDialog(null,
"1. Add product details\n" +
"2. View product details\n" +
"3. Edit product details\n" +
"4. Delete product details\n" +
"5. Return to main menu\n\n" +
"Enter your choice");//asks the user for some input
pch=Integer.parseInt(productChoice);//a class that wraps a value of the primitive type int in an object
return pch;//a method that returns an integer value
}//end getProductChoice
public static int getMemberChoice(){
String memberChoice;//a variable of type string
int mch;//a variable of type int
memberChoice=JOptionPane.showInputDialog(null,
"1. Add member details\n" +
"2. View member details\n" +
"3. Edit member details\n" +
"4. Delete member details\n" +
"5. Return to main menu\n\n" +
"Enter your choice");//asks the user for some input
mch=Integer.parseInt(memberChoice);//a class that wraps a value of the primitive type int in an object
return mch;//a method that returns an integer value
}//end getMemberChoice
public static int getRentalChoice(){
String rentalChoice;//a variable of type string
int rch;//a variable of type int
rentalChoice=JOptionPane.showInputDialog(null,
"1. Add rental details\n" +
"2. View rental details\n" +
"3. Edit rental details\n" +
"4. Delete rental details\n" +
"5. Return to main menu\n\n" +
"Enter your choice");//asks the user for some input
rch=Integer.parseInt(rentalChoice);//a class that wraps a value of the primitive type int in an object
return rch;//a method that returns an integer value
}//end getRentalChoice
public static int getMediaChoice(){
String mediaChoice;//a variable of type string
int mtch;//a variable of type int
mediaChoice=JOptionPane.showInputDialog(null,
"1. Listen to songs\n" +
"2. View movie previews\n" +
"3. View game previews\n" +
"4. Return to main menu\n\n" +
"Enter your choice");//asks the user for some input
mtch=Integer.parseInt(mediaChoice);//a class that wraps a value of the primitive type int in an object
return mtch;//a method that returns an integer value
}//end getMediaChoice
public static void getProductSelected(int productChoice){
if(productChoice==1){
addProducts();
}//end if
if(productChoice==2){
viewProducts();
}//end if
if(productChoice==3){
editProducts();
}//end if
if(productChoice==4){
deleteProducts();
}//end if
else{
ErrorMessage error=new ErrorMessage();
}//end getProductSelected
public static void getMemberSelected(int memberChoice){
if(memberChoice==1){
addMembers();
}//end if
if(memberChoice==2){
viewMembers();
}//end if
if(memberChoice==3){
editMembers();
}//end if
if(memberChoice==4){
deleteMembers();
}//end if
else{
ErrorMessage error=new ErrorMessage();
}//end getMemberSelected
public static void getRentalSelected(int rentalChoice){
if(rentalChoice==1){
addRentals();
}//end if
if(rentalChoice==2){
viewRentals();
}//end if
if(rentalChoice==3){
editRentals();
}//end if
if(rentalChoice==4){
deleteRentals();
}//end if
else{
ErrorMessage error=new ErrorMessage();
}//end getRentalSelected
public static void getMediaSelected(int mediaChoice){
if(mediaChoice==1){
hearSongs();
}//end if
if(mediaChoice==2){
viewMovies();
}//end if
if(mediaChoice==3){
viewGames();
}//end if
else{
ErrorMessage error=new ErrorMessage();
}//end getMediaSelected
public static void addProducts(){
ProductForm product=new ProductForm();
product.getInput();
product.setVisible(true);
public static void viewProducts(){
DatabaseTest tt=new DatabaseTest();
tt.setVisible(true);
public static void editProducts(){
ProductForm product=new ProductForm();
product.getInput();
product.setVisible(true);
public static void deleteProducts(){
ProductForm product=new ProductForm();
product.setVisible(true);
public static void addMembers(){
MemberForm member=new MemberForm();
member.getInput();
member.setVisible(true);
public static void viewMembers(){
DatabaseTest tt=new DatabaseTest();
tt.setVisible(true);
public static void editMembers(){
MemberForm member=new MemberForm();
member.getInput();
member.setVisible(true);
public static void deleteMembers(){
MemberForm member=new MemberForm();
member.setVisible(true);
public static void addRentals(){
RentalForm rental=new RentalForm();
rental.getInput();
rental.setVisible(true);
public static void viewRentals(){
DatabaseTest tt=new DatabaseTest();
tt.setVisible(true);
public static void editRentals(){
RentalForm rental=new RentalForm();
rental.getInput();
rental.setVisible(true);
public static void deleteRentals(){
RentalForm rental=new RentalForm();
rental.setVisible(true);
public static void hearSongs(){
MediaTest media=new Media();
public static void viewMovies(){
MediaTest media=new Media();
public static void viewGames(){
MediaTest media=new Media();
}//end class Demo
import java.awt.BorderLayout;
import java.awt.Component;
import java.io.IOException;
import java.net.URL;
import javax.media.CannotRealizeException;
import javax.media.Manager;
import javax.media.NoPlayerException;
import javax.media.Player;
import javax.swing.JPanel;
public class MediaPanel extends JPanel{
public MediaPanel(URL mediaURL){
setLayout(new BorderLayout());//use a BorderLayout
//Use lightweight components for Swing compatibility
Manager.setHint(Manager.LIGHTWEIGHT_RENDERER,true);
try{
//create a player to play the media specified in the URL
Player mediaPlayer=Manager.createRealizedPlayer(mediaURL);
//get the components for the video and the playback controls
Component video=mediaPlayer.getVisualComponent();
Component controls=mediaPlayer.getControlPanelComponent();
if(video!=null)
add(video,BorderLayout.CENTER);//add video component
if(controls!=null)
add(controls,BorderLayout.SOUTH);//add controls
mediaPlayer.start();//start playing the media clip
}//end try
catch(NoPlayerException noPlayerException){
System.err.println("No media player found");
}//end catch
catch(CannotRealizeException cannotRealizeException){
System.err.println("Could not realize media player");
}//end catch
catch(IOException iOException){
System.err.println("Error reading from the source");
}//end catch
}//end MediaPanel constructor
}//end class MediaPanel
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
public class MediaTest{
//launch the application
public static void main(String args[]){
//create a file chooser
JFileChooser fileChooser=new JFileChooser();
//show open file dialog
int result=fileChooser.showOpenDialog(null);
if(result==JFileChooser.APPROVE_OPTION){//user chose a file
URL mediaURL=null;
try{
//get the file as URL
mediaURL=fileChooser.getSelectedFile().toURL();
}//end try
catch(MalformedURLException malformedURLException){
System.err.println("Could not create URL for the file");
}//end catch
if(mediaURL!=null) {//only display if there is a valid URL
JFrame mediaTest=new JFrame("Media Tester");
mediaTest.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
MediaPanel mediaPanel=new MediaPanel(mediaURL);
mediaTest.add(mediaPanel);
mediaTest.setSize(300,300);
mediaTest.setVisible(true);
}//end inner if
}//end outer if
}//end main
}//end class MediaTesthello.
this is james mcfadden. thanks for the reply. i did what you told me to do, but i am still having trouble trying to use the 2 JMF programs (MediaPanel.java and MediaTest.java) with the Demo.java program. the Demo.java program compiles and runs ok, but when i press 1 (for listening to songs) in the media menu i get a JOptionPane (An Error Message) displayed on screen. how can i fix this problem?
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Demo extends JFrame{
public static void main(String[] args){
int choice=-1;//a variable of type int that is set to -1
choice=getChoice();//invokes the method getChoice()
if(choice!=0){
getSelected(choice);//invokes the method getSelected(choice)
}//end if
}//end main
public static int getChoice(){
String choice;//a variable of type string
int ch;//a variable of type int
choice=JOptionPane.showInputDialog(null,
"1. Product Menu\n" +
"2. Member Menu\n" +
"3. Rental Menu\n" +
"4. Media Menu\n" +
"5. Log Off\n\n" +
"Enter your choice");//asks the user for some input
ch=Integer.parseInt(choice);//a class that wraps a value of the primitive type int in an object
return ch;//a method that returns an integer value
}//end getChoice
public static void getSelected(int choice){
if(choice == 1) {
product();
}//end if
if(choice==2){
member();
}//end if
if(choice==3){
rental();
}//end if
if(choice==4){
media();
}//end if
if(choice==5){
LogOff logoff=new LogOff();
}//end if
else{
JOptionPane.showMessageDialog(null,"Error\n\nInvalid options\nPlease choose 1, 2, 3, 4 or 5 on the main menu\nPlease choose 1, 2, 3, 4 or 5 on the product menu\nPlease choose 1, 2, 3, 4 or 5 on the member menu\nPlease choose 1, 2, 3, 4 or 5 on the rental menu\nPlease choose 1, 2, 3 or 4 on the media menu");
System.exit(0);
}//end getSelected
public static void product(){
int productChoice=-1;//a variable of type int that is set to -1
productChoice=getProductChoice();//invokes the method getChoice()
if(productChoice!=0){
getProductSelected(productChoice);//invokes the method getSelected(choice)
}//end if
getChoice();
public static void member(){
int memberChoice=-1;//a variable of type int that is set to -1
memberChoice=getMemberChoice();//invokes the method getChoice()
if(memberChoice!=0){
getMemberSelected(memberChoice);//invokes the method getSelected(choice)
}//end if
getChoice();
public static void rental(){
int rentalChoice=-1;//a variable of type int that is set to -1
rentalChoice=getRentalChoice();//invokes the method getChoice()
if(rentalChoice!=0){
getRentalSelected(rentalChoice);//invokes the method getSelected(choice)
}//end if
getChoice();
public static void media(){
int mediaChoice=-1;//a variable of type int that is set to -1
mediaChoice=getMediaChoice();//invokes the method getChoice()
if(mediaChoice!=0){
getMediaSelected(mediaChoice);//invokes the method getSelected(choice)
}//end if
getChoice();
public static int getProductChoice(){
String productChoice;//a variable of type string
int pch;//a variable of type int
productChoice=JOptionPane.showInputDialog(null,
"1. Add product details\n" +
"2. View product details\n" +
"3. Edit product details\n" +
"4. Delete product details\n" +
"5. Return to main menu\n\n" +
"Enter your choice");//asks the user for some input
pch=Integer.parseInt(productChoice);//a class that wraps a value of the primitive type int in an object
return pch;//a method that returns an integer value
}//end getProductChoice
public static int getMemberChoice(){
String memberChoice;//a variable of type string
int mch;//a variable of type int
memberChoice=JOptionPane.showInputDialog(null,
"1. Add member details\n" +
"2. View member details\n" +
"3. Edit member details\n" +
"4. Delete member details\n" +
"5. Return to main menu\n\n" +
"Enter your choice");//asks the user for some input
mch=Integer.parseInt(memberChoice);//a class that wraps a value of the primitive type int in an object
return mch;//a method that returns an integer value
}//end getMemberChoice
public static int getRentalChoice(){
String rentalChoice;//a variable of type string
int rch;//a variable of type int
rentalChoice=JOptionPane.showInputDialog(null,
"1. Add rental details\n" +
"2. View rental details\n" +
"3. Edit rental details\n" +
"4. Delete rental details\n" +
"5. Return to main menu\n\n" +
"Enter your choice");//asks the user for some input
rch=Integer.parseInt(rentalChoice);//a class that wraps a value of the primitive type int in an object
return rch;//a method that returns an integer value
}//end getRentalChoice
public static int getMediaChoice(){
String mediaChoice;//a variable of type string
int mtch;//a variable of type int
mediaChoice=JOptionPane.showInputDialog(null,
"1. Listen to songs\n" +
"2. View movie previews\n" +
"3. View game previews\n" +
"4. Return to main menu\n\n" +
"Enter your choice");//asks the user for some input
mtch=Integer.parseInt(mediaChoice);//a class that wraps a value of the primitive type int in an object
return mtch;//a method that returns an integer value
}//end getMediaChoice
public static void getProductSelected(int productChoice){
if(productChoice==1){
addProducts();
}//end if
if(productChoice==2){
viewProducts();
}//end if
if(productChoice==3){
editProducts();
}//end if
if(productChoice==4){
deleteProducts();
}//end if
else{
JOptionPane.showMessageDialog(null,"Error\n\nInvalid options\nPlease choose 1, 2, 3, 4 or 5 on the main menu\nPlease choose 1, 2, 3, 4 or 5 on the product menu\nPlease choose 1, 2, 3, 4 or 5 on the member menu\nPlease choose 1, 2, 3, 4 or 5 on the rental menu\nPlease choose 1, 2, 3 or 4 on the media menu");
System.exit(0);
}//end getProductSelected
public static void getMemberSelected(int memberChoice){
if(memberChoice==1){
addMembers();
}//end if
if(memberChoice==2){
viewMembers();
}//end if
if(memberChoice==3){
editMembers();
}//end if
if(memberChoice==4){
deleteMembers();
}//end if
else{
JOptionPane.showMessageDialog(null,"Error\n\nInvalid options\nPlease choose 1, 2, 3, 4 or 5 on the main menu\nPlease choose 1, 2, 3, 4 or 5 on the product menu\nPlease choose 1, 2, 3, 4 or 5 on the member menu\nPlease choose 1, 2, 3, 4 or 5 on the rental menu\nPlease choose 1, 2, 3 or 4 on the media menu");
System.exit(0);
}//end getMemberSelected
public static void getRentalSelected(int rentalChoice){
if(rentalChoice==1){
addRentals();
}//end if
if(rentalChoice==2){
viewRentals();
}//end if
if(rentalChoice==3){
editRentals();
}//end if
if(rentalChoice==4){
deleteRentals();
}//end if
else{
JOptionPane.showMessageDialog(null,"Error\n\nInvalid options\nPlease choose 1, 2, 3, 4 or 5 on the main menu\nPlease choose 1, 2, 3, 4 or 5 on the product menu\nPlease choose 1, 2, 3, 4 or 5 on the member menu\nPlease choose 1, 2, 3, 4 or 5 on the rental menu\nPlease choose 1, 2, 3 or 4 on the media menu");
System.exit(0);
}//end getRentalSelected
public static void getMediaSelected(int mediaChoice){
if(mediaChoice==1){
hearSongs();
}//end if
if(mediaChoice==2){
viewMovies();
}//end if
if(mediaChoice==3){
viewGames();
}//end if
else{
JOptionPane.showMessageDialog(null,"Error\n\nInvalid options\nPlease choose 1, 2, 3, 4 or 5 on the main menu\nPlease choose 1, 2, 3, 4 or 5 on the product menu\nPlease choose 1, 2, 3, 4 or 5 on the member menu\nPlease choose 1, 2, 3, 4 or 5 on the rental menu\nPlease choose 1, 2, 3 or 4 on the media menu");
System.exit(0);
}//end getMediaSelected
public static void addProducts(){
ProductForm product=new ProductForm();
product.getInput();
product.setVisible(true);
public static void viewProducts(){
DatabaseTest tt=new DatabaseTest();
tt.setVisible(true);
public static void editProducts(){
ProductForm product=new ProductForm();
product.getInput();
product.setVisible(true);
public static void deleteProducts(){
ProductForm product=new ProductForm();
product.setVisible(true);
public static void addMembers(){
MemberForm member=new MemberForm();
member.getInput();
member.setVisible(true);
public static void viewMembers(){
DatabaseTest tt=new DatabaseTest();
tt.setVisible(true);
public static void editMembers(){
MemberForm member=new MemberForm();
member.getInput();
member.setVisible(true);
public static void deleteMembers(){
MemberForm member=new MemberForm();
member.setVisible(true);
public static void addRentals(){
RentalForm rental=new RentalForm();
rental.getInput();
rental.setVisible(true);
public static void viewRentals(){
DatabaseTest tt=new DatabaseTest();
tt.setVisible(true);
public static void editRentals(){
RentalForm rental=new RentalForm();
rental.getInput();
rental.setVisible(true);
public static void deleteRentals(){
RentalForm rental=new RentalForm();
rental.setVisible(true);
public static void hearSongs(){
MediaTest media=new MediaTest();
public static void viewMovies(){
MediaTest media=new MediaTest();
public static void viewGames(){
MediaTest media=new MediaTest();
}//end class Demo
import java.awt.BorderLayout;
import java.awt.Component;
import java.io.IOException;
import java.net.URL;
import javax.media.CannotRealizeException;
import javax.media.Manager;
import javax.media.NoPlayerException;
import javax.media.Player;
import javax.swing.JPanel;
public class MediaPanel extends JPanel{
public MediaPanel(URL mediaURL){
setLayout(new BorderLayout());//use a BorderLayout
//Use lightweight components for Swing compatibility
Manager.setHint(Manager.LIGHTWEIGHT_RENDERER,true);
try{
//create a player to play the media specified in the URL
Player mediaPlayer=Manager.createRealizedPlayer(mediaURL);
//get the components for the video and the playback controls
Component video=mediaPlayer.getVisualComponent();
Component controls=mediaPlayer.getControlPanelComponent();
if(video!=null)
add(video,BorderLayout.CENTER);//add video component
if(controls!=null)
add(controls,BorderLayout.SOUTH);//add controls
mediaPlayer.start();//start playing the media clip
}//end try
catch(NoPlayerException noPlayerException){
System.err.println("No media player found");
}//end catch
catch(CannotRealizeException cannotRealizeException){
System.err.println("Could not realize media player");
}//end catch
catch(IOException iOException){
System.err.println("Error reading from the source");
}//end catch
}//end MediaPanel constructor
}//end class MediaPanel
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
public class MediaTest{
//launch the application
public static void main(String args[]){
//create a file chooser
JFileChooser fileChooser=new JFileChooser();
//show open file dialog
int result=fileChooser.showOpenDialog(null);
if(result==JFileChooser.APPROVE_OPTION){//user chose a file
URL mediaURL=null;
try{
//get the file as URL
mediaURL=fileChooser.getSelectedFile().toURL();
}//end try
catch(MalformedURLException malformedURLException){
System.err.println("Could not create URL for the file");
}//end catch
if(mediaURL!=null) {//only display if there is a valid URL
JFrame mediaTest=new JFrame("Media Tester");
mediaTest.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
MediaPanel mediaPanel=new MediaPanel(mediaURL);
mediaTest.add(mediaPanel);
mediaTest.setSize(300,300);
mediaTest.setVisible(true);
}//end inner if
}//end outer if
}//end main
}//end class MediaTest -
Problems compiling at91 driver for samutils-0.2.1
Hello All!
I'm having problems compiling the usb driver for sam7 tools. I am receiving the following errors:
make -C /lib/modules/2.6.39-ARCH/build SUBDIRS=/home/bailey/Source/sam7utils-0.2.1/driver modules
make[1]: Entering directory `/usr/src/linux-2.6.39-ARCH'
CC [M] /home/bailey/Source/sam7utils-0.2.1/driver/at91.o
/home/bailey/Source/sam7utils-0.2.1/driver/at91.c: In function âat91_write_bulk_callbackâ:
/home/bailey/Source/sam7utils-0.2.1/driver/at91.c:154:2: error: implicit declaration of function âusb_buffer_freeâ [-Werror=implicit-function-declaration]
/home/bailey/Source/sam7utils-0.2.1/driver/at91.c:140:19: warning: variable âdevâ set but not used [-Wunused-but-set-variable]
/home/bailey/Source/sam7utils-0.2.1/driver/at91.c: In function âat91_writeâ:
/home/bailey/Source/sam7utils-0.2.1/driver/at91.c:178:2: error: implicit declaration of function âusb_buffer_allocâ [-Werror=implicit-function-declaration]
/home/bailey/Source/sam7utils-0.2.1/driver/at91.c:178:6: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/bailey/Source/sam7utils-0.2.1/driver/at91.c:192:6: warning: passing argument 6 of âusb_fill_bulk_urbâ from incompatible pointer type [enabled by default]
include/linux/usb.h:1266:20: note: expected âusb_complete_tâ but argument is of type âvoid (*)(struct urb *, struct pt_regs *)â
/home/bailey/Source/sam7utils-0.2.1/driver/at91.c: In function âat91_probeâ:
/home/bailey/Source/sam7utils-0.2.1/driver/at91.c:305:2: error: implicit declaration of function âinfoâ [-Werror=implicit-function-declaration]
/home/bailey/Source/sam7utils-0.2.1/driver/at91.c: In function âat91_disconnectâ:
/home/bailey/Source/sam7utils-0.2.1/driver/at91.c:320:2: error: implicit declaration of function âlock_kernelâ [-Werror=implicit-function-declaration]
/home/bailey/Source/sam7utils-0.2.1/driver/at91.c:328:2: error: implicit declaration of function âunlock_kernelâ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [/home/bailey/Source/sam7utils-0.2.1/driver/at91.o] Error 1
make[1]: *** [_module_/home/bailey/Source/sam7utils-0.2.1/driver] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.39-ARCH'
make: *** [default] Error 2
output of uname -a
2.6.39-ARCH #1 SMP PREEMPT Mon Jun 27 22:01:13 CEST 2011 i686 Intel(R) Pentium(R) 4 CPU 1.50GHz GenuineIntel GNU/Linux
I am running gcc 4.6.1-1 and have installed kernel26headers. If there is any info I'm missing plz let me know.
Thanks for your help in advanceThank you for the reply, I noticed that the post below (its for Ubuntu) shows the gcc version to be 4.0.3
[link]http://www.makingthings.com/documentati … -sam7utils[/link]
I poked around the Makefile in /usr/src/linux-2.6.39 and got rid of "-Wall" and "-Wno-implicit-function-declaration"
it compiled with the following warnings:
make[1]: Entering directory `/usr/src/linux-2.6.39-ARCH'
Building modules, stage 2.
MODPOST 1 modules
WARNING: "info" [/home/bailey/Source/sam7utils-0.2.1/driver/at91.ko] undefined!
WARNING: "unlock_kernel" [/home/bailey/Source/sam7utils-0.2.1/driver/at91.ko] undefined!
WARNING: "lock_kernel" [/home/bailey/Source/sam7utils-0.2.1/driver/at91.ko] undefined!
WARNING: "usb_buffer_alloc" [/home/bailey/Source/sam7utils-0.2.1/driver/at91.ko] undefined!
WARNING: "usb_buffer_free" [/home/bailey/Source/sam7utils-0.2.1/driver/at91.ko] undefined!
CC /home/bailey/Source/sam7utils-0.2.1/driver/at91.mod.o
LD [M] /home/bailey/Source/sam7utils-0.2.1/driver/at91.ko
make[1]: Leaving directory `/usr/src/linux-2.6.39-ARCH'
but when I tried to install, the output was
insmod: error inserting 'at91.ko': -1 Unknown symbol in module
Unfortunately, I tried grabbing the package from the AUR, but I ran into the same issues. Seems the only common factor in this process is gcc.
Thanks for the help -
How to compile mplayer with giflib support?
Hey all,
i am trying to compile mplayer (or mplayer2, i have tried several pkgbuilds from aur), as the package from extra doesn't have support for the the gif89a video_out driver. I have giflib package installed, so i have the /usr/lib/include/gif_lib.h in my filesystem. If i try to compile mplayer with the ./configure --enable-gif option, it fails with the following error message:
libmpdemux/demux_gif.o: In function `demux_close_gif':
demux_gif.c:(.text+0x39): undefined reference to `PrintGifError'
libmpdemux/demux_gif.o: In function `demux_open_gif':
demux_gif.c:(.text+0x293): undefined reference to `PrintGifError'
libmpdemux/demux_gif.o: In function `demux_gif_fill_buffer':
demux_gif.c:(.text+0x95b): undefined reference to `PrintGifError'
demux_gif.c:(.text+0xb1a): undefined reference to `PrintGifError'
...among others, because some other libraries (cdio_paranoia, theora and caca) have undefined references too. If i check the source of giflib, i see the missing function 'PrintGifError' in 'lib/gif_err.c', but i don't have this file on my filesystem. My question is from where should i obtain these sources, and where i need to place them to compile mplayer successfully?
Update: here is the whole list of errors, all of them are undefined references to various functions: http://pastebin.com/LttqXy5J
Last edited by vizipok (2013-06-03 11:53:20)sl1pkn07 wrote:why this downgrade
Because there's lotsa compilation fails caused by the giflib API changing. -
Problems compiling with packages
Hi,
I wonder if anyone could help me.
I have had problems compiling using a package. I have altered the classpath in autoexec.bat with:
SET CLASSPATH=%classpath%;C:\jdk1.3.1_02\classes;.
the package class files are stored in C:\jdk1.3.1_02\classes\helliker\id3
and I have imported the class with:
import helliker.id3.*;
I am getting the following error:
C:\My Documents\Uni work\mp3 project\test\Driver.java:1: package helliker.id3 does not exist
import helliker.id3.*;
^
Can anybody help?
Thanks,
DavePerhaps the version of Windows you are using does not use autoexec.bat. For example, in NT and XP, you set Classpath using ControlPanel/System/Advanced/Environment Variables.
Perhaps there is a typo in your Classpath, for example an extra space.
On a command line, try this:
javac -classpath C:\jdk1.3.1_02\classes C:\My Documents\Uni work\mp3 project\test\Driver.java
If that works, then definitely Classpath is not set as you think it is. -
Compile mplayer with gcc4 or higher
Does anyone know how to compile mplayer with gcc4 ?
I located this:
http://www.rocklinux.net/packages/mplayer.html
Although theres no quick and easy wiki on it like alsa / xorg / nvidia etc...There are gcc4 patches out. Here is one url:
http://arch64.org/svn/*checkout*/trunk/ … gcc4.patch -
Compiling MPlayer-SVN on Arch64
Has anyone successfully built the Subversion package on Arch64?
Thanks. I hadn't started to dig into the problem yet, but the compile error was blah..blah..blah.. libtool.... ccache...
This is great. I'm itching to try out MPlayer-cvs.
------->>>EDIT
It worked. A minute or so later, Subversion compiles. A minute after that, MPlayer-svn didn't. I guess that's a talk for this new and improved thread!
It seems that the compiler is not finding avutil.h (possibly from the ffmpeg library [/libavcodec/avcodec.h]). -
Hi all,
I'm new with JSP, actually I don't know wether it's a TOMCAT ESPECIFIC issue or if your can help me here. I get the following error while executing a simple script (gateway.jgp) on the browser:
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
I have a simple JSP script:
gateway.jsp
<%
String commando = request.getParameter("comando");
if (commando.equals("lista")) {
%>
<%@ include file="servicosXML/consulta.jsp" %>
<%
}else{
%>
<%@ page contentType="text/xml;charset=ISO-8859-1" %>
<resultado>
commando desconhecido
</resultado>
<%
%>
servicosXML/consulta.jsp
<%@ page language="java" import="servicos.BoletaDAO,java.util.*,"%>
<%
String subcomando = request.getParameter("subcomando");
String buffer = new String();
HashMap map = new HashMap();
if (subcomando.equals("carteira")) {
buffer = BoletaDAO.listaCarteira();
} else if(subcomando.equals("classe")){
buffer = BoletaDAO.listaClasse();
} else if(subcomando.equals("grupo")){
buffer = BoletaDAO.listaGrupo();
} else if(subcomando.equals("operacao")){
map.put("Operador",request.getParameter("Operador"));
map.put("Dt",request.getParameter("Dt"));
buffer = BoletaDAO.listaOperacao(map);
} else if(subcomando.equals("produto")){
map.put("CLSId",request.getParameter("CLSId"));
map.put("Sinal",request.getParameter("Sinal"));
buffer = BoletaDAO.listaProduto(map);
out.print(buffer);
%>WHATS THE PROBLEM???
THANKS IN ADVANCENeed a bit more on the error message/stack trace.
Specifically the bit that tells you the root cause of the issue.
Its good that you tried to keep the stack trace short, unfortunately the bit you removed is the bit that contains the actual error message of interest ;-)
Maybe you are looking for
-
Hello, what's the recommended size for PNG icons (to be used in a Photoshop panel)? In the CS5 version of the Photoshop Panel Developer's Guide they still uses 50x50px. I asked to a friend of mine, who looked inside the application resources: she tol
-
Which cable do i need for dell monitor Dell Ultrasharp U2713H - macbook 13' retina?
Which cable do i need to attach monitor to macbook pro for optimum display resolution? thank you
-
Just bought a season, cant open iTunes any more... Help?
I just bought Season 1 of It's Always Sunny in Philadelphia, but while they were downloading, one of them didn't start, and when I said "check for purchases" it didn't do anything. So I decided to quit because it would prompt me to resume the downloa
-
Doubt in loading 0ic_c03
hi, i am loading an inventory cube from data source 2lis_03_bf for initial load i filled the set up tables the last date in set up tables is 01.01.2007 correct me i am wrong for init load up to 01.01.2007 i will set 'no marker update' for deltas from
-
I'm having vertical banding issues in Premiere Pro 6 with my video playback. I ingested video from my mini-DV Sony camera. I think it's a codec issue, but if there's an easier answer I'll take it. Thanks, Brett