Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
45f511ec
Commit
45f511ec
authored
Nov 07, 2011
by
Martin Storsjö
Committed by
Anton Khirnov
Nov 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: Mark the old interrupt callback mechanism as deprecated
Prepare for removing it at an upcoming major bump.
parent
40972f7c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
avio.c
libavformat/avio.c
+9
-1
avio.h
libavformat/avio.h
+5
-1
version.h
libavformat/version.h
+3
-0
No files found.
libavformat/avio.c
View file @
45f511ec
...
...
@@ -83,9 +83,11 @@ const AVClass ffurl_context_class = {
};
/*@}*/
static
int
default_interrupt_cb
(
void
);
#if FF_API_OLD_INTERRUPT_CB
static
int
default_interrupt_cb
(
void
);
int
(
*
url_interrupt_cb
)(
void
)
=
default_interrupt_cb
;
#endif
#if FF_API_OLD_AVIO
URLProtocol
*
av_protocol_next
(
URLProtocol
*
p
)
...
...
@@ -441,6 +443,7 @@ int ffurl_get_file_handle(URLContext *h)
return
h
->
prot
->
url_get_file_handle
(
h
);
}
#if FF_API_OLD_INTERRUPT_CB
static
int
default_interrupt_cb
(
void
)
{
return
0
;
...
...
@@ -452,13 +455,18 @@ void avio_set_interrupt_cb(int (*interrupt_cb)(void))
interrupt_cb
=
default_interrupt_cb
;
url_interrupt_cb
=
interrupt_cb
;
}
#endif
int
ff_check_interrupt
(
AVIOInterruptCB
*
cb
)
{
int
ret
;
if
(
cb
&&
cb
->
callback
&&
(
ret
=
cb
->
callback
(
cb
->
opaque
)))
return
ret
;
#if FF_API_OLD_INTERRUPT_CB
return
url_interrupt_cb
();
#else
return
0
;
#endif
}
#if FF_API_OLD_AVIO
...
...
libavformat/avio.h
View file @
45f511ec
...
...
@@ -389,13 +389,17 @@ attribute_deprecated int url_exist(const char *url);
*/
int
avio_check
(
const
char
*
url
,
int
flags
);
#if FF_API_OLD_INTERRUPT_CB
/**
* The callback is called in blocking functions to test regulary if
* asynchronous interruption is needed. AVERROR_EXIT is returned
* in this case by the interrupted function. 'NULL' means no interrupt
* callback is given.
* @deprecated Use interrupt_callback in AVFormatContext/avio_open2
* instead.
*/
void
avio_set_interrupt_cb
(
int
(
*
interrupt_cb
)(
void
));
attribute_deprecated
void
avio_set_interrupt_cb
(
int
(
*
interrupt_cb
)(
void
));
#endif
/**
* Allocate and initialize an AVIOContext for buffered I/O. It must be later
...
...
libavformat/version.h
View file @
45f511ec
...
...
@@ -110,5 +110,8 @@
#ifndef FF_API_REORDER_PRIVATE
#define FF_API_REORDER_PRIVATE (LIBAVFORMAT_VERSION_MAJOR < 54)
#endif
#ifndef FF_API_OLD_INTERRUPT_CB
#define FF_API_OLD_INTERRUPT_CB (LIBAVFORMAT_VERSION_MAJOR < 54)
#endif
#endif
/* AVFORMAT_VERSION_H */
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