History

lavfi/framesync2: add dualinput helper functions.

Nicolas George committed 9 years ago

Commit 0ae8df41 parent 6bde4752 files · +103 −21Browse files

Showing the changes to libavfilter/framesync2.h (1 of 2 files). Show all

Unified · Split

libavfilter/framesync2.h+25−0
@@ -245,4 +245,29 @@ int ff_framesync2_get_frame(FFFrameSync *fs, unsigned in, AVFrame **rframe, · 244 unmodified lines
245245 */
246246 int ff_framesync2_activate(FFFrameSync *fs);
247247
248+/**
249+ * Initialize a frame sync structure for dualinput.
250+ *
251+ * Compared to generic framesync, dualinput assumes the first input is the
252+ * main one and the filtering is performed on it. The first input will be
253+ * the only one with sync set and generic timeline support will just pass it
254+ * unchanged when disabled.
255+ *
256+ * Equivalent to ff_framesync2_init(fs, parent, 2) then setting the time
257+ * base, sync and ext modes on the inputs.
258+ */
259+int ff_framesync2_init_dualinput(FFFrameSync *fs, AVFilterContext *parent);
260+
261+/**
262+ * @param f0 used to return the main frame
263+ * @param f1 used to return the second frame, or NULL if disabled
264+ * @return >=0 for success or AVERROR code
265+ */
266+int ff_framesync2_dualinput_get(FFFrameSync *fs, AVFrame **f0, AVFrame **f1);
267+
268+/**
269+ * Same as ff_framesync2_dualinput_get(), but make sure that f0 is writable.
270+ */
271+int ff_framesync2_dualinput_get_writable(FFFrameSync *fs, AVFrame **f0, AVFrame **f1);
272+
248273 #endif /* AVFILTER_FRAMESYNC2_H */

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