Question linux jmf
code:
stream = ((NewReceiveStreamEvent) evt).getReceiveStream();
tmp_ds = stream.getDataSource();
Player player = Manager.createRealizedPlayer(tmp_ds); //here exception
FrameGrabbingControl fgc = (FrameGrabbingControl) player.getControl("javax.media.control.FrameGrabbingControl");
javax.media.Buffer buffer = fgc.grabFrame();
BufferToImage bufferToImage=new BufferToImage((VideoFormat)buffer.getFormat());
Image image=bufferToImage.createImage(buffer);
error message:
javax.media.NoPlayerException: Error instantiating class: com.sun.media.content.unknown.Handler : java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at javax.media.Manager.createPlayerForSource(Manager.java:1502)
at javax.media.Manager.createPlayer(Manager.java:500)
at javax.media.Manager.createRealizedPlayer(Manager.java:579)
at MulServerProcess.createTransmitter(MulServerProcess.java:374)
at MulServerProcess.update(MulServerProcess.java:286)
at com.sun.media.rtp.RTPEventHandler.processEvent(RTPEventHandler.java:62)
at com.sun.media.rtp.RTPEventHandler.dispatchEvents(RTPEventHandler.java:96)
at com.sun.media.rtp.RTPEventHandler.run(RTPEventHandler.java:115)
add "export DISPLAY=localhost:0" to file " /etc/profile" ,but nothing happen!
System.setProperty("java.awt.headless", "true"); add code
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
System.out.println("Headless mode: " + ge.isHeadless()); the answer is true;
error message:
javax.media.NoPlayerException: Error instantiating class: com.sun.media.content.unknown.Handler : java.awt.HeadlessException
at javax.media.Manager.createPlayerForSource(Manager.java:1502)
at javax.media.Manager.createPlayer(Manager.java:500)
at MulServerProcess.createTransmitter(MulServerProcess.java:393)
at MulServerProcess.update(MulServerProcess.java:292)
at com.sun.media.rtp.RTPEventHandler.processEvent(RTPEventHandler.java:62)
at com.sun.media.rtp.RTPEventHandler.dispatchEvents(RTPEventHandler.java:96)
at com.sun.media.rtp.RTPEventHandler.run(RTPEventHandler.java:115)
Re: Headless exception in AIX using JMF2.1.1
This question is the same as me. But it is still not solved.
Is this a bug of JMF in Linux ?
Similar Messages
-
Some generic questions about JMF
Hi, as new to JMF, I would like to ask some generic questions about JMF from this community
Though including RTP stack, JMF is only compatible to old RTP draft, RFC1889. I know that Sun stopped developing/supporting JMF. What is the alternative solution for JAVA RTP implementation suitable for a serious SERVER project, not just a school-term project? Has anyone thought about that or may have already moved forward? Is that any commercial or more updated Java based RTP stack currently? I searched with google. Besides jrtp, a school project, and I could not find a nice one. Majority of RTPstack implementation is C/C++.
My second question is if there is the performance analysis and comparison of JMF. I know that some client applications such as SIP-Communicator adopt JMF for media delivery. But it is for one user in one machine. I wonder if any server application has adopt JMF as media relaying layer.
I appreciate any input from this community.erwin2009 wrote:
Hi, as new to JMF, I would like to ask some generic questions about JMF from this communitySure/
Though including RTP stack, JMF is only compatible to old RTP draft, RFC1889. I know that Sun stopped developing/supporting JMF. What is the alternative solution for JAVA RTP implementation suitable for a serious SERVER project, not just a school-term project? Has anyone thought about that or may have already moved forward? Is that any commercial or more updated Java based RTP stack currently? I searched with google. Besides jrtp, a school project, and I could not find a nice one. Majority of RTPstack implementation is C/C++. There is one active project out there, Freedom for Media in Java, that has RTP capabilities. It's obviously not from Sun, but it's the only other RTP-capable project I am aware of, other than FOBS4Java, I believe is the name of it.
What they are suitable for is beyond my scope of knowledge, I only know of the 2 projects.
My second question is if there is the performance analysis and comparison of JMF. I know that some client applications such as SIP-Communicator adopt JMF for media delivery. But it is for one user in one machine. I wonder if any server application has adopt JMF as media relaying layer. None that I have seen, except for various projects I've helped people with on this forum. But, if someone is asking for help on a forum with his/her server application, it probably doesn't meet the guidelines you just laid out ;-)
I appreciate any input from this community.Sorry I don't have more to add to your inquires... -
I have a class in which a have a processor.
The processor is reading data from a file and transmit it
via rtp:// to another class which runs on another computer.
This other class has a player which is constructed on the rtp stream
from the other computer.
We have:
The port is 32110.
First computer
Windows
ip=192.168.0.3
processor with DataSink -> to 192.168.0.2:32110
Second Computer
Linux
ip=192.168.0.2
player with a MediaLocator("rtp://192.168.0.3:32110/audio/1")
My tcpdump shows this:
21:13:52.340791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:52.420791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:52.420791 192.168.0.2 > 192.168.0.3: icmp: 192.168.0.2 udp port 32110 unreachable [tos 0xc0]
21:13:52.480791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:52.580791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:52.630791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:52.740791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1269
21:13:52.800791 192.168.0.3.65193 > 192.168.0.2.32111: udp 56
21:13:52.820791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:52.880791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:52.960791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:53.010791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:53.130791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:53.180791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:53.290791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:53.360791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1269
21:13:53.420791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:53.420791 192.168.0.2 > 192.168.0.3: icmp: 192.168.0.2 udp port 32110 unreachable [tos 0xc0]
21:13:53.530791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:53.580791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:53.680791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:53.770791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:53.830791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:53.900791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:53.960791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1269
21:13:54.070791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:54.120791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:54.230791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
21:13:54.320791 192.168.0.3.65192 > 192.168.0.2.32110: udp 1270
etc.....................................................
If I put these on 2 Windowses it works fine.
Where am I wrong?
I mention that on Linux I have the jmf from Blackdown
and JMFStudio works on Linux.
(I play mp3s with it) so I think the installation is ok.
and on Windows I have jmf-Windows Performance Pack
Thanx in advanceHi
Scince you have got the JMF to work on Linux, could you please look at my problem installing it. The detailes are in :
http://forum.java.sun.com/thread.jspa?threadID=750005&tstart=0
I hope to get out from this problem .... -
Security Question Linux 2.6.18-164.el5 - Home User Directory Changed
I logged into my unix account and was unable to update any folders or create files. The ownership has changed. This is the second occurrence where the first time the tech support denies it occurred. Didn't have any screenshots... Now I have screenshots for evidence. How can I determine when this happened or the user responsible?
I logged into my unix account and was unable to update any folders or create files. The ownership has changed.Your description is not much help. It does not provide any information, such as:
<ol>
<li>What was the new file permissions? (Hint: ls -ld $HOME)
<li>What file ownership should the directory have? (Hint: ls -ld $HOME after the file permissions are repaired.
<li>Were you logged on to the system when the change occurred?
<li>How is the $HOME directory mounted? Local disk? NFS mount? SAN? Thumb drive?
<li>Who else was logged into the system when this happened?
<li>Did this happen after a system reboot?
<li>What did tech support actually do to repair the file permissions?
</ol>
In other words, give us a glimmer of an idea about your issue. -
Quick question linux-ck-nvidia
I just picked up a lenovo t-61 with nvidia nvs 140m graphics. I noticed that the ck-repo has nvidia beta drivers, but the numbering from the from nvidia's site doesnt match. Has anyone used these drivers with this setup? Its not a big deal to rebuild the kernel, but it would be nice to always have the latest ck-kernel- nvidia drivers and not rebuild all the time.
Thanks.I suspect graysky will be along soon with more specific info, but I for one am using the repo-ck nvidia package on an older work machine. I have not updated that one in a bit (a few weeks perhaps) but at least up till then it worked great.
edit: I should clarify - it still works great, I just don't have first hand experience with any more recent updates to it.
edit2: oops, I missed the "beta" part. I just have the stable version of course.
Last edited by Trilby (2012-08-02 23:47:39) -
JMF, Linux, wrong codec selected when using jarred version of app
I have problem realising an AVI player when I try and run Linux JMF application when whole application is bundled into jar file and I try and run it using
java -cp <..JMF/lib/jmf.jar:/home/codroe/fobs4jmf.jar..> -jar app.jarIn jmf.log I see:
## Player created: com.sun.media.content.unknown.Handler@1cd2e5f
## using DataSource: com.sun.media.protocol.file.DataSource@911f71
## Building Track: 0
## Input: XVID, 720x576, FrameRate=25.0, Length=1244160 68 extra bytes
!! Failed to handle track 0
XX Unable to handle format: XVID, 720x576, FrameRate=25.0, Length=1244160 68 extra bytesThis is exactly the message I usually get when some part of JMF cannot find "jmf.properties" file (if for example could not find .jmfdir), but looking at strace from application run it does appear JMF found my jmf.properties this time, but still chose not to use omnvidea codec:
stat64("jmf.properties", 0xfeffc410) = -1 ENOENT (No such file or directory)
stat64("/home/codroe/JMF-2.1.1e/lib/jmf.properties", {st_mode=S_IFREG|0644, st_size=31354, ...}) = 0
open("/home/codroe/JMF-2.1.1e/lib/jmf.properties", O_RDONLY|O_LARGEFILE) = 11When I run my unbundled (i.e. not wrapped up in jar) version of Linux application (same classpath), it finds jmf.properties no problem, and choses omnivoidea codec and now is able to play the video with good things in jmf log:
## Player created: com.sun.media.content.unknown.Handler@30c221
## using DataSource: com.omnividea.media.protocol.file.DataSource@a401c2
## Building Track: 0
## Input: FFMPEG_VIDEO, 720x576, FrameRate=25.0, Length=414720 0 extra bytesMy windows version works fine in both configurations, jarred or not jarred.
From Linux strace log I it shows my working non-JARed version has selected omnividea codec:
gettimeofday({1100876842, 175149}, NULL) = 0
stat64("/home/codroe/media/protocol/file/DataSource.class", 0xfeffc384) = -1 ENOENT (No such file or directory)
stat64("/home/codroe/JMF-2.1.1e/lib/media/protocol/file/DataSource.class", 0xfeffc384) = -1 ENOENT (No such file or directory)
gettimeofday({1100876842, 179815}, NULL) = 0
stat64("/home/codroe/media/protocol/file/DataSource.class", 0xfeffc384) = -1 ENOENT (No such file or directory)
stat64("/home/codroe/JMF-2.1.1e/lib/media/protocol/file/DataSource.class", 0xfeffc384) = -1 ENOENT (No such file or directory)
gettimeofday({1100876842, 182979}, NULL) = 0
gettimeofday({1100876842, 183206}, NULL) = 0
gettimeofday({1100876842, 184371}, NULL) = 0
gettimeofday({1100876842, 184591}, NULL) = 0
stat64("/home/codroe/com/omnividea/media/protocol/file/DataSource.class", 0xfeffc384) = -1 ENOENT (No such file or directory)
stat64("/home/codroe/JMF-2.1.1e/lib/com/omnividea/media/protocol/file/DataSource.class", 0xfeffc384) = -1 ENOENT (No such file or directory)
gettimeofday({1100876842, 191005}, NULL) = 0but as I don't see this in trace from JAR version, and because in JMF log it says:
## Player created: com.sun.media.content.unknown.Handler@30c221
## using DataSource: com.omnividea.media.protocol.file.DataSource@a401c2I believe it has not selected correct codec for a reason I don't understand.
[I checked I only have one version of jmf.properties on system].
Any ideas why jarred version is different from non-jarred version?
version information:
# JMF Version 2.1.1e
## Platform: Linux, i386, 2.6.5-1.358
## Java VM: Sun Microsystems Inc., 1.5.0
and using fobs4jmf from http://fobs.sourceforge.netcorrection, for the last bit I should have said, for non-working jarred version in JMF log I see:
## Player created: com.sun.media.content.unknown.Handler@1cd2e5f
## using DataSource: com.sun.media.protocol.file.DataSource@911f71indicating wrong codec selected -
I'm going to install Arch this weekend but I have some questions
Currently I use Linux Mint on my primary PC, but I've installed Arch on my older PC at my parents house. I like it a lot and I think I want a distro that is rolling release and also that I build myself (as opposed to installing all of the bloat on Mint). However, I do have some questions; Linux is pretty new to me (been using it since about November) so I don't know exactly how everything works.
1) How do I know what packages I have to have installed for building C/C++ programs? I know in Ubuntu install gcc/g++ by itself doesn't get the job done, you need build-essential to get all of the libraries. Also, what packages do I need for OpenGL and SDL? I'm a CS major and I'm in an OpenGL class so I need to be able to compile OpenGL programs; SDL is for my own purposes, but I'd still like to have it.
2) I use Amarok to transfer songs to my iPod. Amarok 1.48 and libgpod 0.6.0 are in the repos and I know both of those are compatible with my 6th gen. However, I do have a question about transferring album art. On Mint, Amarok transfers the album art as I transfer the album, but someone told me that Amarok doesn't do that by default; there must have been a setting changed somewhere to do that. I looked through Amarok's options and didn't see anything like that... anyone know if I can do that in Arch, and how? There's no real information about Amarok in the wiki.
3) I'm going to use Gnome environment but some KDE apps (like Amarok). Will there be any problems with that that I should know about in advance?
I'll probably have some more questions once I actually install Arch, but that will do for now Those are the important ones.1) You know by seeing its dependencies on pacman or by the developer documentation. Unlike other distros, you don't need to install dev packages. Example: You have gcc and all the basic gnu tools installed, and you want to compile a program that is not in a arch linux package yet (if theres a package, you can build it using abs / makepkg and pacman will handle the dependencies) and requires, for example, a library called "xyz", you only need to download "xyz" from pacman, and all the dev stuff will come together (like header and etc).
I hope it helps. -
hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
thnx in advance..884540 wrote:
hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
thnx in advance..You can mention the classpath using the javac and java options:
javac -cp .;<path> <ClassName>.java
and
java -cp .;<path> <ClassName>
Or refer the below link to avoid mentioning classpath everytime you run/ compile the program
http://www.linuxquestions.org/questions/linux-software-2/j2sdk-install-174483/#post898715 -
How to Download sapgui for linux
Hi
How to Download sapgui for linux (Red hat 5.3)
and how to install sapgui on red hat linux
Thanks in Advance
Regards
AfsnHi,
As Bobby said, you need to install the SAPGUI for JAVA to access the SAP R/3 from your linux machine. The software is available in the following path,
https://service.sap.com/swdc
--> Installations and Upgrades
--> Entry by Application Group
--> SAP Frontend Components
--> SAP GUI FOR JAVA
--> SAP GUI FOR JAVA 7.20
--> Installation
The follwoing links gives an idea on how to install the SAP GUI for JAVA in Linux machines.
[Link1|http://www.linuxquestions.org/questions/linux-software-2/how-to-run-sap-sapgui-on-linux-system-478821/]
[Link2|http://sapbasis.wordpress.com/2007/08/22/installation-and-configuration-of-sapgui-for-java-on-linux/]
Regards,
Varadharajan M -
Is it possible to re-distribute JMF?
I got a little question about JMF.
Is JMF re-distributable?
Regards,
DanteDante,
I've been trying to figure that out. I wrote a little JMF app, and I wanted to compile it into executables. Even though I include all of the libs, it still doesn't seem to work right -
I m new to Linux, I want to configure that database should be automatically restarted as Linux Server starts.
I have created dbora (/etc/initd/dbaora) with root user, and it has following contents, but I get below issues.
ORA_HOME=/data1/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
'stop')
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
esac
chmod 750 /etc/init.d/dbora
chkconfig --level 345 dbora on
service dbora does not support chkconfig
-------------------------------------------------------Did you put the dbora script in the right directory?
There are several hits that are there for the same error,
http://www.google.co.in/search?rlz=1C1GGLS_enIN321IN321&sourceid=chrome&ie=UTF-8&q="service+dbora+does+not+support+chkconfig"
And I guess, these 3 come very close to it,
http://hotoreally.blogspot.com/2007/11/service-dbora-does-not-support.html
added /u02/scripts/startdb.sh in rc.local but not working
http://www.linuxquestions.org/questions/linux-software-2/how-to-register-auto-startstop-service-script-with-chkconfig-411442/
HTH
Aman.... -
Hi to all developers, (and please sorry for my English language...)
I have question, regarding JMF and supported hardware.
I have the idea of transmit audio/video data across cell phone (UMTS), creating a Java Client, but I don't understand if I can, if cell phones cameras are supported by JMF, can someone help me please, before I start a project?
Thanks a lot to all,
Tony.Thank you very much for replies, I very appreciate this.
So, if I want to transmit audio/video across an handle media, I could use MMAPI and write a "custom" class to (e.g.) convert a video format to another and more utilities or I must try other ways?
Sorry, I'm a newbye about handle devices... :-)
p.s.: about multithreading support, I think I'll try some "alternative" way to perform this, step by step... -
TrackControl, Change Track, and others questions about AvTransmit
Hi there,
I've got multiples questions about JMF and AvTransmit, hope you will help
For a small student project, i'm developing a streaming server using JMF, i have used the AvTransmit example.
Streaming, etc... everything work fine, i stream music over web
But i need help with "playlist" :
// Get the tracks from the processor
TrackControl[] tracks = processor.getTrackControls();
First Question :
The Processor use a MediaLocator to get one track, is there a way to indicate multiples tracks, such as a directory containing multiples audio file ?
At this time, i can only set 1 file in the MediaLocator.
I'm using a simple class as Playlist (a File[]), and, when i want to change song, i stop the thread, change the MediaLocator with another file, and restart the thread.
It works on a Lan, but on Internet, Player (I use VLC for my test) lost the connection, i need to restart VLC to get audio again.
Second Question
Is there a more "elegant" way to change tracks ?
Last Question
I have think about building my own object Playlist... gasp...
I've look at the javadoc... but i'm a bit lost... does my class have to implement TrackControl ? what are the object inside etc...
If someone knows information about this...
That's all ;)
Thanks !
Tommy, french student (sorry for the english)First Question :
The Processor use a MediaLocator to get one track, is there a way to indicate multiples tracks, such as a directory containing multiples audio file ?
At this time, i can only set 1 file in the MediaLocator.No. The processor uses a MediaLocator to get one file. Files (can) contain multiple tracks.
You can, in fact, combine the tracks of multiple files together, but, there's no need to do that with your application. AVTransmit2 sends each track as a separate RTP stream, so you'd just be sticking them together just to pull them apart again.
In general, you want to keep your architecture as one processor per file, one RTP stream per track.
Second Question
Is there a more "elegant" way to change tracks ?Yes. It's what I refer to as a jukebox DataSource. I discuss it / explain the concept on this previous thread.
[http://forums.sun.com/thread.jspa?forumID=28&threadID=5400318]
What you're essentially doing when you change the MediaLocator is starting over from scratch. You end up with a whole new DataSource, whole new Processor, whole new RTP session. On the LAN, this isn't an issue because it looks like you paused the RTP session (because the IP/PORTs don't change).
Over the internet, though, when you stop sending and restart, you're very likely going to get a new public NAT port. And so when your stream gets to the client, it's going to look like it's from a different person than the original.
The solution is to use the jukebox datasource to change the media without restarting the Processor or the RTP streams. That'll ensure that your stream won't move between files from the perspective of the client...
Last Question
I have think about building my own object Playlist... gasp...
I've look at the javadoc... but i'm a bit lost... does my class have to implement TrackControl ? what are the object inside etc...
If someone knows information about this...Ummmm, your "Playlist" object should just be a Jukebox datasource, so follow the link and figure out how that's supposed to work. If you have questions about it, just ask 'em here (rather than on the older thread)... -
How should use jmf to broadcast bigger media file?
Hello! I have a question about JMF RTP
I use the AVTransmit.java to play a video file.
but it show error
this is error message:
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.sun.media.codec.video.mpeg.Packetizer$MPEGSegment.copyData(Packetizer.java:623)
at com.sun.media.codec.video.mpeg.Packetizer$MPEGSegment.copyData(Packetizer.java:608)
at com.sun.media.codec.video.mpeg.Packetizer.doGOP(Packetizer.java:423)
at com.sun.media.codec.video.mpeg.Packetizer.doProcess(Packetizer.java:302)
at com.sun.media.codec.video.mpeg.Packetizer.process(Packetizer.java:218)
at com.sun.media.BasicFilterModule.process(BasicFilterModule.java:322)
at com.sun.media.BasicModule.connectorPushed(BasicModule.java:69)
at com.sun.media.BasicOutputConnector.writeReport(BasicOutputConnector.java:120)
at com.sun.media.SourceThread.process(BasicSourceModule.java:729)
at com.sun.mcan you help me?
thanks
KDJie Li,
For guidance on using D3L, I suggest you refer to Appendix B in Oracle® Application Server InterConnect Userâs Guide, 10 g (9.0.4), Part No. B10404-01.
You can download the Guide from here.
http://download.oracle.com/docs/cd/B10465_01/integrate.904/b10404.pdf
This should help to answer your questions.
Cheers, Yan -
Hi everyone,
I've two questions about JMF:
1)Why does the player.getDuration().getSecond() return thousands while actually the audio is of hundreds of seconds?
2)While calling the method setMaximum for JSlider, if the number for setMaximum is large the JSlider(for a player) do not move at all as I call setValue?Hi ,
Can I expecting your working code since I worked with below mentioned code but getting one exception.
FileDuration()
Player player = null;
String currentDirectory = "C:\\WINDOWS\\TEMP";
FileDialog fd = new FileDialog (new JFrame(), "´MediaPlayer", FileDialog.LOAD);
fd.setDirectory (currentDirectory);
fd.show(true);
if (fd.getFile () == null)
return;
currentDirectory = fd.getDirectory ();
if( player != null )
player.close ();
try
//player = Manager.createPlayer( new MediaLocator ( "file:" + fd.getDirectory () + fd.getFile () ) );
player = Manager.createRealizedPlayer( new MediaLocator ( "file:" + fd.getDirectory () + fd.getFile () ) );
player.start();
catch (NoPlayerException e)
e.printStackTrace();
catch (IOException e)
e.printStackTrace();
catch (CannotRealizeException e)
// TODO Auto-generated catch block
e.printStackTrace();
player.stop();
player.deallocate();
Controller temp = (Controller) ((BasicPlayer)player).getControllerList().elementAt(0);
DurationUpdateEvent dur = new DurationUpdateEvent(temp, null);
((BasicPlayer)player).controllerUpdate(dur);
System.out.println("=========> duration : "+ dur);
//System.out.println("=========> duration : "+ dur.getDuration().getSeconds());
Below EXCEPTION IS COMING
=========> duration : javax.media.DurationUpdateEvent[source=com.sun.media.PlaybackEngine@136a43c,duration=null
Getting below exception
Maybe you are looking for
-
Is there a way to achieve 'Panel Resize Event Filter' like function?
Gopalakrishnan P Hi all, Panel resize filter is not available in Event structure. So if I use the below code, on pressing the maximize button, windows will maximize the front panel and later LabVIEW brings it back to the mentioned size. There will b
-
Problems with refine edge in CS5-no longer working properly?!
Hi all, just wondered if anyone has experienced this bizarre problem and if so how they went about fixing it or changin the settings! (i may have done something to photoshop for it not to work properly!!!) Basically, i have got CS5 and was very excit
-
Can someone share (or) give me an url for learn ABAP-Workflow
Hi all, can someone share (or) give me an url for learn (or) online sessions for better understanding ABAP-Workflow? because i'm a new & fresh in this module. Thanks in advance Srinivas.....
-
I am running Lion 10.7.4. Tried to download the OS X Mountain Lion upgrade in my App Store - getting: The product distribution file could not be verified. It may be damaged or was not signed. Any ideas?
-
Iphoto on external drive--iphone download?
I moved my iphoto to an external hard drive. How do I direct my iphone to recognize the new iphoto drive when trying to download photos to my iphone.