|
| 1 | +From 89be19cefe0ad81337e72189af7db3dfe63107fc Mon Sep 17 00:00:00 2001 |
| 2 | +From: qianlongxu < [email protected]> |
| 3 | +Date: Tue, 28 May 2024 16:55:19 +0800 |
| 4 | +Subject: [PATCH 1] skip check bdj and provide reading current stream file |
| 5 | + functions |
| 6 | + |
| 7 | +--- |
| 8 | + src/libbluray/bluray.c | 21 +++++++++++++++++++++ |
| 9 | + src/libbluray/bluray.h | 3 +++ |
| 10 | + 2 files changed, 24 insertions(+) |
| 11 | + |
| 12 | +diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c |
| 13 | +index b3b55f7..e9ff566 100644 |
| 14 | +--- a/src/libbluray/bluray.c |
| 15 | ++++ b/src/libbluray/bluray.c |
| 16 | +@@ -612,6 +612,24 @@ static void _close_m2ts(BD_STREAM *st) |
| 17 | + m2ts_filter_close(&st->m2ts_filter); |
| 18 | + } |
| 19 | + |
| 20 | ++int64_t bd_file_read(BLURAY *bd, unsigned char *buf, int size) |
| 21 | ++{ |
| 22 | ++ BD_STREAM *st = &bd->st0; |
| 23 | ++ return file_read(st->fp, buf, size); |
| 24 | ++} |
| 25 | ++ |
| 26 | ++int64_t bd_file_seek(BLURAY *bd, int64_t pos, int whence) |
| 27 | ++{ |
| 28 | ++ BD_STREAM *st = &bd->st0; |
| 29 | ++ return file_seek(st->fp, pos, whence); |
| 30 | ++} |
| 31 | ++ |
| 32 | ++int64_t bd_file_size(BLURAY *bd) |
| 33 | ++{ |
| 34 | ++ BD_STREAM *st = &bd->st0; |
| 35 | ++ return file_size(st->fp); |
| 36 | ++} |
| 37 | ++ |
| 38 | + static int _open_m2ts(BLURAY *bd, BD_STREAM *st) |
| 39 | + { |
| 40 | + _close_m2ts(st); |
| 41 | +@@ -955,6 +973,9 @@ static int _run_gc(BLURAY *bd, gc_ctrl_e msg, uint32_t param) |
| 42 | + |
| 43 | + static void _check_bdj(BLURAY *bd) |
| 44 | + { |
| 45 | ++ BD_DEBUG(DBG_BLURAY, "skip check bdj!\n"); |
| 46 | ++ return; |
| 47 | ++ |
| 48 | + if (!bd->disc_info.bdj_handled) { |
| 49 | + if (!bd->disc || bd->disc_info.bdj_detected) { |
| 50 | + |
| 51 | +diff --git a/src/libbluray/bluray.h b/src/libbluray/bluray.h |
| 52 | +index 41cd4f6..756520e 100644 |
| 53 | +--- a/src/libbluray/bluray.h |
| 54 | ++++ b/src/libbluray/bluray.h |
| 55 | +@@ -1210,6 +1210,9 @@ struct bd_dir_s *bd_open_dir(BLURAY *bd, const char *dir); |
| 56 | + */ |
| 57 | + struct bd_file_s *bd_open_file_dec(BLURAY *bd, const char *path); |
| 58 | + |
| 59 | ++int64_t bd_file_read(BLURAY *bd, unsigned char *buf, int size); |
| 60 | ++int64_t bd_file_seek(BLURAY *bd, int64_t pos, int whence); |
| 61 | ++int64_t bd_file_size(BLURAY *bd); |
| 62 | + |
| 63 | + #ifdef __cplusplus |
| 64 | + } |
| 65 | +-- |
| 66 | +2.39.3 (Apple Git-146) |
| 67 | + |
0 commit comments