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.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/388/head
Andreas Rheinhardt 2 years ago
parent e4beb307ab
commit d09776d486
  1. 3
      doc/APIchanges
  2. 6
      libavformat/avio.c
  3. 4
      libavformat/avio.h
  4. 2
      libavformat/version.h
  5. 1
      libavformat/version_major.h

@ -14,6 +14,9 @@ libavutil: 2021-04-27
API changes, most recent first:
2022-10-03 - xxxxxxxxxx - lavf 59.34.100 - avio.h
Make AVIODirContext an opaque type in a future major version bump.
2022-09-27 - 0c0a3deb18 - lavu 57.38.100 - cpu.h
Add CPU flags for RISC-V vector extensions:
AV_CPU_FLAG_RVV_I32, AV_CPU_FLAG_RVV_F32, AV_CPU_FLAG_RVV_I64,

@ -528,6 +528,12 @@ int ffurl_delete(const char *url)
return ret;
}
#if !FF_API_AVIODIRCONTEXT
struct AVIODirContext {
struct URLContext *url_context;
};
#endif
int avio_open_dir(AVIODirContext **s, const char *url, AVDictionary **options)
{
URLContext *h = NULL;

@ -101,9 +101,13 @@ typedef struct AVIODirEntry {
int64_t filemode; /**< Unix file mode, -1 if unknown. */
} AVIODirEntry;
#if FF_API_AVIODIRCONTEXT
typedef struct AVIODirContext {
struct URLContext *url_context;
} AVIODirContext;
#else
typedef struct AVIODirContext AVIODirContext;
#endif
/**
* Different data types that can be returned via the AVIO

@ -31,7 +31,7 @@
#include "version_major.h"
#define LIBAVFORMAT_VERSION_MINOR 33
#define LIBAVFORMAT_VERSION_MINOR 34
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

@ -47,6 +47,7 @@
#define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59)
#define FF_API_GET_END_PTS (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_API_AVIODIRCONTEXT (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_API_R_FRAME_RATE 1

Loading…
Cancel
Save