ml_media_ttml.h
Classes
| Name | |
|---|---|
| struct | MLTTMLImage Byte data for TTML image cues. |
| struct | MLTTMLData TTML data structure. |
Types
| Name | |
|---|---|
| typedef struct MLTTMLImage | MLTTMLImage Byte data for TTML image cues. |
| typedef struct MLTTMLData | MLTTMLData TTML data structure. |
Enums
| Name | |
|---|---|
| enum | MLTTMLLayoutAlignment { MLTTMLLayoutAlignment_Unspecified = 0x7FFFFFFF, MLTTMLLayoutAlignment_Normal = 0, MLTTMLLayoutAlignment_Center = 1, MLTTMLLayoutAlignment_Opposite = 2, MLTTMLLayoutAlignment_Ensure32Bits = 0x7FFFFFFF } Cue text alignment within the cue box. |
| enum | MLTTMLLineType { MLTTMLLineType_Unset = 0x7FFFFFFF, MLTTMLLineType_Fraction = 0, MLTTMLLineType_Number = 1, MLTTMLLineType_Ensure32Bits = 0x7FFFFFFF } Cue line type. |
| enum | MLTTMLAnchorType { MLTTMLAnchorType_Unset = 0x7FFFFFFF, MLTTMLAnchorType_Start = 0, MLTTMLAnchorType_Middle = 1, MLTTMLAnchorType_End = 2, MLTTMLAnchorType_Ensure32Bits = 0x7FFFFFFF } Cue anchor type. |
| enum | MLTTMLTextSizeType { MLTTMLTextSizeType_Unset = 0x7FFFFFFF, MLTTMLTextSizeType_Fractional = 0, MLTTMLTextSizeType_Fractional_Ignore_Padding = 1, MLTTMLTextSizeType_Absolute = 2, MLTTMLTextSizeType_Ensure32Bits = 0x7FFFFFFF } Cue text size type. |
Attributes
| Name | |
|---|---|
| const float | MLTTMLDimen_Unset An unset position, width or size which is negative of maximum finite value of float (-FLT_MAX). |
Enums Documentation
MLTTMLLayoutAlignment
| Enumerator | Value | Description |
|---|---|---|
| MLTTMLLayoutAlignment_Unspecified | 0x7FFFFFFF | An unspecified alignment value. |
| MLTTMLLayoutAlignment_Normal | 0 | Normal alignment relative to text direction. |
| MLTTMLLayoutAlignment_Center | 1 | Centered alignment. |
| MLTTMLLayoutAlignment_Opposite | 2 | Opposite alignment relative to text direction. |
| MLTTMLLayoutAlignment_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cue text alignment within the cue box.
API Level:
- 20
MLTTMLLineType
| Enumerator | Value | Description |
|---|---|---|
| MLTTMLLineType_Unset | 0x7FFFFFFF | An unset line type value. |
| MLTTMLLineType_Fraction | 0 | Line position is fractional position within the viewport. |
| MLTTMLLineType_Number | 1 | Line position is number of lines, interpretation also depends on the line anchor type. |
| MLTTMLLineType_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cue line type.
API Level:
- 20
MLTTMLAnchorType
| Enumerator | Value | Description |
|---|---|---|
| MLTTMLAnchorType_Unset | 0x7FFFFFFF | An unset anchor type value. |
| MLTTMLAnchorType_Start | 0 | Anchors the left (for horizontal positions) or top (for vertical positions) edge of the cue box. |
| MLTTMLAnchorType_Middle | 1 | Anchors the middle of the cue box. |
| MLTTMLAnchorType_End | 2 | Anchors the right (for horizontal positions) or bottom (for vertical positions) edge of the cue box. |
| MLTTMLAnchorType_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cue anchor type.
API Level:
- 20
MLTTMLTextSizeType
| Enumerator | Value | Description |
|---|---|---|
| MLTTMLTextSizeType_Unset | 0x7FFFFFFF | An unset text size type value. |
| MLTTMLTextSizeType_Fractional | 0 | Text size is measured as a fraction of the viewport size minus the view padding. |
| MLTTMLTextSizeType_Fractional_Ignore_Padding | 1 | Text size is measured as a fraction of the viewport size, ignoring the view padding. |
| MLTTMLTextSizeType_Absolute | 2 | Text size is measured in number of pixels. |
| MLTTMLTextSizeType_Ensure32Bits | 0x7FFFFFFF | Ensure enum is represented as 32 bits. |
Cue text size type.
API Level:
- 20
Types Documentation
MLTTMLImage
typedef struct MLTTMLImage MLTTMLImage;
Byte data for TTML image cues.
Deprecated
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
MLTTMLData
typedef struct MLTTMLData MLTTMLData;
TTML data structure.
Deprecated
Deprecated since 1.4.0. Scheduled for removal.
API Level:
- 20
Attributes Documentation
MLTTMLDimen_Unset
static const float MLTTMLDimen_Unset = -3.402823466e+38F;
An unset position, width or size which is negative of maximum finite value of float (-FLT_MAX).
API Level:
- 20
Source code
// %BANNER_BEGIN%
// ---------------------------------------------------------------------
// %COPYRIGHT_BEGIN%
// Copyright (c) 2017 Magic Leap, Inc. All Rights Reserved.
// Use of this file is governed by the Software License Agreement,
// located here: https://www.magicleap.com/software-license-agreement-ml2
// Terms and conditions applicable to third-party materials accompanying
// this distribution may also be found in the top-level NOTICE file
// appearing herein.
// %COPYRIGHT_END%
// ---------------------------------------------------------------------
// %BANNER_END%
#pragma once
#include "ml_api.h"
ML_EXTERN_C_BEGIN
static const float MLTTMLDimen_Unset = -3.402823466e+38F;
typedef enum MLTTMLLayoutAlignment {
MLTTMLLayoutAlignment_Unspecified = 0x7FFFFFFF,
MLTTMLLayoutAlignment_Normal = 0,
MLTTMLLayoutAlignment_Center = 1,
MLTTMLLayoutAlignment_Opposite = 2,
MLTTMLLayoutAlignment_Ensure32Bits = 0x7FFFFFFF
} MLTTMLLayoutAlignment;
typedef enum MLTTMLLineType {
MLTTMLLineType_Unset = 0x7FFFFFFF,
MLTTMLLineType_Fraction = 0,
MLTTMLLineType_Number = 1,
MLTTMLLineType_Ensure32Bits = 0x7FFFFFFF
} MLTTMLLineType;
typedef enum MLTTMLAnchorType {
MLTTMLAnchorType_Unset = 0x7FFFFFFF,
MLTTMLAnchorType_Start = 0,
MLTTMLAnchorType_Middle = 1,
MLTTMLAnchorType_End = 2,
MLTTMLAnchorType_Ensure32Bits = 0x7FFFFFFF
} MLTTMLAnchorType;
typedef enum MLTTMLTextSizeType {
MLTTMLTextSizeType_Unset = 0x7FFFFFFF,
MLTTMLTextSizeType_Fractional = 0,
MLTTMLTextSizeType_Fractional_Ignore_Padding = 1,
MLTTMLTextSizeType_Absolute = 2,
MLTTMLTextSizeType_Ensure32Bits = 0x7FFFFFFF
} MLTTMLTextSizeType;
typedef ML_DEPRECATED_MSG("Use standard Android SDK APIs.") struct MLTTMLImage {
size_t size;
uint8_t *data;
} MLTTMLImage;
typedef ML_DEPRECATED_MSG("Use standard Android SDK APIs.") struct MLTTMLData {
int64_t start_time_ms;
int64_t end_time_ms;
char *text;
MLTTMLLayoutAlignment text_alignment;
MLTTMLImage bitmap;
float line;
MLTTMLLineType line_type;
MLTTMLAnchorType line_anchor;
float position;
MLTTMLAnchorType position_anchor;
float size;
float bitmap_height;
bool window_color_set;
uint32_t window_color;
MLTTMLTextSizeType text_size_type;
float text_size;
} MLTTMLData;
ML_EXTERN_C_END