1 /*****************************************************************************
2 * mpls.h: BluRay Disc MPLS
3 *****************************************************************************
4 * Copyright (C) 2009 the VideoLAN team
7 * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
26 BD_MPLS_STREAM_TYPE_PLAY_ITEM = 0x01,
27 BD_MPLS_STREAM_TYPE_SUB_PATH = 0x02,
28 BD_MPLS_STREAM_TYPE_IN_MUX_SUB_PATH = 0x03,
29 } bd_mpls_stream_type_t;
32 BD_MPLS_STREAM_CLASS_PRIMARY_VIDEO = 0,
33 BD_MPLS_STREAM_CLASS_PRIMARY_AUDIO,
34 BD_MPLS_STREAM_CLASS_PG,
35 BD_MPLS_STREAM_CLASS_IG,
36 BD_MPLS_STREAM_CLASS_SECONDARY_AUDIO,
37 BD_MPLS_STREAM_CLASS_SECONDARY_PIP_PG,
38 } bd_mpls_stream_class_t;
41 BD_MPLS_STREAM_CHARSET_UNKNOWN = -1,
43 BD_MPLS_STREAM_CHARSET_UTF8 = 0x01,
44 BD_MPLS_STREAM_CHARSET_UTF16 = 0x02,
45 BD_MPLS_STREAM_CHARSET_SHIFT_JIS = 0x03,
46 BD_MPLS_STREAM_CHARSET_KSC = 0x04,
47 BD_MPLS_STREAM_CHARSET_GB18030 = 0x05,
48 BD_MPLS_STREAM_CHARSET_GB2312 = 0x06,
49 BD_MPLS_STREAM_CHARSET_BIG5 = 0x7,
50 } bd_mpls_stream_charset_t;
55 int i_type; /* Type of the stream entry (bd_mpls_stream_type_t) */
56 int i_class; /* Class of the stream entry (bd_mpls_stream_class_t) */
61 int i_pid; /* PID of the associated stream */
65 int i_sub_path_id; /* Index of the sub path entry */
66 int i_sub_clip_id; /* Index of the sub clip entry (?) */
67 int i_pid; /* PID of the associated stream */
71 int i_sub_path_id; /* Index of the sub path entry */
72 int i_pid; /* PID of the associated stream */
76 /* Stream attributes */
77 int i_stream_type; /* MPEG-2 TS stream_type */
78 char psz_language[3+1]; /* ISO-639 code, empty if NA */
79 int i_charset; /* For text stream only (bd_mpls_stream_attributes_charset_t) */
82 void bd_mpls_stream_Parse( bd_mpls_stream_t *p_stream, bs_t *s, int i_class );
86 BD_MPLS_PLAY_ITEM_CONNECTION_NOT_SEAMLESS = 0x01,
87 BD_MPLS_PLAY_ITEM_CONNECTION_SEAMLESS_5 = 0x05,
88 BD_MPLS_PLAY_ITEM_CONNECTION_SEAMLESS_6 = 0x06,
89 } bd_mpls_play_item_connection_t;
93 BD_MPLS_PLAY_ITEM_STILL_NONE = 0x00,
94 BD_MPLS_PLAY_ITEM_STILL_FINITE = 0x01,
95 BD_MPLS_PLAY_ITEM_STILL_INFINITE = 0x02,
96 } bd_mpls_play_item_still_t;
106 int i_connection; /* Connection with previous play item (bd_mpls_play_item_connection_t) */
107 int64_t i_in_time; /* Start time in 45kHz */
108 int64_t i_out_time; /* Stop time in 45kHz */
109 int i_still; /* Still mode (bd_mpls_play_item_still_t) */
110 int i_still_time; /* Still time for BD_MPLS_PLAY_ITEM_STILL_FINITE (second?) */
112 /* Default clpi/angle */
115 /* Extra clpi (multiple angles) */
117 bd_mpls_clpi_t *p_clpi;
118 bool b_angle_different_audio;
119 bool b_angle_seamless;
124 bd_mpls_stream_t *p_stream;
126 } bd_mpls_play_item_t;
127 void bd_mpls_play_item_Clean( bd_mpls_play_item_t *p_item );
128 void bd_mpls_play_item_Parse( bd_mpls_play_item_t *p_item, bs_t *s );
132 BD_MPLS_SUB_PATH_TYPE_PRIMARY_AUDIO = 0x02,
133 BD_MPLS_SUB_PATH_TYPE_IG = 0x03,
134 BD_MPLS_SUB_PATH_TYPE_TEXT_SUB = 0x04,
135 BD_MPLS_SUB_PATH_TYPE_OUT_OF_MUX_AND_SYNC = 0x05,
136 BD_MPLS_SUB_PATH_TYPE_OUT_OF_MUX_AND_ASYNC = 0x06,
137 BD_MPLS_SUB_PATH_TYPE_IN_OF_MUX_AND_SYNC = 0x07,
138 } bd_mpls_sub_path_type_t;
141 int i_type; /* Sub path type (bd_mpls_sub_path_type_t) */
142 bool b_repeat; /* Repeated sub-path */
146 bd_mpls_sub_play_item_t *p_item;
148 } bd_mpls_sub_path_t;
149 void bd_mpls_sub_path_Parse( bd_mpls_sub_path_t *p_path, bs_t *s );
153 BD_MPLS_MARK_TYPE_RESUME = 0x00,
154 BD_MPLS_MARK_TYPE_BOOKMARK = 0x01,
155 BD_MPLS_MARK_TYPE_SKIP = 0x02,
156 } bd_mpls_mark_type_t;
160 int i_type; /* Type of the mark (bd_mpls_mark_type_t) */
161 int i_play_item_id; /* Play item ID */
162 int64_t i_time; /* Time of the mark in 45kHz */
163 int i_entry_es_pid; /* Entry ES PID */
165 void bd_mpls_mark_Parse( bd_mpls_mark_t *p_mark, bs_t *s );
172 bd_mpls_play_item_t *p_play_item;
175 bd_mpls_sub_path_t *p_sub_path;
178 bd_mpls_mark_t *p_mark;
180 void bd_mpls_Clean( bd_mpls_t *p_mpls );
181 int bd_mpls_Parse( bd_mpls_t *p_mpls, bs_t *s, int i_id );