constants
[utils]

Constants used within GPAC. More...


Defines

#define GPAC_OTI_MEDIA_GENERIC   0x80
 Extra ObjectTypeIndication.
#define GPAC_OTI_MEDIA_FFMPEG   0x81
 FFMPEG ObjectTypeIndication.
#define GPAC_OTI_MEDIA_OGG   0xDD
 OGG ObjectTypeIndication.

Enumerations

enum  {
  GF_STREAM_OD = 0x01, GF_STREAM_OCR = 0x02, GF_STREAM_SCENE = 0x03, GF_STREAM_VISUAL = 0x04,
  GF_STREAM_AUDIO = 0x05, GF_STREAM_MPEG7 = 0x06, GF_STREAM_IPMP = 0x07, GF_STREAM_OCI = 0x08,
  GF_STREAM_MPEGJ = 0x09, GF_STREAM_INTERACT = 0x0A, GF_STREAM_IPMP_TOOL = 0x0B, GF_STREAM_FONT = 0x0C,
  GF_STREAM_TEXT = 0x0D, GF_STREAM_ND_SUBPIC = 0x38, GF_STREAM_PRIVATE_SCENE = 0x20
}
 Supported media stream types. More...
enum  {
  GF_MEDIA_OBJECT_UNDEF = 0, GF_MEDIA_OBJECT_SCENE, GF_MEDIA_OBJECT_UPDATES, GF_MEDIA_OBJECT_VIDEO,
  GF_MEDIA_OBJECT_AUDIO, GF_MEDIA_OBJECT_TEXT, GF_MEDIA_OBJECT_INTERACT
}
enum  GF_PixelFormat {
  GF_PIXEL_GREYSCALE = GF_4CC('G','R','E','Y'), GF_PIXEL_ALPHAGREY = GF_4CC('G','R','A','L'), GF_PIXEL_RGB_444 = GF_4CC('R','4','4','4'), GF_PIXEL_RGB_555 = GF_4CC('R','5','5','5'),
  GF_PIXEL_RGB_565 = GF_4CC('R','5','6','5'), GF_PIXEL_RGB_24 = GF_4CC('R','G','B','3'), GF_PIXEL_BGR_24 = GF_4CC('B','G','R','3'), GF_PIXEL_RGB_32 = GF_4CC('R','G','B','4'),
  GF_PIXEL_BGR_32 = GF_4CC('B','G','R','4'), GF_PIXEL_ARGB = GF_4CC('A','R','G','B'), GF_PIXEL_RGBA = GF_4CC('R','G','B', 'A'), GF_PIXEL_YUY2 = GF_4CC('Y','U','Y','2'),
  GF_PIXEL_YVYU = GF_4CC('Y','V','Y','U'), GF_PIXEL_UYVY = GF_4CC('U','Y','V','Y'), GF_PIXEL_VYUY = GF_4CC('V','Y','U','Y'), GF_PIXEL_Y422 = GF_4CC('Y','4','2','2'),
  GF_PIXEL_UYNV = GF_4CC('U','Y','N','V'), GF_PIXEL_YUNV = GF_4CC('Y','U','N','V'), GF_PIXEL_V422 = GF_4CC('V','4','2','2'), GF_PIXEL_YV12 = GF_4CC('Y','V','1','2'),
  GF_PIXEL_IYUV = GF_4CC('I','Y','U','V'), GF_PIXEL_I420 = GF_4CC('I','4','2','0'), GF_PIXEL_RGBDS = GF_4CC('3', 'C', 'D', 'S'), GF_PIXEL_RGBD = GF_4CC('R', 'G', 'B', 'D'),
  GF_PIXEL_YUVA = GF_4CC('Y', 'U', 'V', 'A')
}
 Pixel Formats. More...
enum  {
  GPAC_OTI_SCENE_BIFS = 0x01, GPAC_OTI_SCENE_BIFS_V2 = 0x02, GPAC_OTI_SCENE_INTERACT = 0x03, GPAC_OTI_SCENE_LASER = 0x09,
  GPAC_OTI_PRIVATE_SCENE_GENERIC = 0xC0, GPAC_OTI_PRIVATE_SCENE_SVG = 0xC1, GPAC_OTI_PRIVATE_SCENE_LASER = 0xC2, GPAC_OTI_PRIVATE_SCENE_XBL = 0xC3,
  GPAC_OTI_PRIVATE_SCENE_EPG = 0xC4, GPAC_OTI_SCENE_SVG = 0xD0, GPAC_OTI_SCENE_SVG_GZ = 0xD1, GPAC_OTI_SCENE_DIMS = 0xD2
}
 Scene ObjectTypeIndication Formats. More...
enum  {
  GF_AUDIO_CH_FRONT_LEFT = (1), GF_AUDIO_CH_FRONT_RIGHT = (1<<1), GF_AUDIO_CH_FRONT_CENTER = (1<<2), GF_AUDIO_CH_LFE = (1<<3),
  GF_AUDIO_CH_BACK_LEFT = (1<<4), GF_AUDIO_CH_BACK_RIGHT = (1<<5), GF_AUDIO_CH_BACK_CENTER = (1<<6), GF_AUDIO_CH_SIDE_LEFT = (1<<7),
  GF_AUDIO_CH_SIDE_RIGHT = (1<<8)
}
 Audio Channel Configuration. More...
enum  {
  GF_DIMS_UNIT_S = 1, GF_DIMS_UNIT_M = 1<<1, GF_DIMS_UNIT_I = 1<<2, GF_DIMS_UNIT_D = 1<<3,
  GF_DIMS_UNIT_P = 1<<4, GF_DIMS_UNIT_C = 1<<5
}
 DIMS Unit header flags. More...


Detailed Description

This section documents some constants used in the GPAC framework which are not related to any specific sub-project.

Define Documentation

#define GPAC_OTI_MEDIA_GENERIC   0x80

ObjectTypeIndication for media (audio/video) codecs not defined in MPEG-4. Since GPAC signals streams through MPEG-4 Descriptions, it needs extensions for non-MPEG-4 streams such as AMR, H263 , etc.

Note:
The decoder specific info for such streams is always carried encoded, with the following syntax:
DSI Syntax for audio streams
        u32 codec_four_cc: the codec 4CC reg code / codec id for ffmpeg
        u32 sample_rate: sampling rate or 0 if unknown
        u16 nb_channels: num channels or 0 if unknown
        u16 frame_size: num audio samples per frame or 0 if unknown
        u8 nb_bits_per_sample: nb bits or 0 if unknown
        u8 num_frames_per_au: num audio frames per AU (used in 3GPP, max 15), 0 if unknown
        char *data: per-codec extensions till end of DSI bitstream

DSI Syntax for video streams
        u32 codec_four_cc: the codec 4CC reg code  / codec id for ffmpeg
        u16 width: video width or 0 if unknown
        u16 height: video height or 0 if unknown
        char *data: per-codec extensions till end of DSI bitstream

#define GPAC_OTI_MEDIA_FFMPEG   0x81

ObjectTypeIndication for FFMPEG codecs not defined in MPEG-4. FFMPEG uses the base GPAC_OTI_MEDIA_GENERIC specific info formats, and extends it as follows:

        u32 bit_rate: the stream rate or 0 if unknown
        u32 codec_tag: FFMPEG codec tag as defined in libavcodec
        char *data: codec extensions till end of DSI bitstream

#define GPAC_OTI_MEDIA_OGG   0xDD

Object type indication for all OGG media. The DSI contains all intitialization ogg packets for the codec and is formated as follows:

        while (dsi_size) {
                bit(16) packet_size;
                char packet[packet_size];
                dsi_size -= packet_size;
        }


Enumeration Type Documentation

anonymous enum

Supported media stream types for media objects.

Enumerator:
GF_STREAM_OD  MPEG-4 Object Descriptor Stream
GF_STREAM_OCR  MPEG-4 Object Clock Reference Stream
GF_STREAM_SCENE  MPEG-4 Scene Description Stream
GF_STREAM_VISUAL  Visual Stream (Video, Image or MPEG-4 SNHC Tools)
GF_STREAM_AUDIO  Audio Stream (Audio, MPEG-4 Structured-Audio Tools)
GF_STREAM_MPEG7  MPEG-7 Description Stream
GF_STREAM_IPMP  MPEG-4 Intellectual Property Management and Protection Stream
GF_STREAM_OCI  MPEG-4 Object Content Information Stream
GF_STREAM_MPEGJ  MPEG-4 MPEGlet Stream
GF_STREAM_INTERACT  MPEG-4 User Interaction Stream
GF_STREAM_IPMP_TOOL  MPEG-4 IPMP Tool Stream
GF_STREAM_FONT  MPEG-4 Font Data Stream
GF_STREAM_TEXT  MPEG-4 Streaming Text Stream
GF_STREAM_ND_SUBPIC  Nero Digital Subpicture Stream
GF_STREAM_PRIVATE_SCENE  GPAC Private Scene streams

Note:
this stream type (MPEG-4 user-private) is reserved for streams only used to create a scene decoder handling the scene without input streams, as is the case for file readers (BT/VRML/XML..).
The decoderSpecificInfo carried is as follows:
                u32 file_size:  total file size 
                char file_name[dsi_size - sizeof(u32)]: local file name. 
                \n\note: File may be a cache file, it is the decoder responsability to check if the file is completely
                downloaded before parsing if needed.
The inBufferLength param for decoders using these streams is the stream clock in ms (no input data is given).
The "dummy_in" module is available to generate these streams for common files, and also takes care of proper clock init in case of seeking.
This is a reentrant stream type: if any media object with this streamtype also exist in the scene, they will be attached to the scene decoder (except when a new inline scene is detected, in which case a new decoder will be created). This allows for animation/sprite usage along with the systems timing/stream management.

the objectTypeIndication currently in use for these streams are documented below

anonymous enum

Media Object types

This type provides a hint to network modules which may have to generate an service descriptor on the fly. They occur only if objects/services used in the scene are not referenced through ObjectDescriptors (MPEG-4) but direct through URL

Enumerator:
GF_MEDIA_OBJECT_UNDEF  service descriptor expected is of undefined type. This should be treated like GF_MEDIA_OBJECT_SCENE
GF_MEDIA_OBJECT_SCENE  service descriptor expected is of SCENE type and shall contain a scene stream and OD one if needed
GF_MEDIA_OBJECT_UPDATES  service descriptor expected is of SCENE UPDATES type (animation streams)
GF_MEDIA_OBJECT_VIDEO  service descriptor expected is of VISUAL type
GF_MEDIA_OBJECT_AUDIO  service descriptor expected is of AUDIO type
GF_MEDIA_OBJECT_TEXT  service descriptor expected is of TEXT type (3GPP/MPEG4)
GF_MEDIA_OBJECT_INTERACT  service descriptor expected is of UserInteraction type (MPEG-4 InputSensor)

Supported pixel formats for everything using video

Note:
For textures using 32 bit ARGB/RGB_32/BGR_32:
  • on little endian machines, shall be ordered in memory as BGRA,
  • on big endians, shall be ordered in memory as ARGB so that *(u32*)pixel_mem is always ARGB (0xAARRGGBB).
Enumerator:
GF_PIXEL_GREYSCALE  8 bit GREY
GF_PIXEL_ALPHAGREY  16 bit greyscale
GF_PIXEL_RGB_444  12 bit RGB on 16 bits (4096 colors)
GF_PIXEL_RGB_555  15 bit RGB
GF_PIXEL_RGB_565  16 bit RGB
GF_PIXEL_RGB_24  24 bit RGB
GF_PIXEL_BGR_24  24 bit BGR - used for graphics cards video format signaling
GF_PIXEL_RGB_32  32 bit RGB
GF_PIXEL_BGR_32  32 bit BGR - used for graphics cards video format signaling
GF_PIXEL_ARGB  32 bit ARGB.
GF_PIXEL_RGBA  32 bit RGBA (openGL like)
GF_PIXEL_YUY2  YUV packed format
GF_PIXEL_YVYU  YUV packed format
GF_PIXEL_UYVY  YUV packed format
GF_PIXEL_VYUY  YUV packed format
GF_PIXEL_Y422  YUV packed format
GF_PIXEL_UYNV  YUV packed format
GF_PIXEL_YUNV  YUV packed format
GF_PIXEL_V422  YUV packed format
GF_PIXEL_YV12  YUV planar format
GF_PIXEL_IYUV  YUV planar format
GF_PIXEL_I420  YUV planar format
GF_PIXEL_YUVA  YV12 + Alpha plane

anonymous enum

Supported ObjectTypeIndication for scene description streams. *_FILE_* are only used with private scene streams and only carry the file name for the scene. Other internal stream types can be used in a real streaming environment

Enumerator:
GPAC_OTI_SCENE_BIFS  OTI for BIFS v1
GPAC_OTI_SCENE_BIFS_V2  OTI for BIFS v2
GPAC_OTI_SCENE_INTERACT  OTI for BIFS InputSensor streams
GPAC_OTI_SCENE_LASER  OTI forLASeR streams
GPAC_OTI_PRIVATE_SCENE_GENERIC  OTI for dummy streams (dsi = file name) using the generci context loader (BIFS/VRML/SWF/...) - GPAC internal
GPAC_OTI_PRIVATE_SCENE_SVG  OTI for SVG dummy stream (dsi = file name) - GPAC internal
GPAC_OTI_PRIVATE_SCENE_LASER  OTI for LASeR/SAF+XML dummy stream (dsi = file name) - GPAC internal
GPAC_OTI_PRIVATE_SCENE_XBL  OTI for XBL dummy streams (dsi = file name) - GPAC internal
GPAC_OTI_PRIVATE_SCENE_EPG  OTI for EPG dummy streams (dsi = null) - GPAC internal
GPAC_OTI_SCENE_SVG  OTI for streaming SVG - GPAC internal
GPAC_OTI_SCENE_SVG_GZ  OTI for streaming SVG + gz - GPAC internal
GPAC_OTI_SCENE_DIMS  OTI for DIMS (dsi = 3GPP DIMS configuration) - GPAC internal

anonymous enum

Audio channel flags for spatialization.

Note:
Decoders must output stereo/multichannel audio channels in this order in the decoded audio frame.
Enumerator:
GF_AUDIO_CH_FRONT_LEFT  Left Audio Channel
GF_AUDIO_CH_FRONT_RIGHT  Right Audio Channel
GF_AUDIO_CH_FRONT_CENTER  Center Audio Channel - may also be used to signal monophonic audio
GF_AUDIO_CH_LFE  LFE Audio Channel
GF_AUDIO_CH_BACK_LEFT  Back Left Audio Channel
GF_AUDIO_CH_BACK_RIGHT  Back Right Audio Channel
GF_AUDIO_CH_BACK_CENTER  Back Center Audio Channel
GF_AUDIO_CH_SIDE_LEFT  Side Left Audio Channel
GF_AUDIO_CH_SIDE_RIGHT  Side Right Audio Channel

anonymous enum

DIMS Unit header flags as 3GPP TS 26.142.

Enumerator:
GF_DIMS_UNIT_S  S: is-Scene: DIMS unit contains a complete document (<svg>
GF_DIMS_UNIT_M  M: is-RAP: DIMS unit is a random access point
GF_DIMS_UNIT_I  I: is-Redundant: DIMS unit is made of redundant data
GF_DIMS_UNIT_D  D: redundant-exit: DIMS unit is the end of redundant data
GF_DIMS_UNIT_P  P: priority: DIMS unit is high priority
GF_DIMS_UNIT_C  C: compressed: DIMS unit is compressed


Generated on Mon Feb 23 02:15:06 2009 for libgpac by  doxygen 1.5.7.1