This commit is contained in:
2024-09-16 20:33:01 +08:00
parent f4555c21e5
commit dcc7309aa4

View File

@@ -352,49 +352,49 @@ func (d *DBStruct) GetTitleInfo(titleIdx uint32, angle uint) (*BlurayTitleInfo,
return titleInfo, nil
}
// SelectTitle 从 GetTitles() 创建的列表中选择标题
// [未测试] 由copilot生成的代码
// [NotTested] Code generated by copilot
func (d *DBStruct) SelectTitle(titleIdx uint32) (int, error) {
result := C.bd_select_title(d.bd, C.uint32_t(titleIdx))
if result != 0 {
return 0, fmt.Errorf("failed to select title")
}
return int(result), nil
}
//// SelectTitle 从 GetTitles() 创建的列表中选择标题
//// [未测试] 由copilot生成的代码
//// [NotTested] Code generated by copilot
//func (d *DBStruct) SelectTitle(titleIdx uint32) (int, error) {
// result := C.bd_select_title(d.bd, C.uint32_t(titleIdx))
// if result != 0 {
// return 0, fmt.Errorf("failed to select title")
// }
// return int(result), nil
//}
//
//// SelectPlaylist 选择播放列表
//// [未测试] 由copilot生成的代码
//// [NotTested] Code generated by copilot
//func (d *DBStruct) SelectPlaylist(playlistIdx uint32) (int, error) {
// result := C.bd_select_playlist(d.bd, C.uint32_t(playlistIdx))
// if result != 0 {
// return 0, fmt.Errorf("failed to select playlist")
// }
// return int(result), nil
//}
//
//// GetCurrentTitle 获取当前标题
//// [未测试] 由copilot生成的代码
//// [NotTested] Code generated by copilot
//func (d *DBStruct) GetCurrentTitle() (uint32, error) {
// result := C.bd_get_current_title(d.bd)
// if result == 0 {
// return 0, fmt.Errorf("failed to get current title")
// }
// return uint32(result), nil
//}
// SelectPlaylist 选择播放列表
// [未测试] 由copilot生成的代码
// [NotTested] Code generated by copilot
func (d *DBStruct) SelectPlaylist(playlistIdx uint32) (int, error) {
result := C.bd_select_playlist(d.bd, C.uint32_t(playlistIdx))
if result != 0 {
return 0, fmt.Errorf("failed to select playlist")
}
return int(result), nil
}
// GetCurrentTitle 获取当前标题
// [未测试] 由copilot生成的代码
// [NotTested] Code generated by copilot
func (d *DBStruct) GetCurrentTitle() (uint32, error) {
result := C.bd_get_current_title(d.bd)
if result == 0 {
return 0, fmt.Errorf("failed to get current title")
}
return uint32(result), nil
}
// Read Read from currently selected title file, decrypt if possible
// [未测试] 由copilot生成的代码
// [NotTested] Code generated by copilot
func (d *DBStruct) Read() (int, error) {
result := C.bd_read(d.bd)
if result != 0 {
return 0, fmt.Errorf("failed to read")
}
return int(result), nil
}
//// Read Read from currently selected title file, decrypt if possible
//// [未测试] 由copilot生成的代码
//// [NotTested] Code generated by copilot
//func (d *DBStruct) Read() (int, error) {
// result := C.bd_read(d.bd)
// if result != 0 {
// return 0, fmt.Errorf("failed to read")
// }
// return int(result), nil
//}
//// Seek Seek to a position in the currently selected title file
//// [未测试] 由copilot生成的代码