-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbluray_open.h
85 lines (73 loc) · 2.12 KB
/
bluray_open.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef BLURAY_INFO_OPEN_H
#define BLURAY_INFO_OPEN_H
#include <stdint.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#include "config.h"
#include "libbluray/bluray.h"
#include "libbluray/meta_data.h"
#define BLURAY_BLOCK_SIZE 192
#define BLURAY_LANG_STRLEN 4
#define BLURAY_INFO_DISC_ID_STRLEN 41
#define BLURAY_INFO_UDF_VOLUME_ID_STRLEN 33
#define BLURAY_INFO_PROVIDER_DATA_STRLEN 33
#define BLURAY_INFO_DISC_NAME_STRLEN 256
// Time format: 00:00:00.000
#define BLURAY_INFO_TIME_STRLEN 13
struct bluray_info {
char disc_name[BLURAY_INFO_DISC_NAME_STRLEN];
char udf_volume_id[BLURAY_INFO_UDF_VOLUME_ID_STRLEN];
char disc_id[BLURAY_INFO_DISC_ID_STRLEN];
uint32_t titles;
uint32_t main_title;
bool first_play_supported;
bool top_menu_supported;
uint32_t disc_num_titles;
uint32_t hdmv_titles;
uint32_t bdj_titles;
uint32_t unsupported_titles;
bool aacs;
bool bdplus;
bool bdj;
bool content_exist_3D;
char provider_data[BLURAY_INFO_PROVIDER_DATA_STRLEN];
char initial_output_mode_preference[3];
};
struct bluray_title {
uint32_t ix;
uint32_t number;
uint32_t playlist;
uint64_t duration;
uint64_t seconds;
uint64_t minutes;
uint64_t size;
uint64_t size_mbs;
uint64_t blocks;
uint32_t chapters;
uint32_t clips;
uint8_t angles;
uint8_t video_streams;
uint8_t audio_streams;
uint8_t pg_streams;
char length[BLURAY_INFO_TIME_STRLEN];
BLURAY_CLIP_INFO *clip_info;
BLURAY_TITLE_CHAPTER *title_chapters;
};
struct bluray_chapter {
uint64_t duration;
uint64_t start;
char start_time[BLURAY_INFO_TIME_STRLEN];
char length[BLURAY_INFO_TIME_STRLEN];
int64_t range[2];
uint64_t size;
uint64_t size_mbs;
uint64_t blocks;
};
int bluray_info_init(struct bluray *bd, struct bluray_info *bluray_info, bool display_duplicates);
int bluray_title_init(struct bluray *bd, struct bluray_title *bluray_title, uint32_t title_ix, uint8_t angle_ix, bool playlist);
bool bluray_title_has_alang(struct bluray_title *bluray_title, char lang[BLURAY_LANG_STRLEN]);
bool bluray_title_has_slang(struct bluray_title *bluray_title, char lang[BLURAY_LANG_STRLEN]);
int int_compare(const void *a, const void *b);
#endif