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
873306f2
Commit
873306f2
authored
Jul 16, 2017
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/framesync2: rename all conflicting symbols.
parent
cffea1b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
36 deletions
+36
-36
framesync2.c
libavfilter/framesync2.c
+21
-21
framesync2.h
libavfilter/framesync2.h
+15
-15
No files found.
libavfilter/framesync2.c
View file @
873306f2
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include "libavutil/avassert.h"
#include "libavutil/avassert.h"
#include "avfilter.h"
#include "avfilter.h"
#include "bufferqueue.h"
#include "bufferqueue.h"
#include "framesync.h"
#include "framesync
2
.h"
#include "internal.h"
#include "internal.h"
#define OFFSET(member) offsetof(FFFrameSync, member)
#define OFFSET(member) offsetof(FFFrameSync, member)
...
@@ -49,7 +49,7 @@ enum {
...
@@ -49,7 +49,7 @@ enum {
STATE_EOF
,
STATE_EOF
,
};
};
int
ff_framesync_init
(
FFFrameSync
*
fs
,
void
*
parent
,
unsigned
nb_in
)
int
ff_framesync
2
_init
(
FFFrameSync
*
fs
,
void
*
parent
,
unsigned
nb_in
)
{
{
fs
->
class
=
&
framesync_class
;
fs
->
class
=
&
framesync_class
;
fs
->
parent
=
parent
;
fs
->
parent
=
parent
;
...
@@ -77,7 +77,7 @@ static void framesync_sync_level_update(FFFrameSync *fs)
...
@@ -77,7 +77,7 @@ static void framesync_sync_level_update(FFFrameSync *fs)
fs
->
eof
=
1
;
fs
->
eof
=
1
;
}
}
int
ff_framesync_configure
(
FFFrameSync
*
fs
)
int
ff_framesync
2
_configure
(
FFFrameSync
*
fs
)
{
{
unsigned
i
;
unsigned
i
;
int64_t
gcd
,
lcm
;
int64_t
gcd
,
lcm
;
...
@@ -202,7 +202,7 @@ static void framesync_inject_frame(FFFrameSync *fs, unsigned in, AVFrame *frame)
...
@@ -202,7 +202,7 @@ static void framesync_inject_frame(FFFrameSync *fs, unsigned in, AVFrame *frame)
fs
->
in
[
in
].
have_next
=
1
;
fs
->
in
[
in
].
have_next
=
1
;
}
}
int
ff_framesync_add_frame
(
FFFrameSync
*
fs
,
unsigned
in
,
AVFrame
*
frame
)
int
ff_framesync
2
_add_frame
(
FFFrameSync
*
fs
,
unsigned
in
,
AVFrame
*
frame
)
{
{
av_assert1
(
in
<
fs
->
nb_in
);
av_assert1
(
in
<
fs
->
nb_in
);
if
(
!
fs
->
in
[
in
].
have_next
)
if
(
!
fs
->
in
[
in
].
have_next
)
...
@@ -212,7 +212,7 @@ int ff_framesync_add_frame(FFFrameSync *fs, unsigned in, AVFrame *frame)
...
@@ -212,7 +212,7 @@ int ff_framesync_add_frame(FFFrameSync *fs, unsigned in, AVFrame *frame)
return
0
;
return
0
;
}
}
void
ff_framesync_next
(
FFFrameSync
*
fs
)
void
ff_framesync
2
_next
(
FFFrameSync
*
fs
)
{
{
unsigned
i
;
unsigned
i
;
...
@@ -224,13 +224,13 @@ void ff_framesync_next(FFFrameSync *fs)
...
@@ -224,13 +224,13 @@ void ff_framesync_next(FFFrameSync *fs)
framesync_advance
(
fs
);
framesync_advance
(
fs
);
}
}
void
ff_framesync_drop
(
FFFrameSync
*
fs
)
void
ff_framesync
2
_drop
(
FFFrameSync
*
fs
)
{
{
fs
->
frame_ready
=
0
;
fs
->
frame_ready
=
0
;
}
}
int
ff_framesync_get_frame
(
FFFrameSync
*
fs
,
unsigned
in
,
AVFrame
**
rframe
,
int
ff_framesync
2
_get_frame
(
FFFrameSync
*
fs
,
unsigned
in
,
AVFrame
**
rframe
,
unsigned
get
)
unsigned
get
)
{
{
AVFrame
*
frame
;
AVFrame
*
frame
;
unsigned
need_copy
=
0
,
i
;
unsigned
need_copy
=
0
,
i
;
...
@@ -266,7 +266,7 @@ int ff_framesync_get_frame(FFFrameSync *fs, unsigned in, AVFrame **rframe,
...
@@ -266,7 +266,7 @@ int ff_framesync_get_frame(FFFrameSync *fs, unsigned in, AVFrame **rframe,
return
0
;
return
0
;
}
}
void
ff_framesync_uninit
(
FFFrameSync
*
fs
)
void
ff_framesync
2
_uninit
(
FFFrameSync
*
fs
)
{
{
unsigned
i
;
unsigned
i
;
...
@@ -279,18 +279,18 @@ void ff_framesync_uninit(FFFrameSync *fs)
...
@@ -279,18 +279,18 @@ void ff_framesync_uninit(FFFrameSync *fs)
av_freep
(
&
fs
->
in
);
av_freep
(
&
fs
->
in
);
}
}
int
ff_framesync_process_frame
(
FFFrameSync
*
fs
,
unsigned
all
)
int
ff_framesync
2
_process_frame
(
FFFrameSync
*
fs
,
unsigned
all
)
{
{
int
ret
,
count
=
0
;
int
ret
,
count
=
0
;
av_assert0
(
fs
->
on_event
);
av_assert0
(
fs
->
on_event
);
while
(
1
)
{
while
(
1
)
{
ff_framesync_next
(
fs
);
ff_framesync
2
_next
(
fs
);
if
(
fs
->
eof
||
!
fs
->
frame_ready
)
if
(
fs
->
eof
||
!
fs
->
frame_ready
)
break
;
break
;
if
((
ret
=
fs
->
on_event
(
fs
))
<
0
)
if
((
ret
=
fs
->
on_event
(
fs
))
<
0
)
return
ret
;
return
ret
;
ff_framesync_drop
(
fs
);
ff_framesync
2
_drop
(
fs
);
count
++
;
count
++
;
if
(
!
all
)
if
(
!
all
)
break
;
break
;
...
@@ -300,26 +300,26 @@ int ff_framesync_process_frame(FFFrameSync *fs, unsigned all)
...
@@ -300,26 +300,26 @@ int ff_framesync_process_frame(FFFrameSync *fs, unsigned all)
return
count
;
return
count
;
}
}
int
ff_framesync_filter_frame
(
FFFrameSync
*
fs
,
AVFilterLink
*
inlink
,
int
ff_framesync
2
_filter_frame
(
FFFrameSync
*
fs
,
AVFilterLink
*
inlink
,
AVFrame
*
in
)
AVFrame
*
in
)
{
{
int
ret
;
int
ret
;
if
((
ret
=
ff_framesync_process_frame
(
fs
,
1
))
<
0
)
if
((
ret
=
ff_framesync
2
_process_frame
(
fs
,
1
))
<
0
)
return
ret
;
return
ret
;
if
((
ret
=
ff_framesync_add_frame
(
fs
,
FF_INLINK_IDX
(
inlink
),
in
))
<
0
)
if
((
ret
=
ff_framesync
2
_add_frame
(
fs
,
FF_INLINK_IDX
(
inlink
),
in
))
<
0
)
return
ret
;
return
ret
;
if
((
ret
=
ff_framesync_process_frame
(
fs
,
0
))
<
0
)
if
((
ret
=
ff_framesync
2
_process_frame
(
fs
,
0
))
<
0
)
return
ret
;
return
ret
;
return
0
;
return
0
;
}
}
int
ff_framesync_request_frame
(
FFFrameSync
*
fs
,
AVFilterLink
*
outlink
)
int
ff_framesync
2
_request_frame
(
FFFrameSync
*
fs
,
AVFilterLink
*
outlink
)
{
{
AVFilterContext
*
ctx
=
outlink
->
src
;
AVFilterContext
*
ctx
=
outlink
->
src
;
int
input
,
ret
,
i
;
int
input
,
ret
,
i
;
if
((
ret
=
ff_framesync_process_frame
(
fs
,
0
))
<
0
)
if
((
ret
=
ff_framesync
2
_process_frame
(
fs
,
0
))
<
0
)
return
ret
;
return
ret
;
if
(
ret
>
0
)
if
(
ret
>
0
)
return
0
;
return
0
;
...
@@ -333,9 +333,9 @@ int ff_framesync_request_frame(FFFrameSync *fs, AVFilterLink *outlink)
...
@@ -333,9 +333,9 @@ int ff_framesync_request_frame(FFFrameSync *fs, AVFilterLink *outlink)
input
=
i
;
input
=
i
;
ret
=
ff_request_frame
(
ctx
->
inputs
[
input
]);
ret
=
ff_request_frame
(
ctx
->
inputs
[
input
]);
if
(
ret
==
AVERROR_EOF
)
{
if
(
ret
==
AVERROR_EOF
)
{
if
((
ret
=
ff_framesync_add_frame
(
fs
,
input
,
NULL
))
<
0
)
if
((
ret
=
ff_framesync
2
_add_frame
(
fs
,
input
,
NULL
))
<
0
)
return
ret
;
return
ret
;
if
((
ret
=
ff_framesync_process_frame
(
fs
,
0
))
<
0
)
if
((
ret
=
ff_framesync
2
_process_frame
(
fs
,
0
))
<
0
)
return
ret
;
return
ret
;
ret
=
0
;
ret
=
0
;
}
}
...
...
libavfilter/framesync2.h
View file @
873306f2
...
@@ -44,13 +44,13 @@
...
@@ -44,13 +44,13 @@
* The basic working of this API is the following:
* The basic working of this API is the following:
*
*
* - When a frame is available on any input, add it using
* - When a frame is available on any input, add it using
* ff_framesync_add_frame().
* ff_framesync
2
_add_frame().
*
*
* - When a frame event is ready to be processed (i.e. after adding a frame
* - When a frame event is ready to be processed (i.e. after adding a frame
* or when requested on input):
* or when requested on input):
* - call ff_framesync_next();
* - call ff_framesync
2
_next();
* - if fs->frame_ready is true, process the frames;
* - if fs->frame_ready is true, process the frames;
* - call ff_framesync_drop().
* - call ff_framesync
2
_drop().
*/
*/
/**
/**
...
@@ -217,7 +217,7 @@ typedef struct FFFrameSync {
...
@@ -217,7 +217,7 @@ typedef struct FFFrameSync {
* @param nb_in number of inputs
* @param nb_in number of inputs
* @return >= 0 for success or a negative error code
* @return >= 0 for success or a negative error code
*/
*/
int
ff_framesync_init
(
FFFrameSync
*
fs
,
void
*
parent
,
unsigned
nb_in
);
int
ff_framesync
2
_init
(
FFFrameSync
*
fs
,
void
*
parent
,
unsigned
nb_in
);
/**
/**
* Configure a frame sync structure.
* Configure a frame sync structure.
...
@@ -226,12 +226,12 @@ int ff_framesync_init(FFFrameSync *fs, void *parent, unsigned nb_in);
...
@@ -226,12 +226,12 @@ int ff_framesync_init(FFFrameSync *fs, void *parent, unsigned nb_in);
*
*
* @return >= 0 for success or a negative error code
* @return >= 0 for success or a negative error code
*/
*/
int
ff_framesync_configure
(
FFFrameSync
*
fs
);
int
ff_framesync
2
_configure
(
FFFrameSync
*
fs
);
/**
/**
* Free all memory currently allocated.
* Free all memory currently allocated.
*/
*/
void
ff_framesync_uninit
(
FFFrameSync
*
fs
);
void
ff_framesync
2
_uninit
(
FFFrameSync
*
fs
);
/**
/**
* Add a frame to an input
* Add a frame to an input
...
@@ -242,19 +242,19 @@ void ff_framesync_uninit(FFFrameSync *fs);
...
@@ -242,19 +242,19 @@ void ff_framesync_uninit(FFFrameSync *fs);
* @param in index of the input
* @param in index of the input
* @param frame input frame, or NULL for EOF
* @param frame input frame, or NULL for EOF
*/
*/
int
ff_framesync_add_frame
(
FFFrameSync
*
fs
,
unsigned
in
,
AVFrame
*
frame
);
int
ff_framesync
2
_add_frame
(
FFFrameSync
*
fs
,
unsigned
in
,
AVFrame
*
frame
);
/**
/**
* Prepare the next frame event.
* Prepare the next frame event.
*
*
* The status of the operation can be found in fs->frame_ready and fs->eof.
* The status of the operation can be found in fs->frame_ready and fs->eof.
*/
*/
void
ff_framesync_next
(
FFFrameSync
*
fs
);
void
ff_framesync
2
_next
(
FFFrameSync
*
fs
);
/**
/**
* Drop the current frame event.
* Drop the current frame event.
*/
*/
void
ff_framesync_drop
(
FFFrameSync
*
fs
);
void
ff_framesync
2
_drop
(
FFFrameSync
*
fs
);
/**
/**
* Get the current frame in an input.
* Get the current frame in an input.
...
@@ -266,15 +266,15 @@ void ff_framesync_drop(FFFrameSync *fs);
...
@@ -266,15 +266,15 @@ void ff_framesync_drop(FFFrameSync *fs);
* the returned frame; the current frame will either be
* the returned frame; the current frame will either be
* duplicated or removed from the framesync structure
* duplicated or removed from the framesync structure
*/
*/
int
ff_framesync_get_frame
(
FFFrameSync
*
fs
,
unsigned
in
,
AVFrame
**
rframe
,
int
ff_framesync
2
_get_frame
(
FFFrameSync
*
fs
,
unsigned
in
,
AVFrame
**
rframe
,
unsigned
get
);
unsigned
get
);
/**
/**
* Process one or several frame using the on_event callback.
* Process one or several frame using the on_event callback.
*
*
* @return number of frames processed or negative error code
* @return number of frames processed or negative error code
*/
*/
int
ff_framesync_process_frame
(
FFFrameSync
*
fs
,
unsigned
all
);
int
ff_framesync
2
_process_frame
(
FFFrameSync
*
fs
,
unsigned
all
);
/**
/**
...
@@ -283,8 +283,8 @@ int ff_framesync_process_frame(FFFrameSync *fs, unsigned all);
...
@@ -283,8 +283,8 @@ int ff_framesync_process_frame(FFFrameSync *fs, unsigned all);
* This function can be the complete implementation of all filter_frame
* This function can be the complete implementation of all filter_frame
* methods of a filter using framesync.
* methods of a filter using framesync.
*/
*/
int
ff_framesync_filter_frame
(
FFFrameSync
*
fs
,
AVFilterLink
*
inlink
,
int
ff_framesync
2
_filter_frame
(
FFFrameSync
*
fs
,
AVFilterLink
*
inlink
,
AVFrame
*
in
);
AVFrame
*
in
);
/**
/**
* Request a frame on the filter output.
* Request a frame on the filter output.
...
@@ -292,6 +292,6 @@ int ff_framesync_filter_frame(FFFrameSync *fs, AVFilterLink *inlink,
...
@@ -292,6 +292,6 @@ int ff_framesync_filter_frame(FFFrameSync *fs, AVFilterLink *inlink,
* This function can be the complete implementation of all filter_frame
* This function can be the complete implementation of all filter_frame
* methods of a filter using framesync if it has only one output.
* methods of a filter using framesync if it has only one output.
*/
*/
int
ff_framesync_request_frame
(
FFFrameSync
*
fs
,
AVFilterLink
*
outlink
);
int
ff_framesync
2
_request_frame
(
FFFrameSync
*
fs
,
AVFilterLink
*
outlink
);
#endif
/* AVFILTER_FRAMESYNC2_H */
#endif
/* AVFILTER_FRAMESYNC2_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