History

avformat/avio: Schedule AVIODirContext to become an opaque type

Users can't make anything with its content. Making it opaque might allow us to avoid one level of indirection.

Andreas Rheinhardt committed 4 years ago

Commit d09776d1 parent e4beb305 files · +15 −1Browse files

Unified · Split

5 files
  1. doc/APIchanges +3 −0
  2. libavformat/avio.c +6 −0
  3. libavformat/avio.h +4 −0
  4. libavformat/version.h +1 −1
  5. libavformat/version_major.h +1 −0
doc/APIchanges+3−0
@@ -14,6 +14,9 @@ libavutil: 2021-04-27 · 13 unmodified lines
1414
1515 API changes, most recent first:
1616
17+2022-10-03 - xxxxxxxxxx - lavf 59.34.100 - avio.h
18+ Make AVIODirContext an opaque type in a future major version bump.
19+
1720 2022-09-27 - 0c0a3deb18 - lavu 57.38.100 - cpu.h
1821 Add CPU flags for RISC-V vector extensions:
1922 AV_CPU_FLAG_RVV_I32, AV_CPU_FLAG_RVV_F32, AV_CPU_FLAG_RVV_I64,
libavformat/avio.c+6−0
@@ -528,6 +528,12 @@ int ffurl_delete(const char *url) · 527 unmodified lines
528528 return ret;
529529 }
530530
531+#if !FF_API_AVIODIRCONTEXT
532+struct AVIODirContext {
533+ struct URLContext *url_context;
534+};
535+#endif
536+
531537 int avio_open_dir(AVIODirContext **s, const char *url, AVDictionary **options)
532538 {
533539 URLContext *h = NULL;
libavformat/avio.h+4−0
@@ -101,9 +101,13 @@ typedef struct AVIODirEntry { · 100 unmodified lines
101101 int64_t filemode; /**< Unix file mode, -1 if unknown. */
102102 } AVIODirEntry;
103103
104+#if FF_API_AVIODIRCONTEXT
104105 typedef struct AVIODirContext {
105106 struct URLContext *url_context;
106107 } AVIODirContext;
108+#else
109+typedef struct AVIODirContext AVIODirContext;
110+#endif
107111
108112 /**
109113 * Different data types that can be returned via the AVIO
libavformat/version.h+1−1
@@ -31,7 +31,7 @@ · 30 unmodified lines
3131
3232 #include "version_major.h"
3333
34−#define LIBAVFORMAT_VERSION_MINOR 33
34+#define LIBAVFORMAT_VERSION_MINOR 34
3535 #define LIBAVFORMAT_VERSION_MICRO 100
3636
3737 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
libavformat/version_major.h+1−0
@@ -47,6 +47,7 @@ · 46 unmodified lines
4747 #define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60)
4848 #define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59)
4949 #define FF_API_GET_END_PTS (LIBAVFORMAT_VERSION_MAJOR < 60)
50+#define FF_API_AVIODIRCONTEXT (LIBAVFORMAT_VERSION_MAJOR < 60)
5051
5152
5253 #define FF_API_R_FRAME_RATE 1

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t