1- From d0bdb913a8ba8af6eeee4d259f6b759fbe18738c Mon Sep 17 00:00:00 2001
1+ From a0ab581935b79564106be60328c6522648799b70 Mon Sep 17 00:00:00 2001
22From: qianlongxu <
[email protected] >
3- Date: Wed, 19 Mar 2025 11:34:09 +0800
3+ Date: Wed, 19 Mar 2025 13:24:49 +0800
44Subject: [PATCH 27] custom bluray fs for network Blu-ray Disc and BDMV, use cache
55 improve parse title list
66
77---
88 libavformat/Makefile | 2 +-
9- libavformat/bluray.c | 152 ++++++++--
9+ libavformat/bluray.c | 154 ++++++++--
1010 libavformat/bluray_custom_fs.c | 529 +++++++++++++++++++++++++++++++++
1111 libavformat/bluray_custom_fs.h | 33 ++
1212 libavformat/lrucache.c | 112 +++++++
1313 libavformat/lrucache.h | 30 ++
14- 6 files changed, 839 insertions(+), 19 deletions(-)
14+ 6 files changed, 840 insertions(+), 20 deletions(-)
1515 create mode 100644 libavformat/bluray_custom_fs.c
1616 create mode 100644 libavformat/bluray_custom_fs.h
1717 create mode 100644 libavformat/lrucache.c
@@ -31,7 +31,7 @@ index 19ba54e..4184bfd 100644
3131 OBJS-$(CONFIG_CONCAT_PROTOCOL) += concat.o
3232 OBJS-$(CONFIG_CONCATF_PROTOCOL) += concat.o
3333diff --git a/libavformat/bluray.c b/libavformat/bluray.c
34- index 1845551..0bcfad5 100644
34+ index 1845551..b8312ff 100644
3535--- a/libavformat/bluray.c
3636+++ b/libavformat/bluray.c
3737@@ -20,24 +20,29 @@
@@ -123,7 +123,7 @@ index 1845551..0bcfad5 100644
123123 }
124124-
125125+ bd->access = access;
126- +
126+ +
127127+ if (av_strstart(diskname, "file://", NULL) ||
128128+ av_strstart(diskname, "/", NULL)) {
129129+ //
@@ -198,7 +198,7 @@ index 1845551..0bcfad5 100644
198198 case AVSEEK_SIZE:
199199 return bd_get_title_size(bd->bd);
200200 }
201- @@ -222,6 +267,76 @@ static int64_t bluray_seek(URLContext *h, int64_t pos, int whence)
201+ @@ -222,13 +267,84 @@ static int64_t bluray_seek(URLContext *h, int64_t pos, int whence)
202202 return AVERROR(EINVAL);
203203 }
204204
@@ -275,8 +275,9 @@ index 1845551..0bcfad5 100644
275275
276276 const URLProtocol ff_bluray_protocol = {
277277 .name = "bluray",
278- @@ -229,6 +344,7 @@ const URLProtocol ff_bluray_protocol = {
279- .url_open = bluray_open,
278+ .url_close = bluray_close,
279+ - .url_open = bluray_open,
280+ + .url_open2 = bluray_open,
280281 .url_read = bluray_read,
281282 .url_seek = bluray_seek,
282283+ .url_parse_priv = bluray_parse_priv,
0 commit comments