141 lines
4.6 KiB
Go
141 lines
4.6 KiB
Go
package bluray
|
||
|
||
// BlurayTitle 表示BluRay标题的信息
|
||
type BlurayTitle struct {
|
||
Name *string // 可选的标题名称,使用首选语言
|
||
Interactive uint8 // 如果标题是交互式的,值为1(在UI中不显示标题长度和播放位置)
|
||
Accessible uint8 // 如果允许跳转到该标题,值为1
|
||
Hidden uint8 // 如果在播放期间不显示标题编号,值为1
|
||
|
||
BDJ uint8 // 0表示HDMV标题,1表示BD-J标题
|
||
IDRef uint32 // 电影对象编号/bdjo文件编号
|
||
}
|
||
|
||
// BlurayDiscInfo 表示BluRay光盘的信息
|
||
type BlurayDiscInfo struct {
|
||
BlurayDetected uint8 // 如果检测到BluRay光盘,值为1
|
||
|
||
// 光盘ID
|
||
DiscName *string // 可选的光盘名称,使用首选语言
|
||
UDFVolumeID *string // 可选的UDF卷标符
|
||
DiscID [20]byte // 光盘ID
|
||
|
||
// HDMV / BD-J 标题
|
||
NoMenuSupport uint8 // 如果无法通过光盘上的菜单播放该光盘,值为1
|
||
FirstPlaySupported uint8 // 如果光盘上有First Play标题且可以播放,值为1
|
||
TopMenuSupported uint8 // 如果光盘上有Top Menu标题且可以播放,值为1
|
||
|
||
NumTitles uint32 // 光盘上的标题数量,不包括"First Play"和"Top Menu"
|
||
Titles []*BlurayTitle // 标题数组,索引为标题编号1...N
|
||
FirstPlay *BlurayTitle // titles[N+1],如果光盘上不存在则为NULL
|
||
TopMenu *BlurayTitle // titles[0],如果光盘上不存在则为NULL
|
||
|
||
NumHDMVTitles uint32 // HDMV标题数量
|
||
NumBDJTitles uint32 // BD-J标题数量
|
||
NumUnsupportedTitles uint32 // 不支持的标题数量
|
||
|
||
// BD-J 信息(仅当光盘使用BD-J时有效)
|
||
BDJDetected uint8 // 如果光盘使用BD-J,值为1
|
||
BDJSupported uint8 // (已弃用)
|
||
LibJVMDetected uint8 // 如果找到可用的Java虚拟机,值为1
|
||
BDJHandled uint8 // 如果找到可用的Java虚拟机和libbluray.jar,值为1
|
||
|
||
BDJOrgID [9]byte // (BD-J)光盘组织ID
|
||
BDJDiscID [33]byte // (BD-J)光盘ID
|
||
|
||
// 光盘应用程序信息
|
||
VideoFormat uint8 // 视频格式(bd_video_format_e)
|
||
FrameRate uint8 // 帧率(bd_video_rate_e)
|
||
ContentExist3D uint8 // 如果光盘上存在3D内容,值为1
|
||
InitialOutputModePreference uint8 // 0表示2D,1表示3D
|
||
ProviderData [32]byte // 内容提供者数据
|
||
|
||
// AACS 信息(仅当光盘使用AACS时有效)
|
||
AACDetected uint8 // 如果光盘使用AACS加密,值为1
|
||
LibAACSDetected uint8 // 如果找到可用的AACS解码库,值为1
|
||
AACSHandled uint8 // 如果光盘使用支持的AACS加密,值为1
|
||
|
||
AACSErrorCode int // AACS错误代码(BD_AACS_)
|
||
AACSMKBV int // AACS MKB版本
|
||
|
||
// BD+ 信息(仅当光盘使用BD+时有效)
|
||
BDPlusDetected uint8 // 如果光盘使用BD+加密,值为1
|
||
LibBDPlusDetected uint8 // 如果找到可用的BD+解码库,值为1
|
||
BDPlusHandled uint8 // 如果光盘使用支持的BD+加密,值为1
|
||
|
||
BDPlusGen uint8 // BD+内容代码生成
|
||
BDPlusDate uint32 // BD+内容代码发布日期 ((year<<16)|(month<<8)|day)
|
||
|
||
// 光盘应用程序信息(libbluray > 1.2.0)
|
||
InitialDynamicRangeType uint8 // 动态范围类型(bd_dynamic_range_type_e)
|
||
}
|
||
|
||
type BlurayMetaFile struct {
|
||
Data []byte
|
||
Size int64
|
||
}
|
||
|
||
type BlurayStreamInfo struct {
|
||
CodingType string
|
||
Format string
|
||
Rate string
|
||
CharCode uint8
|
||
Lang string
|
||
Pid uint16
|
||
Aspect string
|
||
SubpathId uint8
|
||
}
|
||
|
||
type BlurayClipInfo struct {
|
||
PktCount uint32
|
||
StillMode string
|
||
StillTime uint16
|
||
VideoStreamCount uint8
|
||
AudioStreamCount uint8
|
||
PgStreamCount uint8
|
||
IgStreamCount uint8
|
||
SecAudioStreamCount uint8
|
||
SecVideoStreamCount uint8
|
||
VideoStreams []BlurayStreamInfo
|
||
AudioStreams []BlurayStreamInfo
|
||
PgStreams []BlurayStreamInfo
|
||
IgStreams []BlurayStreamInfo
|
||
SecAudioStreams []BlurayStreamInfo
|
||
SecVideoStreams []BlurayStreamInfo
|
||
StartTime uint64
|
||
InTime uint64
|
||
OutTime uint64
|
||
ClipId uint
|
||
}
|
||
|
||
type BlurayTitleChapter struct {
|
||
Idx uint32
|
||
Start uint64
|
||
Duration uint64
|
||
Offset uint64
|
||
ClipRef uint
|
||
}
|
||
|
||
type BlurayTitleMark struct {
|
||
Idx uint32
|
||
Type int
|
||
Start uint64
|
||
Duration uint64
|
||
Offset uint64
|
||
ClipRef uint
|
||
}
|
||
|
||
type BlurayTitleInfo struct {
|
||
Idx uint32
|
||
Playlist uint32
|
||
Duration uint64
|
||
ClipCount uint32
|
||
AngleCount uint8
|
||
ChapterCount uint32
|
||
MarkCount uint32
|
||
Clips []BlurayClipInfo
|
||
Chapters []BlurayTitleChapter
|
||
Marks []BlurayTitleMark
|
||
MvcBaseViewRFlag uint8
|
||
}
|