How to create an automatic JavaFX Media Player - javafx

I have developed my own media player in JavaFX. I have converted it to .exe format using Launch4J. But I want to program it in such a way that on selecting an .mp3 file, the OS should automatically play the file in my java media player program converted to exe format.

Related

ASF file can't be rendered by GraphEdit but can be played by WMP

My program uses Windows Media Foundation WMV/WMA MFTs to encode to ASF format (mux is done by ffmpeg). Generated file can be played perfectly by Windows Media Player on Win10 but failed to be rendered by GraphEdit, error code == NS_E_INVALID_DATA (0xC00D002FL).
Same error happens when IWMSyncReader->GetNextSample is used to read audio sample.
A sample broken video is here: https://www.dropbox.com/s/x8uyaqbclq93u5d/big_buck_bunny.wmv?dl=0
Could anyone take a look to check the cause?
Thanks
After examining your wmv file with Windows Media ASF Viewer, I came to the conclusion that it was encoded by Lavf encoder (FFMPEG). Therefore, I installed LAV directshow filters and played the wmv with Graphstudionext. I added the file as a File source async and after that the graph automatically used the LAV splitter. It seems that only LAV splitter is able to parse this wmv. In your app you can do the same by adding the file via the File source async filter and let LAV parse it (if installed).

how can we do file operations in adobe flash builder using mxml script?

I am using adobe flash builder 4.6. using fileReference.save(), we can create files. But it prompts a dialogue box for the location. Can we define it in the code and avoid prompt box. Is there any other method for doing file operations?
That's not possible from Flex/Flash Player. If you want to operate on the file system, you have to switch to AIR.

Add mp3 codec to qt-project

I am really new to Qt development as well as audio codecs. I recently found a way to play mp3 sound using QSound. I want to play it in my qt project using QAudioOutput, but there is no mp3 codec in QAudioDeviceInfo::supportedCodecs().
I tried install mp3 codec but it is still not listed in QAudioDeviceInfo::supportedCodecs(). How can I add a codec to QAudioDeviceInfo::supportedCodecs()?
By definition QAudioDeviceInfo provides an interface to query audio devices and their functionality. Which means any codec returned by QAudioDeviceInfo::supportedCodecs() is a codec format the device is able to play directly, and will be probably be raw audio format like pcm. On the other hand mp3 need to go through a software decoder first, so It will not be in this list.
Take a look at the Media Player example for a reference. It should be able to play mp3 and other formats. The project should be available in the Qt source or installation directory in your machine, either under the folder demo or examples.
It seems from the source that it does lot more than just barely playing audio. So focus on the constructor of the class Player as well as the method Player::addToPlaylist()
ps :I speak in conditional tense because I am more familiar with Qt 4 than Qt 5.
EDIT:
As long as windows media player cannot play mp3, you will not have full mp3 support in your Qt app, and the Player example I gave you will not work either. Download some codecs in your system till Windows media player can play mp3.

How to save a file with .pdf format in a flex4 mobile application:

I want to save a file in .pdf format in a flex4 mobile application, But the problem is that
its saving the file in .pdf format when am running the app using emulator from my flash builder 4.5
but it doesn't saving the file in a mobile device, means when am running the app's build in a android
device its not saving the file .
To save the file am using filereference class’s save() method . Is their any other way to save any file in a mobile device in PDF format ?
Using Mobile AIR; you should be able to use the File class to save a file. I think you'll need to use a FileStream to write the PDF binary into the instance of the File class.

Encrypting and decrypting android expansion file

I have successfully uploaded and published my android app + apk expansion file (with format .obb but is actually a .zip) on Google Play. I would like to set up some protection to it. Are there any ways to do it to acheieve this without using external jar classes like zip4j?
In my obb file I have a few videos (of .mp4) that I need to use my mediaplayer to read it. I want to do this so that only my media player can read the obb file.
Thanks.

Resources