|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* This file is part of libbluray
|
|
Packit |
5e46da |
* Copyright (C) 2009-2010 John Stebbins
|
|
Packit |
5e46da |
* Copyright (C) 2012-2016 Petri Hintukainen <phintuka@users.sourceforge.net>
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* This library is free software; you can redistribute it and/or
|
|
Packit |
5e46da |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
5e46da |
* License as published by the Free Software Foundation; either
|
|
Packit |
5e46da |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
5e46da |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
5e46da |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
5e46da |
* Lesser General Public License for more details.
|
|
Packit |
5e46da |
*
|
|
Packit |
5e46da |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
5e46da |
* License along with this library. If not, see
|
|
Packit |
5e46da |
* <http://www.gnu.org/licenses/>.
|
|
Packit |
5e46da |
*/
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#if !defined(BLURAY_MPLS_DATA_H_)
|
|
Packit |
5e46da |
#define BLURAY_MPLS_DATA_H_
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#include "uo_mask_table.h"
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#include <stdint.h>
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#define BD_MARK_ENTRY 0x01
|
|
Packit |
5e46da |
#define BD_MARK_LINK 0x02
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct
|
|
Packit |
5e46da |
{
|
|
Packit |
5e46da |
uint8_t stream_type;
|
|
Packit |
5e46da |
uint8_t coding_type;
|
|
Packit |
5e46da |
uint16_t pid;
|
|
Packit |
5e46da |
uint8_t subpath_id;
|
|
Packit |
5e46da |
uint8_t subclip_id;
|
|
Packit |
5e46da |
uint8_t format;
|
|
Packit |
5e46da |
uint8_t rate;
|
|
Packit |
5e46da |
uint8_t char_code;
|
|
Packit |
5e46da |
char lang[4];
|
|
Packit |
5e46da |
// Secondary audio specific fields
|
|
Packit |
5e46da |
uint8_t sa_num_primary_audio_ref;
|
|
Packit |
5e46da |
uint8_t *sa_primary_audio_ref;
|
|
Packit |
5e46da |
// Secondary video specific fields
|
|
Packit |
5e46da |
uint8_t sv_num_secondary_audio_ref;
|
|
Packit |
5e46da |
uint8_t sv_num_pip_pg_ref;
|
|
Packit |
5e46da |
uint8_t *sv_secondary_audio_ref;
|
|
Packit |
5e46da |
uint8_t *sv_pip_pg_ref;
|
|
Packit |
5e46da |
} MPLS_STREAM;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct
|
|
Packit |
5e46da |
{
|
|
Packit |
5e46da |
uint8_t num_video;
|
|
Packit |
5e46da |
uint8_t num_audio;
|
|
Packit |
5e46da |
uint8_t num_pg;
|
|
Packit |
5e46da |
uint8_t num_ig;
|
|
Packit |
5e46da |
uint8_t num_secondary_audio;
|
|
Packit |
5e46da |
uint8_t num_secondary_video;
|
|
Packit |
5e46da |
uint8_t num_pip_pg;
|
|
Packit |
5e46da |
MPLS_STREAM *video;
|
|
Packit |
5e46da |
MPLS_STREAM *audio;
|
|
Packit |
5e46da |
MPLS_STREAM *pg;
|
|
Packit |
5e46da |
MPLS_STREAM *ig;
|
|
Packit |
5e46da |
MPLS_STREAM *secondary_audio;
|
|
Packit |
5e46da |
MPLS_STREAM *secondary_video;
|
|
Packit |
5e46da |
} MPLS_STN;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct
|
|
Packit |
5e46da |
{
|
|
Packit |
5e46da |
char clip_id[6];
|
|
Packit |
5e46da |
char codec_id[5];
|
|
Packit |
5e46da |
uint8_t stc_id;
|
|
Packit |
5e46da |
} MPLS_CLIP;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct
|
|
Packit |
5e46da |
{
|
|
Packit |
5e46da |
uint8_t is_multi_angle;
|
|
Packit |
5e46da |
uint8_t connection_condition;
|
|
Packit |
5e46da |
uint32_t in_time;
|
|
Packit |
5e46da |
uint32_t out_time;
|
|
Packit |
5e46da |
BD_UO_MASK uo_mask;
|
|
Packit |
5e46da |
uint8_t random_access_flag;
|
|
Packit |
5e46da |
uint8_t still_mode;
|
|
Packit |
5e46da |
uint16_t still_time;
|
|
Packit |
5e46da |
uint8_t angle_count;
|
|
Packit |
5e46da |
uint8_t is_different_audio;
|
|
Packit |
5e46da |
uint8_t is_seamless_angle;
|
|
Packit |
5e46da |
MPLS_CLIP *clip;
|
|
Packit |
5e46da |
MPLS_STN stn;
|
|
Packit |
5e46da |
} MPLS_PI;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct
|
|
Packit |
5e46da |
{
|
|
Packit |
5e46da |
uint8_t mark_type;
|
|
Packit |
5e46da |
uint16_t play_item_ref;
|
|
Packit |
5e46da |
uint32_t time;
|
|
Packit |
5e46da |
uint16_t entry_es_pid;
|
|
Packit |
5e46da |
uint32_t duration;
|
|
Packit |
5e46da |
} MPLS_PLM;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct
|
|
Packit |
5e46da |
{
|
|
Packit |
5e46da |
uint8_t playback_type;
|
|
Packit |
5e46da |
uint16_t playback_count;
|
|
Packit |
5e46da |
BD_UO_MASK uo_mask;
|
|
Packit |
5e46da |
uint8_t random_access_flag;
|
|
Packit |
5e46da |
uint8_t audio_mix_flag;
|
|
Packit |
5e46da |
uint8_t lossless_bypass_flag;
|
|
Packit |
5e46da |
} MPLS_AI;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct
|
|
Packit |
5e46da |
{
|
|
Packit |
5e46da |
uint8_t connection_condition;
|
|
Packit |
5e46da |
uint8_t is_multi_clip;
|
|
Packit |
5e46da |
uint32_t in_time;
|
|
Packit |
5e46da |
uint32_t out_time;
|
|
Packit |
5e46da |
uint16_t sync_play_item_id;
|
|
Packit |
5e46da |
uint32_t sync_pts;
|
|
Packit |
5e46da |
uint8_t clip_count;
|
|
Packit |
5e46da |
MPLS_CLIP *clip;
|
|
Packit |
5e46da |
} MPLS_SUB_PI;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
//mpls_sub_path_ = 2, /* Primary audio of the Browsable slideshow */
|
|
Packit |
5e46da |
mpls_sub_path_ig_menu = 3, /* Interactive Graphics presentation menu */
|
|
Packit |
5e46da |
mpls_sub_path_textst = 4, /* Text Subtitle */
|
|
Packit |
5e46da |
//mpls_sub_path_ = 5, /* Out-of-mux Synchronous elementary streams */
|
|
Packit |
5e46da |
mpls_sub_path_async_pip = 6, /* Out-of-mux Asynchronous Picture-in-Picture presentation */
|
|
Packit |
5e46da |
mpls_sub_path_sync_pip = 7, /* In-mux Synchronous Picture-in-Picture presentation */
|
|
Packit |
5e46da |
mpls_sub_path_ss_viseo = 8, /* SS Video */
|
|
Packit |
5e46da |
} mpls_sub_path_type;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct
|
|
Packit |
5e46da |
{
|
|
Packit |
5e46da |
uint8_t type; /* enum mpls_sub_path_type */
|
|
Packit |
5e46da |
uint8_t is_repeat;
|
|
Packit |
5e46da |
uint8_t sub_playitem_count;
|
|
Packit |
5e46da |
MPLS_SUB_PI *sub_play_item;
|
|
Packit |
5e46da |
} MPLS_SUB;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
pip_scaling_none = 1, /* unscaled */
|
|
Packit |
5e46da |
pip_scaling_half = 2, /* 1:2 */
|
|
Packit |
5e46da |
pip_scaling_quarter = 3, /* 1:4 */
|
|
Packit |
5e46da |
pip_scaling_one_half = 4, /* 3:2 */
|
|
Packit |
5e46da |
pip_scaling_fullscreen = 5, /* scale to main video size */
|
|
Packit |
5e46da |
} mpls_pip_scaling;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint32_t time; /* start timestamp (clip time) when the block is valid */
|
|
Packit |
5e46da |
uint16_t xpos;
|
|
Packit |
5e46da |
uint16_t ypos;
|
|
Packit |
5e46da |
uint8_t scale_factor; /* mpls_pip_scaling. Note: PSR14 may override this ! */
|
|
Packit |
5e46da |
} MPLS_PIP_DATA;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
pip_timeline_sync_mainpath = 1, /* timeline refers to main path */
|
|
Packit |
5e46da |
pip_timeline_async_subpath = 2, /* timeline refers to sub-path time */
|
|
Packit |
5e46da |
pip_timeline_async_mainpath = 3, /* timeline refers to main path */
|
|
Packit |
5e46da |
} mpls_pip_timeline;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint16_t clip_ref; /* clip id for secondary_video_ref (STN) */
|
|
Packit |
5e46da |
uint8_t secondary_video_ref; /* secondary video stream id (STN) */
|
|
Packit |
5e46da |
uint8_t timeline_type; /* mpls_pip_timeline */
|
|
Packit |
5e46da |
uint8_t luma_key_flag; /* use luma keying */
|
|
Packit |
5e46da |
uint8_t upper_limit_luma_key; /* luma key (secondary video pixels with Y <= this value are transparent) */
|
|
Packit |
5e46da |
uint8_t trick_play_flag; /* show synchronous PiP when playing trick speed */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
uint16_t data_count;
|
|
Packit |
5e46da |
MPLS_PIP_DATA *data;
|
|
Packit |
5e46da |
} MPLS_PIP_METADATA;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct mpls_pl
|
|
Packit |
5e46da |
{
|
|
Packit |
5e46da |
uint32_t type_indicator; /* 'MPLS' */
|
|
Packit |
5e46da |
uint32_t type_indicator2; /* version */
|
|
Packit |
5e46da |
uint32_t list_pos;
|
|
Packit |
5e46da |
uint32_t mark_pos;
|
|
Packit |
5e46da |
uint32_t ext_pos;
|
|
Packit |
5e46da |
MPLS_AI app_info;
|
|
Packit |
5e46da |
uint16_t list_count;
|
|
Packit |
5e46da |
uint16_t sub_count;
|
|
Packit |
5e46da |
uint16_t mark_count;
|
|
Packit |
5e46da |
MPLS_PI *play_item;
|
|
Packit |
5e46da |
MPLS_SUB *sub_path;
|
|
Packit |
5e46da |
MPLS_PLM *play_mark;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
// extension data (profile 5, version 2.4)
|
|
Packit |
5e46da |
uint16_t ext_sub_count;
|
|
Packit |
5e46da |
MPLS_SUB *ext_sub_path; // sub path entries extension
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
// extension data (Picture-In-Picture metadata)
|
|
Packit |
5e46da |
uint16_t ext_pip_data_count;
|
|
Packit |
5e46da |
MPLS_PIP_METADATA *ext_pip_data; // pip metadata extension
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
} MPLS_PL;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#endif // BLURAY_MPLS_DATA_H_
|