Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
02aea61d
Commit
02aea61d
authored
Jan 25, 2024
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat: remove deprecated FF_API_AVIO_WRITE_NONCONST
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
d6799ee0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
0 additions
and
66 deletions
+0
-66
avio.c
libavformat/avio.c
+0
-4
avio.h
libavformat/avio.h
+0
-13
avio_internal.h
libavformat/avio_internal.h
+0
-4
aviobuf.c
libavformat/aviobuf.c
+0
-28
hdsenc.c
libavformat/hdsenc.c
+0
-4
smoothstreamingenc.c
libavformat/smoothstreamingenc.c
+0
-4
url.h
libavformat/url.h
+0
-8
version_major.h
libavformat/version_major.h
+0
-1
No files found.
libavformat/avio.c
View file @
02aea61d
...
...
@@ -560,11 +560,7 @@ int ffurl_read_complete(URLContext *h, unsigned char *buf, int size)
return
retry_transfer_wrapper
(
h
,
buf
,
NULL
,
size
,
size
,
1
);
}
#if FF_API_AVIO_WRITE_NONCONST
int
ffurl_write2
(
void
*
urlcontext
,
uint8_t
*
buf
,
int
size
)
#else
int
ffurl_write2
(
void
*
urlcontext
,
const
uint8_t
*
buf
,
int
size
)
#endif
{
URLContext
*
h
=
urlcontext
;
...
...
libavformat/avio.h
View file @
02aea61d
...
...
@@ -232,11 +232,7 @@ typedef struct AVIOContext {
void
*
opaque
;
/**< A private pointer, passed to the read/write/seek/...
functions. */
int
(
*
read_packet
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
);
#if FF_API_AVIO_WRITE_NONCONST
int
(
*
write_packet
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
);
#else
int
(
*
write_packet
)(
void
*
opaque
,
const
uint8_t
*
buf
,
int
buf_size
);
#endif
int64_t
(
*
seek
)(
void
*
opaque
,
int64_t
offset
,
int
whence
);
int64_t
pos
;
/**< position in the file of the current buffer */
int
eof_reached
;
/**< true if was unable to read due to error or eof */
...
...
@@ -284,13 +280,8 @@ typedef struct AVIOContext {
/**
* A callback that is used instead of write_packet.
*/
#if FF_API_AVIO_WRITE_NONCONST
int
(
*
write_data_type
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
,
enum
AVIODataMarkerType
type
,
int64_t
time
);
#else
int
(
*
write_data_type
)(
void
*
opaque
,
const
uint8_t
*
buf
,
int
buf_size
,
enum
AVIODataMarkerType
type
,
int64_t
time
);
#endif
/**
* If set, don't call write_data_type separately for AVIO_DATA_MARKER_BOUNDARY_POINT,
* but ignore them and treat them as AVIO_DATA_MARKER_UNKNOWN (to avoid needlessly
...
...
@@ -410,11 +401,7 @@ AVIOContext *avio_alloc_context(
int
write_flag
,
void
*
opaque
,
int
(
*
read_packet
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
),
#if FF_API_AVIO_WRITE_NONCONST
int
(
*
write_packet
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
),
#else
int
(
*
write_packet
)(
void
*
opaque
,
const
uint8_t
*
buf
,
int
buf_size
),
#endif
int64_t
(
*
seek
)(
void
*
opaque
,
int64_t
offset
,
int
whence
));
/**
...
...
libavformat/avio_internal.h
View file @
02aea61d
...
...
@@ -89,11 +89,7 @@ void ffio_init_context(FFIOContext *s,
int
write_flag
,
void
*
opaque
,
int
(
*
read_packet
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
),
#if FF_API_AVIO_WRITE_NONCONST
int
(
*
write_packet
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
),
#else
int
(
*
write_packet
)(
void
*
opaque
,
const
uint8_t
*
buf
,
int
buf_size
),
#endif
int64_t
(
*
seek
)(
void
*
opaque
,
int64_t
offset
,
int
whence
));
/**
...
...
libavformat/aviobuf.c
View file @
02aea61d
...
...
@@ -52,11 +52,7 @@ void ffio_init_context(FFIOContext *ctx,
int
write_flag
,
void
*
opaque
,
int
(
*
read_packet
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
),
#if FF_API_AVIO_WRITE_NONCONST
int
(
*
write_packet
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
),
#else
int
(
*
write_packet
)(
void
*
opaque
,
const
uint8_t
*
buf
,
int
buf_size
),
#endif
int64_t
(
*
seek
)(
void
*
opaque
,
int64_t
offset
,
int
whence
))
{
AVIOContext
*
const
s
=
&
ctx
->
pub
;
...
...
@@ -115,11 +111,7 @@ AVIOContext *avio_alloc_context(
int
write_flag
,
void
*
opaque
,
int
(
*
read_packet
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
),
#if FF_API_AVIO_WRITE_NONCONST
int
(
*
write_packet
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
),
#else
int
(
*
write_packet
)(
void
*
opaque
,
const
uint8_t
*
buf
,
int
buf_size
),
#endif
int64_t
(
*
seek
)(
void
*
opaque
,
int64_t
offset
,
int
whence
))
{
FFIOContext
*
s
=
av_malloc
(
sizeof
(
*
s
));
...
...
@@ -141,20 +133,12 @@ static void writeout(AVIOContext *s, const uint8_t *data, int len)
if
(
!
s
->
error
)
{
int
ret
=
0
;
if
(
s
->
write_data_type
)
#if FF_API_AVIO_WRITE_NONCONST
ret
=
s
->
write_data_type
(
s
->
opaque
,
(
uint8_t
*
)
data
,
#else
ret
=
s
->
write_data_type
(
s
->
opaque
,
data
,
#endif
len
,
ctx
->
current_type
,
ctx
->
last_time
);
else
if
(
s
->
write_packet
)
#if FF_API_AVIO_WRITE_NONCONST
ret
=
s
->
write_packet
(
s
->
opaque
,
(
uint8_t
*
)
data
,
len
);
#else
ret
=
s
->
write_packet
(
s
->
opaque
,
data
,
len
);
#endif
if
(
ret
<
0
)
{
s
->
error
=
ret
;
}
else
{
...
...
@@ -1290,11 +1274,7 @@ typedef struct DynBuffer {
uint8_t
io_buffer
[
1
];
}
DynBuffer
;
#if FF_API_AVIO_WRITE_NONCONST
static
int
dyn_buf_write
(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
)
#else
static
int
dyn_buf_write
(
void
*
opaque
,
const
uint8_t
*
buf
,
int
buf_size
)
#endif
{
DynBuffer
*
d
=
opaque
;
unsigned
new_size
;
...
...
@@ -1326,11 +1306,7 @@ static int dyn_buf_write(void *opaque, const uint8_t *buf, int buf_size)
return
buf_size
;
}
#if FF_API_AVIO_WRITE_NONCONST
static
int
dyn_packet_buf_write
(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
)
#else
static
int
dyn_packet_buf_write
(
void
*
opaque
,
const
uint8_t
*
buf
,
int
buf_size
)
#endif
{
unsigned
char
buf1
[
4
];
int
ret
;
...
...
@@ -1467,11 +1443,7 @@ void ffio_free_dyn_buf(AVIOContext **s)
avio_context_free
(
s
);
}
#if FF_API_AVIO_WRITE_NONCONST
static
int
null_buf_write
(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
)
#else
static
int
null_buf_write
(
void
*
opaque
,
const
uint8_t
*
buf
,
int
buf_size
)
#endif
{
DynBuffer
*
d
=
opaque
;
...
...
libavformat/hdsenc.c
View file @
02aea61d
...
...
@@ -112,11 +112,7 @@ static int parse_header(OutputStream *os, const uint8_t *buf, int buf_size)
return
0
;
}
#if FF_API_AVIO_WRITE_NONCONST
static
int
hds_write
(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
)
#else
static
int
hds_write
(
void
*
opaque
,
const
uint8_t
*
buf
,
int
buf_size
)
#endif
{
OutputStream
*
os
=
opaque
;
if
(
os
->
out
)
{
...
...
libavformat/smoothstreamingenc.c
View file @
02aea61d
...
...
@@ -75,11 +75,7 @@ typedef struct SmoothStreamingContext {
int
nb_fragments
;
}
SmoothStreamingContext
;
#if FF_API_AVIO_WRITE_NONCONST
static
int
ism_write
(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
)
#else
static
int
ism_write
(
void
*
opaque
,
const
uint8_t
*
buf
,
int
buf_size
)
#endif
{
OutputStream
*
os
=
opaque
;
if
(
os
->
out
)
...
...
libavformat/url.h
View file @
02aea61d
...
...
@@ -192,11 +192,7 @@ static inline int ffurl_read(URLContext *h, uint8_t *buf, int size)
*/
int
ffurl_read_complete
(
URLContext
*
h
,
unsigned
char
*
buf
,
int
size
);
#if FF_API_AVIO_WRITE_NONCONST
int
ffurl_write2
(
void
*
urlcontext
,
uint8_t
*
buf
,
int
size
);
#else
int
ffurl_write2
(
void
*
urlcontext
,
const
uint8_t
*
buf
,
int
size
);
#endif
/**
* Write size bytes from buf to the resource accessed by h.
*
...
...
@@ -205,11 +201,7 @@ int ffurl_write2(void *urlcontext, const uint8_t *buf, int size);
*/
static
inline
int
ffurl_write
(
URLContext
*
h
,
const
uint8_t
*
buf
,
int
size
)
{
#if FF_API_AVIO_WRITE_NONCONST
return
ffurl_write2
(
h
,
(
uint8_t
*
)
buf
,
size
);
#else
return
ffurl_write2
(
h
,
buf
,
size
);
#endif
}
int64_t
ffurl_seek2
(
void
*
urlcontext
,
int64_t
pos
,
int
whence
);
...
...
libavformat/version_major.h
View file @
02aea61d
...
...
@@ -42,7 +42,6 @@
*
*/
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 61)
#define FF_API_AVIO_WRITE_NONCONST (LIBAVFORMAT_VERSION_MAJOR < 61)
#define FF_API_LAVF_SHORTEST (LIBAVFORMAT_VERSION_MAJOR < 61)
#define FF_API_ALLOW_FLUSH (LIBAVFORMAT_VERSION_MAJOR < 61)
#define FF_API_AVSTREAM_SIDE_DATA (LIBAVFORMAT_VERSION_MAJOR < 61)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment