SHIP:Port:Media

From Serious Documentation
Revision as of 07:04, 14 November 2018 by TerryWest (talk | contribs)
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.DRIVE.MEDIA1", etc.

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

Portvar Data Type Permissions Description
location Node Read/Write The source DRIVE (e.g. platform.DRIVE.BULK0) of the source audio or video file.
source String Read/Write The filename of the source audio or video file.
state Byte Read The state of the media clip.
error Byte Read The error condition of the media clip.
position Integer Read/Write The current position being played in this media clip, in miliseconds.
length Integer Read The total length of the mediaclip being played, in miliseconds.
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.
layer Byte Read/Write The current layer the video is being played in (default 1 is overlay, 0 is behind the GUI).
volume Byte Read/Write The volume of the current media clip playing from 0 to 100%.

Media files can be raw media files or "containered" media. Raw media files, such as .mp3 files, contain only one thing -- in the case of .mp3, an mp3 audio clip. Containers, on the other hand, are wrappers that enclose audio and/or video tracks and more. The benefit of these containers is the structure and elements inside the container are well described in the container data; with raw clips the system has to guess (by filename extension often) as to the type of media encoded in the file.

All video files are wrapped in containers, commonly either .mp4 or .webm containers, since they contain audio and video information and the container guides the decoders on the location, size, and nature of the different pieces within the container.

see GRM