SHIP:Port:Media

From Serious Documentation
Jump to: navigation, search

MEDIAx ports refer to output of audio and video on the module, and are referred to in the format "platform.MEDIA0", "platform.MEDIA1", etc.

MEDIAx ports have various attributes to determine/control their state:

Portvar Data Type Permissions Description
error Byte Read The error condition of the media clip.
height Dimension Read The height, in pixels, of the current media clip playing if it has video content (else it will be 0).
layer Byte Read/Write The current layer the video is being played in (default 1 is overlay, 0 is behind the GUI).
length Integer Read The total length of the mediaclip being played, in miliseconds.
location Node Read/Write The source DRIVE (e.g. platform.DRIVE.BULK0) of the source audio or video file.
play Boolean Read/Write Plays (if true) or pauses (if false) the media clip. This automatically turns false at the end of playing a clip.
position Integer Read/Write The current position being played in this media clip, in miliseconds.
source String Read/Write The filename of the source audio or video file.
state Byte Read The state of the media clip.
volume Byte Read/Write The volume of the current media clip playing from 0 to 100%.
width Dimension Read The width, in pixels, of the current media clip playing if it has video content (else it will be 0).

In general, media files are "containers" that contain audio and/or video. For example, an mp3 audio clip on your PC is actually an MPEG-ES container encapsulating audio content encoded with the mp3 codec. MPEG movies, often in .mp4 files, are actually containers encapsulating video and audio tracks encoded in various different ways.

The distinction between the container type and the encoding of the content is important, since for SHIPEngine on the platform to be able to play the media, both the container as well as the content must be recognizable and playable.

see GRM