|
Packit |
5e46da |
/*
|
|
Packit |
5e46da |
* This file is part of libbluray
|
|
Packit |
5e46da |
* Copyright (C) 2010-2017 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(_INDX_PARSE_H_)
|
|
Packit |
5e46da |
#define _INDX_PARSE_H_
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#include "util/attributes.h"
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#include <stdint.h>
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
indx_video_format_ignored,
|
|
Packit |
5e46da |
indx_video_480i,
|
|
Packit |
5e46da |
indx_video_576i,
|
|
Packit |
5e46da |
indx_video_480p,
|
|
Packit |
5e46da |
indx_video_1080i,
|
|
Packit |
5e46da |
indx_video_720p,
|
|
Packit |
5e46da |
indx_video_1080p,
|
|
Packit |
5e46da |
indx_video_576p,
|
|
Packit |
5e46da |
} indx_video_format;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
indx_fps_reserved1,
|
|
Packit |
5e46da |
indx_fps_23_976,
|
|
Packit |
5e46da |
indx_fps_24,
|
|
Packit |
5e46da |
indx_fps_25,
|
|
Packit |
5e46da |
indx_fps_29_97,
|
|
Packit |
5e46da |
indx_fps_reserved2,
|
|
Packit |
5e46da |
indx_fps_50,
|
|
Packit |
5e46da |
indx_fps_59_94,
|
|
Packit |
5e46da |
} indx_frame_rate;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
indx_object_type_hdmv = 1,
|
|
Packit |
5e46da |
indx_object_type_bdj = 2,
|
|
Packit |
5e46da |
} indx_object_type;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
indx_hdmv_playback_type_movie = 0,
|
|
Packit |
5e46da |
indx_hdmv_playback_type_interactive = 1,
|
|
Packit |
5e46da |
} indx_hdmv_playback_type;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
indx_bdj_playback_type_movie = 2,
|
|
Packit |
5e46da |
indx_bdj_playback_type_interactive = 3,
|
|
Packit |
5e46da |
} indx_bdj_playback_type;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef enum {
|
|
Packit |
5e46da |
indx_access_permitted = 0, /* jump into this title is permitted. title number may be shown on UI. */
|
|
Packit |
5e46da |
indx_access_prohibited = 1, /* jump into this title is prohibited. title number may be shown on UI. */
|
|
Packit |
5e46da |
indx_access_hidden = 3, /* jump into this title is prohibited. title number shall not be shown on UI. */
|
|
Packit |
5e46da |
} indx_access_type;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#define INDX_ACCESS_PROHIBITED_MASK 0x01 /* if set, jump to this title is not allowed */
|
|
Packit |
5e46da |
#define INDX_ACCESS_HIDDEN_MASK 0x02 /* if set, title number shall not be displayed on UI */
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
unsigned int initial_output_mode_preference : 1; /* 0 - 2D, 1 - 3D */
|
|
Packit |
5e46da |
unsigned int content_exist_flag : 1;
|
|
Packit |
5e46da |
unsigned int video_format : 4;
|
|
Packit |
5e46da |
unsigned int frame_rate : 4;
|
|
Packit |
5e46da |
uint8_t user_data[32];
|
|
Packit |
5e46da |
} INDX_APP_INFO;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint8_t playback_type/* : 2*/;
|
|
Packit |
5e46da |
char name[6];
|
|
Packit |
5e46da |
} INDX_BDJ_OBJ;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint8_t playback_type/* : 2*/;
|
|
Packit |
5e46da |
uint16_t id_ref;
|
|
Packit |
5e46da |
} INDX_HDMV_OBJ;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint8_t object_type/* : 2*/;
|
|
Packit |
5e46da |
/*union {*/
|
|
Packit |
5e46da |
INDX_BDJ_OBJ bdj;
|
|
Packit |
5e46da |
INDX_HDMV_OBJ hdmv;
|
|
Packit |
5e46da |
/*};*/
|
|
Packit |
5e46da |
} INDX_PLAY_ITEM;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct {
|
|
Packit |
5e46da |
uint8_t object_type/* : 2*/;
|
|
Packit |
5e46da |
uint8_t access_type/* : 2*/;
|
|
Packit |
5e46da |
/*union {*/
|
|
Packit |
5e46da |
INDX_BDJ_OBJ bdj;
|
|
Packit |
5e46da |
INDX_HDMV_OBJ hdmv;
|
|
Packit |
5e46da |
/*};*/
|
|
Packit |
5e46da |
} INDX_TITLE;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
typedef struct indx_root_s {
|
|
Packit |
5e46da |
INDX_APP_INFO app_info;
|
|
Packit |
5e46da |
INDX_PLAY_ITEM first_play;
|
|
Packit |
5e46da |
INDX_PLAY_ITEM top_menu;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
uint16_t num_titles;
|
|
Packit |
5e46da |
INDX_TITLE *titles;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
uint32_t indx_version;
|
|
Packit |
5e46da |
} INDX_ROOT;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
struct bd_disc;
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
BD_PRIVATE INDX_ROOT* indx_get(struct bd_disc *disc); /* parse index.bdmv */
|
|
Packit |
5e46da |
BD_PRIVATE void indx_free(INDX_ROOT **index);
|
|
Packit |
5e46da |
|
|
Packit |
5e46da |
#endif // _INDX_PARSE_H_
|
|
Packit |
5e46da |
|