Skip to content

Commit 7eb8eb4

Browse files
committed
update bluray patches
1 parent ef6d5be commit 7eb8eb4

File tree

2 files changed

+25
-29
lines changed

2 files changed

+25
-29
lines changed

patches/ffmpeg-n6.1/0021-custom-bluray-fs-for-network-Blu-ray-Disc.patch

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
From e5f96675faf5ba841c0285e0026c26f252b02748 Mon Sep 17 00:00:00 2001
1+
From 95222d1fad494d3b368552bbf65db22c994d2b8c Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
3-
Date: Mon, 30 Sep 2024 15:30:00 +0800
3+
Date: Mon, 30 Sep 2024 18:03:00 +0800
44
Subject: [PATCH 21] custom bluray fs for network Blu-ray Disc
55

66
---
77
libavformat/Makefile | 2 +-
8-
libavformat/bluray.c | 20 +++-
8+
libavformat/bluray.c | 22 ++--
99
libavformat/bluray_custom_fs.c | 190 +++++++++++++++++++++++++++++++++
1010
libavformat/bluray_custom_fs.h | 29 +++++
11-
4 files changed, 235 insertions(+), 6 deletions(-)
11+
4 files changed, 236 insertions(+), 7 deletions(-)
1212
create mode 100644 libavformat/bluray_custom_fs.c
1313
create mode 100644 libavformat/bluray_custom_fs.h
1414

@@ -26,18 +26,20 @@ index faaeab0..5abe34c 100644
2626
OBJS-$(CONFIG_CONCAT_PROTOCOL) += concat.o
2727
OBJS-$(CONFIG_CONCATF_PROTOCOL) += concat.o
2828
diff --git a/libavformat/bluray.c b/libavformat/bluray.c
29-
index bf5b88d..4b00c99 100644
29+
index bf5b88d..4b07fb1 100644
3030
--- a/libavformat/bluray.c
3131
+++ b/libavformat/bluray.c
32-
@@ -27,6 +27,7 @@
32+
@@ -27,15 +27,16 @@
3333
#include "libavutil/opt.h"
3434
#include "libavutil/dict.h"
3535
#include "libavformat/avformat.h"
3636
+#include "bluray_custom_fs.h"
3737

38-
#define BLURAY_PROTO_PREFIX "bluray:"
38+
-#define BLURAY_PROTO_PREFIX "bluray:"
39+
+#define BLURAY_PROTO_PREFIX "bluray://"
3940
#define MIN_PLAYLIST_LENGTH 180 /* 3 min */
40-
@@ -35,7 +36,7 @@ typedef struct {
41+
42+
typedef struct {
4143
const AVClass *class;
4244

4345
BLURAY *bd;

patches/ffmpeg-n6.1/0022-public-ff_is_bluray_video-func.patch

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
From a399d951e3cbebc74d50e7541098bd7d69726270 Mon Sep 17 00:00:00 2001
1+
From 78b23ccfadff2e4af94406663a54c9f0ea5f92ad Mon Sep 17 00:00:00 2001
22
From: qianlongxu <qianlongxu@gmail.com>
3-
Date: Mon, 30 Sep 2024 16:36:03 +0800
3+
Date: Mon, 30 Sep 2024 18:09:41 +0800
44
Subject: [PATCH 22] public ff_is_bluray_video func
55

66
---
77
libavformat/Makefile | 1 +
8-
libavformat/bluray.c | 30 ++++++++++++++++++++++++++++++
8+
libavformat/bluray.c | 27 +++++++++++++++++++++++++++
99
libavformat/bluray_util.h | 27 +++++++++++++++++++++++++++
10-
3 files changed, 58 insertions(+)
10+
3 files changed, 55 insertions(+)
1111
create mode 100644 libavformat/bluray_util.h
1212

1313
diff --git a/libavformat/Makefile b/libavformat/Makefile
@@ -23,7 +23,7 @@ index 5abe34c..29c42ee 100644
2323
OBJS = allformats.o \
2424
avformat.o \
2525
diff --git a/libavformat/bluray.c b/libavformat/bluray.c
26-
index 4b00c99..08649b6 100644
26+
index 4b07fb1..edeceb5 100644
2727
--- a/libavformat/bluray.c
2828
+++ b/libavformat/bluray.c
2929
@@ -28,6 +28,7 @@
@@ -32,31 +32,29 @@ index 4b00c99..08649b6 100644
3232
#include "bluray_custom_fs.h"
3333
+#include "bluray_util.h"
3434

35-
#define BLURAY_PROTO_PREFIX "bluray:"
35+
#define BLURAY_PROTO_PREFIX "bluray://"
3636
#define MIN_PLAYLIST_LENGTH 180 /* 3 min */
37-
@@ -127,6 +128,35 @@ static void bluray_DebugHandler(const char *psz)
38-
}
39-
#endif
40-
37+
@@ -338,3 +339,29 @@ const URLProtocol ff_bluray_protocol = {
38+
.priv_data_size = sizeof(BlurayContext),
39+
.priv_data_class = &bluray_context_class,
40+
};
41+
+
4142
+int ff_is_bluray_video(const char *path, AVDictionary **options)
4243
+{
4344
+#ifdef DEBUG_BLURAY
4445
+ bd_set_debug_mask(BLURAY_DEBUG_MASK);
4546
+ bd_set_debug_handler(bluray_DebugHandler);
4647
+#endif
47-
+ const char *diskname = path;
48-
+
49-
+ av_strstart(path, BLURAY_PROTO_PREFIX, &diskname);
50-
+
48+
+
5149
+ fs_access *access = NULL;
5250
+
53-
+ if (av_strstart(diskname, "file://", NULL) || av_strstart(diskname, "/", NULL)) {
51+
+ if (av_strstart(path, "file://", NULL) || av_strstart(path, "/", NULL)) {
5452
+ access = NULL;
5553
+ } else {
56-
+ access = create_bluray_custom_access(diskname, options);
54+
+ access = create_bluray_custom_access(path, options);
5755
+ }
5856
+
59-
+ BLURAY *bd = bd_open_fs(diskname, NULL, access);
57+
+ BLURAY *bd = bd_open_fs(path, NULL, access);
6058
+ if (!bd) {
6159
+ destroy_bluray_custom_access(&access);
6260
+ av_log(NULL, AV_LOG_ERROR, "bd_open() failed\n");
@@ -66,10 +64,6 @@ index 4b00c99..08649b6 100644
6664
+ destroy_bluray_custom_access(&access);
6765
+ return 1;
6866
+}
69-
+
70-
static int bluray_open(URLContext *h, const char *path, int flags, AVDictionary **options)
71-
{
72-
#ifdef DEBUG_BLURAY
7367
diff --git a/libavformat/bluray_util.h b/libavformat/bluray_util.h
7468
new file mode 100644
7569
index 0000000..62301b2

0 commit comments

Comments
 (0)