• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to embed a "multimedia player" into java GUI?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to embed a "multimedia player" into java GUI?

Environment: WIN XP, jdk1.5.0, Flash 8, ...
I need to embed a "multimedia player" into java GUI. It shall be able to:
1) Call other programs or java class to play multimedia contents (i.e, 1. play .avi video 2. play .swf Flash 3. play .wav audio 4 display .jpg & .gif image 5. run .exe file (by OpenGL) to display 3D graphics 6. run java class (by java 3D) file to display 3D graphics)
2) The contents must be displayed in a java GUI container (i.e, JPanel or any other container)
I searched the Internet and noticed I might use Runtime.getRuntime().exec(), http://java.sun.com/developer/JDCTechTips/2003/tt0304.html
This approach can surely satisfy requirement 1), but I am thinking that the requirement 2) is very hard to satisfy.
For instance, I can call Windows Media Player to play an .avi video, or call Flash Player to play an .swf file.
However, how can I embed the Windows Media Player or Flash Player into any java GUI container?
Windows will pop out an new window and I can not embed the new window into a Java GUI container!
Shall I use JMF (I know nothing about JMF)?

Any advice or suggestion will be highly appreciated.
Thanks in advance.
TW
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"always TW",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi there,
Try using JMF(Java Media framework...)
the JMF dosent come with java and has to be installed seperately!! and its available for free.. it allows you to play and process multimedia related data!!

Regards
simon
 
Tom Wang
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, Simon.
I will surely try it.

Best wishes,
Tom Wang
 
Tom Wang
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you.
I've tried JMF.
It works, however, it only supports very limited audio and video formats.
I tested the applet with some .wav audio files and some .avi video files. For the .wav audio files, it workds well. However, for some .avi video files, it can only play the video without sound. It's really weird.
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic