Jmf Player problem.

hey all small question
i am trying to take a snapshot out of my webcam.....
this is my program and for some reason when i am running it whith the debugger
its working properly and i am getting an image, otherwise ,when i am runing it i am getting a null BufferToImage
here is a part of my program
can someone please explain me the reason and what i need to do???
thanks
Natik
                                                                                player = Manager.createRealizedPlayer(ml);
                         if ( player != null )
                              player.start();
                              formatControl = (FormatControl)player.getControl ( "javax.media.control.FormatControl" );
                              //Format currFormat = formatControl.getFormat();
                              Image photo=grabFrameImage();\\using FrameGrabbingControl,BufferToImage
                              playerClose();
                         }

yes, please give us the stack trace.
Edited by: JacobsB on Mar 17, 2008 2:09 PM
anyway, where does 'player' ever get instantiated. it looks like 'player' would always be null.

Similar Messages

  • JMF player custom size

    I want to play some videos on various panels in my application. (one video for a single panel).
    Thing is I want each panel to have a fixed size so when I play the video its size will be as the panel size (Now the panel changes its size to the video size which is unwanted).
    How can I achieve this ?
    thx.

    I don't know if this helps, but I have usually found if in Linux I cannot realise a player, it is because system cannot find "jmf.properties" (or of course the codec is not registered in jmf.properties). For Linux some part of JMF seems to need to locate a file called ".jmfdir" in order to subsequently locate jmf.properties, if you application is invoked from same place that ".jmfdir" is located (for my installation it was my /home/<user> directory), this makes things work.
    Until I understood this, I was baffled why JMStudio could realise a player on linux, but my applications couldn't.
    A good tip for diagnosing jmf.properties problems is to invoke java with strace tool,
    strace java ....then look for stat64 calls in resulting output to see if system is really finding your jmf properties file.

  • How to load JMF player in web without applet

    Is it possible to load JMF player in html or php page without the help of applet or jsp or jsf?
    I heared that flash can be handy for this purpose as java can be loaded in flash movie, can anyone give me better idea about this?

    I don't know much about flash, but "loading java in flash movie" doesn't sound like something that makes sense. Flash does video, but you'll have to go to a Flash forum for more info on that :)
    Your options for Java solutions are an Applet or launching an application via Java Web Start (see posts about that and JMF, there's caveats).

  • Adobe Flash Player Problem: "Movie Not Loaded"

    new user to mac.
    i'm getting more and more frustrated with this computer.
    what's bugging me the most right now is
    i am unable to view videos on certain websites.
    rather than showing the content,
    a white box appears.
    when i right click on the white box,
    it says "movie not loaded" (in gray) and adobe flash player 9 (in black).
    i can't click on the gray line.
    when i click on the black line, it brings me to the adobe website and tells me adobe flash player 9 has been successfully installed.
    i am fairly sure this has nothing to do with heavy traffic.
    any insights on how to resolve this issue?
    cheers.

    Adobe Flash Player Problem
    http://www.adobeforums.com

  • Device screen not turning off + Media Player Problems

    My screen does not turn off, I checked the settings in screen/keyboard and they are set but don't seem to work. This is causing my battery to drain.
    Also, I am having intermittent media player problems.
    Suggestions?

    Hi and Welcome to the Community!
    I recommend that you attempt to boot into Safe Mode:
    KB17877 How to start a BlackBerry smartphone in Safe Mode
    It may take you multiple attempts to get the ESC key sequence (press/release/hold) correct, so be patient. When successfully into Safe Mode, think carefully...what happened just before this behavior started? A new app? An update? A Theme? Something else? Think carefully as the smallest change could be causal...and attempt to undo whatever that was.
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Leopard DVD player problems

    every time I launch the DVD player program it crashes instantly i've tried to restart cause I thought it might need a restart but it still does even after the restart.

    I too am having DVD Player problems, though certainly not that consistently. About 1 in 10 times I start up DVD Player it will immediately dim the screen and display in front the multilingual "you must restart your computer" message. Never happened with Tiger, but that was also a different computer. Doesn't matter whether I'm playing a VIDEO_TS folder or whether I'm playing a disc, doesn't matter whether there is even a disc in the player or not. For VIDEO_TS folder doesn't seem to matter if the folder is local or on a network. Also, I have had the same effect when viewing VIDEO_TS movies through Front Row; thus I think the problem may be pretty deep in the OS's video code, perhaps even in the driver. My system has Santa Rosa motherboard with x3100 built-in graphics.

  • Flash player problem after updating to belle on my...

    flash player problem after updating to belle on my nokia c7.when I try to play .flv videos screen goes blank as show in image,previously these videos runs fine on symbian anna plz help plz  help or tell me the way to downgrade to anna
    Attachments:
    scr000002.jpg ‏10 KB

    1) product code  059B7W0
    2) software version 111.030.0609
    3) it is actually stored .flv files on my phone  workes fine on symbian anna
    Attachments:
    Scr000003.jpg ‏17 KB
    Scr000004.jpg ‏15 KB

  • When did these flash player problems begin?

    So, I had a computer running Win98 and IE6, which worked
    great until Flash Player 8 autodownloaded about 4 months ago,
    causing the beginning of an extreme headache. Several
    communications with Adobe support (they eventually stopped
    responding) over several weeks went nowhere None of the fixes
    suggested by them, nor the ones here worked. Countless manhours led
    me to think it was time to bite the bullet, buy a new computer. So,
    as of two months ago I have a new computer running XP and IE6 with
    SP2. I didn't know it until today, when I started having crashes,
    but I have Flash Player 7.0.19.0. When i go to Adobe's Test page,
    both Shockwave and Player windows show the animations (and no
    crash).
    On certain pages, which I believe have flash content, I get
    the "IE has experienced a problem and must close" message. It
    specifically mentions the flash.ocx file as the offender. It is
    repeatable when visiting certain pages.
    So, before I jump into the abyss of attempting to fix this, I
    am wondering when these types of problems began. I have been using
    Windows and IE since 1998 with no trouble until this year. I hoped
    moving to a new computer would solve my Flash compatibility
    problems. Could the root problem be new types of spyware, etc that
    change something in the registry? Some of the fixes suggested by
    Adobe were regarding keys changed in the registry. Unfortunately
    those fixes didn't work (in Win98).
    Finally, does anyone know if attempting to fix flash player
    under XP is any easier than 98? Also, I will admit I may have
    visited some sites recently that downloaded some adware, etc. Any
    suggestions on cleaning that may solve the flash player problem? I
    know this post is all over the map - I don't know where to begin...
    Thanks in advance, Don

    Hi
    Which browser is giving you the error? Is it IE11?
    Are you saying when you go to Adobe's website and download flash player it gives you an error?
    Hope this helps. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Filelocking and JMF player

    Hello,
    I am making a JMF player. However it is my requirement that while the video is being played, the video file may not be copied (through windows explorer) to some other location. I understand there are filelocking capabilities in Java.However those require that the file be opened using a FileInputStream and then access is only permitted through that stream.However JMF player do not take the stream as input.So how do I go about doing this.Please Help
    Thanks,
    Mohit

    Welcome to the Sun forums.
    wizzo wrote:
    ..I am making a JMF player. However it is my requirement that while the video is being played, the video file may not be copied (through windows explorer) to some other location. .. That is a very odd requirement for a player. It seems you want to throw in abilities normally found in a file manager app. (or something of that nature).
    ..I understand there are filelocking capabilities in Java.However those require that the file be opened using a FileInputStream and then access is only permitted through that stream.Are you sure about that? I am not that experienced with FIS and file locking abilities, but it surprises me that a FIS would do that. And as an aside, ultimately the player would probably turn a File into a FIS, if that is the case, and FIS locks the File, the job is done automatically.
    BTW - please put a couple of spaces between each and every sentence. Putting the spaces helps the reader to quickly scan the text, looking for questions(1) and ways to help. You would not want to make it harder to help, would you?
    ..However JMF player do not take the stream as input.Off the top of my head. How about this? Use the FIS to create a copy of the file in the java.io.tempdir, then run the player using the temporary file.
    ..So how do I go about doing this.1) Is that a question? If so, please don't forget to add a question mark, for the same reasons as putting spaces between sentences.
    ..Please HelpThere is not need to ask people to help. If they want to help and are capable of doing so, they will help. If not, then no amount of pleading will change that. Also, it makes you appear 'needy', which is something that discourages people from even trying to help in the first place.

  • JMF player and a selected file/mpg

    Does anyone know how to change this piece of code so a JMF player can run when a file/mpg is selected.
    final File directory = new File(".");
        File[] files = directory.listFiles();
        for(int x = 0; x < files.length; x++)
          if(files[x].isFile()) dim.addElement(files[x].getName());
         btn2.addActionListener(new ActionListener()
               public void actionPerformed(ActionEvent ae)
                 int selectedIndex = list.getSelectedIndex();
                 if(selectedIndex < 0)
                   JOptionPane.showMessageDialog(null,"Please select file");
                 else
                   File fileToDelete = new File((String)list.getSelectedValue());
                   if(fileToDelete.delete()) dim.removeElementAt(selectedIndex);
                   }}});

    I don't understand?
    On the program that I use it's works.
    When I put a button, the video close, and the I open an another by launching this method:
    public void openFile(String filename)
         String mediaFile = filename;
         // URL for our media file
         URL url = null;
    if(player!=null)
    player.stop();
    player.deallocate();
    desktop.removeAll();
    repaint();
    try
         // Create an url from the file name and the url to the
         // document containing this applet.
         if ((url = new URL(mediaFile)) == null)
              Fatal("Can't build URL for " + mediaFile);
              return;
         // Create an instance of a player for this media
         try
              player = Manager.createRealizedPlayer(url);
    catch (NoPlayerException e)
              Fatal("Error: " + e);
    catch (CannotRealizeException e)
    catch (MalformedURLException e)
         Fatal("Error:" + e);
    catch (IOException e)
         Fatal("Error:" + e);
         if (player != null)
         this.filename = filename;
         jmframe = new JMFrame2(player, filename);
    //jmframe.setSize(200,100);
         desktop.add(jmframe);
    I hope that It could Help you.
    You can find an exemple quite similar on this site , the name of the file is: MDIApp.java
    ;)

  • Problem running a simple jmf player in jbuilder9

    Hi everybody... I have a very strange problem, so pleeeease help :)
    JBuilder9 compiles the code but when I run it, the following message appears:
    "Unable to handle format: MJPG, 320x240, FrameRate=15.0, Length=33792 0 extra bytes"
    Frame of application appears with all the players visual components, but when player.start() method is called, application freezes... :(
    The same code when compiled and runned from command prompt (javac PlayerFrame.java, then java PlayerFrame) works perfectly....

    ropeNS
    I am having a similar problem. I am trying to playback MJPEG encoded .avi files and I am getting a the exact same error message.
    If you figure the problem please let me know.
    I will do the same.
    Thanks,
    beTheJava

  • Re: JMF Player, How to play a video

    Please I need an answer.
    I think, my problem is that I don´t found a correct MPEG-2 I-Frames or a correct Video Drip
    Can someone tell where I can found a correct MPEG-2 video to play in JMF in a Set-Top Box?
    Thank you

    Adobe has not made a version of Flash for the iPad.
    Kappy explains why. https://discussions.apple.com/message/19446567#19446567
    5 Flash Player Alternatives http://www.techshout.com/features/2011/01/flash-player-for-ipad-apps/
    Top 4 browsers supports flash player on iPad and iPhone
    http://mashtips.com/flash-player-ios/
     Cheers, Tom

  • Software error (outside VM) when calling JMF Player::close()

    First off, I apologize for cross posting this here and in the "General Java Programming" forum. I did not know there was a forum specific for JMF, until someone mentioned it to me.
    I have written the following test program:
    import java.io.File;
    import java.io.IOException;
    import javax.media.Time;
    import javax.media.Player;
    import javax.media.Manager;
    import javax.media.NoPlayerException;
    class MyMP3Player {
    public static void main(String [] args) {
    try {
    File mp3File = new File("test.mp3");
    Player aPlayer = Manager.createPlayer(mp3File.toURL());
    aPlayer.start(); // Starts asynchronous playback
    Thread.sleep(10*1000); // Allow playback to continue for 10
    aPlayer.stop(); // stops playback (well, it really PAUSES!!!)
    aPlayer.deallocate();
    aPlayer.close();
    catch (IOException e) {e.printStackTrace();}
    catch (NoPlayerException npe) {npe.printStackTrace();}
    catch (InterruptedException ie) {ie.printStackTrace();}
    The program runs fine for the first 2 times: I can hear the first 10 seconds of the test.mp3 file. Then, on the third run (and every other run after that), after it has played the file for the 10 seconds, the program gives me the error pasted below and exits. Does anyone know how to fix this? Am I doing something wrong in the program? Oh, and yes, I have tested it with other mp3 files and it still does the same thing.
    BTW, I am running WinXP, and JMF 2.1.1e . Also, I have noticed that JMStudio does not have this problem, does JMStudio not call Player::close() ever?
    ===== ERROR BEGINS HERE =====
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x73F91D04
    Function=[Unknown.]
    Library=(N/A)
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
    at com.sun.media.amovie.ActiveMovie.dispose0(Native Method)
    at com.sun.media.amovie.ActiveMovie.dispose(ActiveMovie.java:329)
    at com.sun.media.amovie.AMController.doClose(AMController.java:632)
    - locked <029F77C8> (a java.lang.Integer)
    at com.sun.media.BasicController.close(BasicController.java:261)
    at com.sun.media.BasicPlayer.doClose(BasicPlayer.java:229)
    at com.sun.media.content.video.mpeg.Handler.doClose(Handler.java:158)
    at com.sun.media.BasicController.close(BasicController.java:261)
    at MyMP3Player.main(MyMP3Player.java:30)
    Dynamic libraries:
    0x00400000 - 0x00406000 C:\WINDOWS\system32\java.exe
    0x77F50000 - 0x77FF9000 C:\WINDOWS\System32\ntdll.dll
    0x77E60000 - 0x77F45000 C:\WINDOWS\system32\kernel32.dll
    0x77DD0000 - 0x77E5B000 C:\WINDOWS\system32\ADVAPI32.dll
    0x77CC0000 - 0x77D35000 C:\WINDOWS\system32\RPCRT4.dll
    0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll
    0x6D340000 - 0x6D46A000 C:\Program Files\Java\j2re1.4.1_02\bin\client\jv
    m.dll
    0x77D40000 - 0x77DCD000 C:\WINDOWS\system32\USER32.dll
    0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll
    0x76B40000 - 0x76B6C000 C:\WINDOWS\system32\WINMM.dll
    0x6D1E0000 - 0x6D1E7000 C:\Program Files\Java\j2re1.4.1_02\bin\hpi.dll
    0x6D310000 - 0x6D31E000 C:\Program Files\Java\j2re1.4.1_02\bin\verify.dl
    l
    0x6D220000 - 0x6D239000 C:\Program Files\Java\j2re1.4.1_02\bin\java.dll
    0x6D330000 - 0x6D33D000 C:\Program Files\Java\j2re1.4.1_02\bin\zip.dll
    0x10000000 - 0x10015000 C:\WINDOWS\system32\jmutil.dll
    0x0AFA0000 - 0x0AFAD000 C:\WINDOWS\system32\jmam.dll
    0x771B0000 - 0x772CA000 C:\WINDOWS\system32\ole32.dll
    0x5AD70000 - 0x5ADA4000 C:\WINDOWS\system32\uxtheme.dll
    0x76FD0000 - 0x77048000 C:\WINDOWS\system32\CLBCATQ.DLL
    0x77120000 - 0x771AB000 C:\WINDOWS\system32\OLEAUT32.dll
    0x77050000 - 0x77115000 C:\WINDOWS\system32\COMRes.dll
    0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll
    0x72D20000 - 0x72D29000 C:\WINDOWS\system32\wdmaud.drv
    0x72D10000 - 0x72D18000 C:\WINDOWS\system32\msacm32.drv
    0x77BE0000 - 0x77BF4000 C:\WINDOWS\system32\MSACM32.dll
    0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\midimap.dll
    0x73F10000 - 0x73F65000 C:\WINDOWS\system32\DSOUND.DLL
    0x73EE0000 - 0x73EE4000 C:\WINDOWS\system32\KsUser.dll
    0x6D000000 - 0x6D105000 C:\Program Files\Java\j2re1.4.1_02\bin\awt.dll
    0x73000000 - 0x73023000 C:\WINDOWS\system32\WINSPOOL.DRV
    0x76390000 - 0x763AA000 C:\WINDOWS\system32\IMM32.dll
    0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll
    0x6D510000 - 0x6D58C000 C:\WINDOWS\system32\DBGHELP.dll
    0x76BF0000 - 0x76BFB000 C:\WINDOWS\system32\PSAPI.DLL
    Local Time = Wed May 28 09:46:23 2003
    Elapsed Time = 19
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.1_02-b06 mixed mode)
    # An error report file has been saved as hs_err_pid180.log.
    # Please refer to the file for further information.

    Actually, I just ran another test. My previous fix does work 100%, but it is not necessary to call the Player::close() from within the AWT/SWING event dispatching thread, but it IS a requirement for you to have an AWT/SWING event dispatching thread running somewhere in the background, otherwise the darn thing crashes...
    So, if you create some kind of GUI along with your app (thereby creating an AWT/SWING event dispatching thread), or just schedule some event using the SWING Timer class, the Player::close() can be called from any thread...
    Hobbieman

  • Jmf instalation problem on Linux

    On my slackware 9.0 with java sdk1.4.2_04 I've tried to install jmf 2.1.1e. I've downloaded and executed the bin file. I've added the CLASSPATH=.:/usr/lib/java/JMF-2.1.1e/lib/jmf.jar and the LD_LIBRARY_PATH=/usr/lib/java/JMF-2.1.1e/lib but I can't run applets using appletviewer unless I use appletviewer -J-cp -J$CLASSPATH html_file. The problem is that I still get some errors java.io.IOException: File Not Found
    java.io.IOException: File Not Found
    Got exception javax.media.NoPlayerException: Error instantiating class: com.sun.media.protocol.file.DataSource : java.io.IOException: File Not Found
    java.lang.NullPointerException
            at PlayerApplet.start(PlayerApplet.java:21)
            at sun.applet.AppletPanel.run(AppletPanel.java:377)
            at java.lang.Thread.run(Thread.java:534)This is the applet source code:
    import java.applet.*;
    import java.awt.*;
    import java.net.*;
    import javax.media.*;
    public class PlayerApplet extends Applet implements ControllerListener {
       Player player = null;
       public void init() {
          setLayout(new BorderLayout());
          String mediaFile = getParameter("FILE");
          try {
             URL mediaURL = new URL(getDocumentBase(), mediaFile);
             player = Manager.createPlayer(mediaURL);
             player.addControllerListener(this);
          catch (Exception e) {
             System.err.println("Got exception "+e);
       public void start() {
          player.start();
       public void stop() {
          player.stop();
          player.deallocate();
       public void destroy() {
          player.close();
       public synchronized void controllerUpdate(ControllerEvent event) {
          if (event instanceof RealizeCompleteEvent) {
             Component comp;
             if ((comp = player.getVisualComponent()) != null)
                add ("Center", comp);
             if ((comp = player.getControlPanelComponent()) != null)
                add ("South", comp);        
             validate();
    }Is there is a way to config the environment to use appletviewer without extra options?
    Second problem is with http://java.sun.com/products/java-media/jmf/2.1.1/jmfdiagnostics.html
    I get
    Java 1.1 compilant browser...Maybe
    JMF classes..Not FoundI downloaded the jmfdiagnostics I run it using extra options from command line and the applet could't find the native libraries which are in the LD_LIBRARY_PATH
    What should I do to get it fixed?
    Thanks in advance
    Morfi

    <p><b>This</b> will give you some help with installing Linux. Although <b>this</b> is for 11g, it can be helpful when installing 10g.</p>
    Tom

  • JMF Installation Problems

    Hi Everyone
    Im having a problem with the install of the windows version of JMF2.1.1e. With the option to auto configure the classpath enabled the folder extracts properly into the C:\Program Files\JMF2.1.1e\ folder. However when I use my netbeans IDE I am unable to bring up the methods after importing javax.media.*; For example I have
    createPlayer() methods but do not have createRealizedPlayer() or some other variables. I then deleted the JMF 2.1.1e and tried the IDE again and I was still able to get the create player methods which suggests these come with other packages or the netbeans IDE itself and that the new JMF is not being implemented at all. Has any one had a similar problem or any ideas that could shed some light on this?
    Thanks in Advance.

    To remove the packages on fedora core and similar systems I found it easier to remove packages using yum
    as it removes the packages in cascade
    I used
    yum remove libgcj.i386 libgcj-devel.i386
    and then installed jmf
    Andy Bailey
    www.hazlorealidad.com

Maybe you are looking for

  • Dual Boot Network Issue

    Hi there, I just built a new computer and I've been having the following problem. It's the first time that I actually dual boot systems on a desktop and I keep encountering the following problem. When I boot into windows(XP,7 or 8 tried them all) the

  • Multithrea​ding and RS232 data too slow processed

    Hello, Hope someone could help with this issue.  I have simple application which process ASCII data coma separated from serial port at speed of 115.2kbps. There is 6 columns  of unsigned short data .  I set-up COM call back function to receive data a

  • Java script browser resize issue

    i'm building a website in dreamweaver for a friend and he wanted the browser to resize to a specific size once the user goes to the site. the script i have now works fine, but then when i go to another page, the browser bounces out and then resizes.

  • BSEG _ BSAD problems

    Hi, 1) BSEG -- NEBTR is in document currency. How can we convert it to local currency? Is this value already calculated by SAP or do we have to do manual calculation for this? Scenario: I have to pull the data in a customer statement form for all the

  • Copying/pasting multiple Notes at once

    Can't find an answer to this... I have tons of notes made in Apple's Note application on my MacBook Pro. I run Yosemite. Is there a simple way of moving them to another document like say Word or Excel? Copy/paste not working. I must be overseeing som