This section contains the following topics:
The multimedia package contains the following components:
These plugins (typically identified with the _noph suffix) don't require Photon and are launched from the command line.
| This plugin: | Is launched by this command: |
|---|---|
| audiocd_noph.so | playAudioCd |
| mpegaudio_noph.so | plaympegaudio_noph |
| soundfile_noph.so | playsound_noph |
The Multimedia Components were developed to:
The basic design principles for the plugins are:
The Photon Media Player phplay is a thin GUI application that:
The Voyager plugins use the Netscape plugin interface as defined for Voyager Browser. The phplay plugins use the media API as defined in the <Mv.h> header file.
| This API is NOT Photon-dependent. |
The phplay plugins are DLLs with four entry points:
To allow the plugins to generate events in the media player, the media player sets a callback pointer.
The media components are located in the following directories:
Here's how the binaries relate to one another.
The Extproc group consists of the following libraries:
These components are symbolic links to extproc.so:
These components exist as the Xing DVD decoder baseline contains position dependent assembly language inserts. In order to load the DVD player, MPEG audio, MPEG video, and the MPEG system, you need to put them in separately linked executables. The media player loads extproc.so which executes a binary dynamically linked to libextproc.so. The main() for the binary is in libextproc.so.
| To eliminate the need for the Extproc group, future QNX components will use position-independent modules. The Soundfile plugin (soundfile.so) and the Audio CD player (audiocd.so) don't use the Extproc Group. |
The common media library DLL, libmedia.so, provides developers a common interface to the media player registry file and the plugin settings file.
The header files that describe the multimedia API are:
The four API calls that define the registry file interface are:
MvRegOpen(), MvRegGetEntry() and MvRegClose() are defined in <MvReg.h>, but are for internal use only by MvPluginName().
The multimedia configuration files include:
When a file is selected within phplay, phplay tries to identify the plugin to load based on the media type. The registry file is used if the file media type can't be identified.
The media player registry file is located at:
/etc/config/media/mpregistry
Here's an example of its contents:
<This first line may redirect paths to find plugins (optional)>
#<TAB>so<TAB>file://*.extension or
#TAB>so<TAB>MIME:(MIME_type) is the line format expected>
soundfile.so file://*.wav
soundfile.so file://*.au
soundfile.so file://*.aif
soundfile.so file://*.aiff
soundfile.so file://*.iff
soundfile.so MIME:audio/x-wav
soundfile.so MIME:audio/basic
soundfile.so MIME:audio/x-aiff
mpegsystem.so file://*.mpg
mpegsystem.so file://*.mpeg
mpegsystem.so MIME:video/mpeg
dvdplayer.so file://*.vob
mpegaudio.so file://*.mpa
mpegaudio.so file://*.mp1
mpegaudio.so file://*.mp2
mpegaudio.so file://*.mp3
mpegaudio.so MIME:audio/mpeg
mpegaudio.so MIME:audio/mp3
mpegaudio.so MIME:audio/mp2
mpegaudio.so MIME:audio/mp1
mpegaudio.so MIME:audio/mpa
mpegaudio.so MIME:audio/x-mpeg
mpegvideo.so file://*.mpv
mpegvideo.so file://*.m2v
mpegvideo.so MIME:video/m2v
mpegvideo.so MIME:video/mpv
audiocd.so file://*/dev/cd?
audiocd.so file://*.cda
audiocd.so .cda:*
playlist.so file://*.pl
dvdplayer.so dvd
soundfile.so=file=File
audiocd.so=cd=Audio CD
dvdplayer.so=dvd=DVD
The mpsettings file stores your customized phplay configuration preferences. For example, you may wish to use direct digital audio for everything. Although phplay has File->Preferences, Voyager doesn't. At startup, the mpsettings file is looked for by both phplay and the Voyager plugins to obtain your user preferences.
The plugin settings file is located at:
$HOME/.ph/mpsettings
Three calls define the interface to the plugin settings file:
The MvSetup_t structure is defined in <Mv.h>.
#phplay settings file WINDOW_SIZE=CUSTOM CUSTOM_WIDTH=362 CUSTOM_HEIGHT=552 POSITION_X=128 POSITION_Y=148 DIRECT_DIGITAL_AUDIO=OFF PLUGIN_CREATES_VIDEO=OFF DIRECT_OVERLAY=ON KEEP_VIDEO_ASPECT_RATIO=ON WINDOW_ALWAYS_ON_TOP=OFF VIDEO_MODE=VGA TV_SCALE1_1=ON TV_STANDARD=NTSC TV_OUTPUT=VIDEO CDDB=ON PCM_A_PLAYBACK_CARD=0 PCM_A_PLAYBACK_DEVICE=0 PCM_B_PLAYBACK_CARD=0 PCM_B_PLAYBACK_DEVICE=0 PCM_RECORD_CARD=0 PCM_RECORD_DEVICE=0 SPDIF_PLAYBACK_CARD=0 SPDIF_PLAYBACK_DEVICE=2 SPDIF_RECORD_CARD=-1 SPDIF_RECORD_DEVICE=-1 MOUNT_POINT=/fs/cd0 STREAM_TYPE=MV_STREAM