![]() |
![]() |
![]() |
![]() |
The MME supports playing streamed media, as well as media on mediastores on external changers. This chapter describes:
The MME supports getting and setting device option configurations, even if the MME does not know about the options:
The API or getting and setting device option configurations uses the following functions, data structures, enumerated types and events:
The mme_device_get_config() and mme_device_set_config() functions get and set configuration option values for devices accessed through MediaFS. The MME does not need to know about the options or their settings.
At present, you can use mme_device_get_config() to get configuration values for iPod devices and Bluetooth devices that use a Temic stack, and mme_device_set_config() to set options on iPod devices, with these constraints:
At present, the MME supports getting and setting interface options for two types of interfaces:
The <interface> configuration element for USB devices uses the following attribute template:
<interface type="usb" path="USB_bus_number" devno="USB_device_number" vendorid="USB_vendor_id_number" productid="USB_product_id_number"/>
The <interface> configuration element for devices accessed through a device driver uses the following attribute template:
<interface type="device" path="/fsys/path/to/device/resmgr"/>
To get the configured settings for an iPod:
For example, for an iPod with the mediastore ID 2:
char buf[1000]; mme_device_get_config(hdl, 2, "/", 0, sizeof(buf), buf);
The function will fill the buffer with the device information, which will be presented in a format like the following for an iPod using USB transport:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <device api_version="1"> <interface type="usb" path="0" devno="1" vendorid="0x5ac" productid="0x5ac"/> <media> <iPod> <version> <model_id value="00150000" valuetype="hex"/> <model_number value="MA627C" valuetype="text"/> <firmware value="020201" valuetype="hex"/> </version> <capabilities> <video/> <digitalaudio/> <cta/> </capabilities> <transport value="usb_ipod" valuetype="text"/> <audiobook_speed value="normal" valuetype="enum" modifiable="yes" alternatives="slower,normal,faster"/> <preferences> <video value="ask" valuetype="enum" modifiable="no" alternatives="off,on,ask"/> <screen value="fit" valuetype="enum" modifiable="yes" alternatives="fill,fit"/> <format value="ntsc" valuetype="enum" modifiable="no" alternatives="ntsc,pal"/> <lineout value="on" valuetype="enum" modifiable="no" alternatives="off,on"/> <connection value="composite" valuetype="enum" modifiable="no" alternatives="none,composite,svideo,component"/> <caption value="off" valuetype="enum" modifiable="no" alternatives="off,on"/> <ratio value="full" valuetype="enum" modifiable="no" alternatives="full,wide"/> <subtitle value="off" valuetype="enum" modifiable="no" alternatives="off,on"/> <audioalt value="off" valuetype="enum" modifiable="no" alternatives="off,on"/> </preferences> <displayimage> <upload value="on" valuetype="enum" modifiable="no" alternatives="on"/> </displayimage> </iPod> </media> </device>
Or the following for an iPod using serial transport:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <device api_version="1">> <interface type="device" path="/net/groytest2.ott.qnx.com/dev/ser1"/> <media> <iPod> <version> <model_id value="00150000" valuetype="hex"/> <model_number value="MA627C" valuetype="text"/> <firmware value="020201" valuetype="hex"/> </version> <capabilities> <video/> <digitalaudio/> </capabilities> <transport value="ser_ipod" valuetype="text"/> <preferences/> </iPod> </media> </device>
The mme_device_get_config() can be used to retrieve device configuration settings from Bluetooth (A2DP) devices.
To retrieve this information from a Bluetooth device, simply call mme_device_get_config() as you would for an iPod device, but with the mediastore ID set for the Bluetooth device. The information in buffer filled in by the call will look something like the following:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <device api_version="1"> <interface type="device" path="/dev/wms/player1"/> <media> <AVRCP> <version> <major value="1" valuetype="num"/> <minor value="3" valuetype="num"/> </version> </AVRCP> </media> </device>
The mme_device_set_config() allows you to change the iPod preferences that were configured when the iPod driver was started. It sets configuration values by setting the attributes for sub-elements inside the <preferences> attribute.
Each element inside the <preferences> has the following attributes:
![]() |
At present, the only element with modifiable attributes is <screen>. |
To modify an iPod's screen zoom mode:
For example:
mme_device_set_config(hdl, 2, "/device/media/iPod/capabilities/screen@value", "fill", 0);
![]() |
On an iPod:
|
To determine how an iPod is connected, simply call mme_device_get_config(), and in the returned buffer with the device information, check the following elements and attributes:
The MME includes several features that facilitate working with external CD changers:
![]() |
A random or repeat mode setting works only if the external device supports the setting. If the external device does not support the requested setting, the MME logs a warning and continues playback. |
For more information about building systems that use external CD changers, contact your QNX representative.
The MME supports playback of internet streamed media, including:
The MME can output RTP streamed media from a camera. Support is presently limited to ouput of the media stream; features such as pan and tilt control are not supported.
To access the RTP stream, pass the RTSP (Real Time Stream Protocol) access URL of the camera to io-media.
For example, an Axis 207 network camera on a network could be accessed with the following URL: rtsp://10.42.108.95:554/mpeg4/1/media.amp, where:
![]() |
To maintain optimal sycnhronization performance, add a keepdll configuration element to your io-media configuration file as follows:
keepdll { name = rtp_reader optional = yes } Or, use the io-media configuration element, keepdlls, which allows you to specify DLLs to keep by an interface name, rather than by the DLL name. |
To configure the MME to support streamed media, you must:
To add a rule to the MCD to detect internet connections, simply add a rule to the MME's MCD configuration file to have the MCD look for internet connections. For example:
[/dev/socket] Callout = PATH_MEDIA_PROCMGR Argument = /proc/mount Priority = 11,10 Start Rule = INSERTED Stop Rule = EJECTED
For more information about MCD rules, see “Configuring the mcd utility” in the MME Configuration Guide chapter Configuring Device Support.
After you have configured the MCD to look for internet connections you must configure the slots table to support internet connections. For example:
INSERT INTO slots(path,zoneid, name, slottype) VALUES('/dev/socket', 1, 'INTERNET', 10);
For more information about configuring the slots table, see “Configuring the slots table for supported devices” in the MME Configuration Guide chapter Configuring Device Support.
If you have configured the MME to support internet connections, its mediastores table should have an entry for an “internet” mediastore. You can check this by querying the database from the commandline. For example:
qdbc -d mme "select msid,slotid,name,mountpath from mediastores"
One of the returned lines should return values something like:
|2|13|Internet|/dev/socket|
Media streams cannot be synchronized, so to play it you should played in a file-based track session:
or:
![]() |
The SELECT statement used to create the track session query for media where ftype=5 (media that can be played as one file). |
For example, with the mmecli commandline utility, you might play streamed media as follows:
# mmecli newtrksession f "select fid from library where ftype=5 and msid=2" # mmecli settrksession 1 # mmecli trksessionview_append_file 1 2 http://www.playsong.com/song # mmecli play
The MME now supports playback of audio inputs on a system by treating audio inputs as type of mediastore.
This feature uses a new mediastore type and a new slot type:
![]() |
Audio input playback requires audio_streamer.so, a streamer for reading audio from a sound card. |
To have the MME recognize audio input “mediastores”, you must:
To use audio input “mediastores”, you must add an entry to the slots table that sets:
For example:
INSERT INTO slots(path, zoneid, name, slottype) VALUES('/dev/snd', 1, 'snd', 11);
You must also configure the MCD to tell the MME about the appearance of audio input “mediastores” by adding a section like the following to the MCD configuration:
[/dev/snd] Callout = PATH_MEDIA_SCAN Argument = 5000 Priority = 11,10 Start Rule = INSERTED Stop Rule = EJECTED
Since /dev/snd is normally permanent, the argument and priority values may be changed. The section name must be the path to the audio input devices.
![]() |
An audio input “mediastore” is not synchronizable; an explicit attempt to synchronize it will result in a MME_EVENT_SYNCABORTED error. |
Media from an audio input “mediastore” is played in a file-based track session. Once playback has begun, however, it will continue until explicitly stopped because it will never reach an end of file.
To play media from an audio input “mediastore” you must know the exact path to the mixer output you want to play. Generally tis path is something like pcmC0D0c#Mic In.
![]() |
You may learn what is available by:
|
Once you know the path of your audio input, simply create a file-based track session and play the media
![]() |
![]() |
![]() |
![]() |