Anton Khirnov
803391f719
lavfi: remove request/poll and drawing functions from public API on next bump
They are only useful inside filters and we don't allow user filters for
now.
13 years ago
Anton Khirnov
b74a1da49d
lavfi: make formats API private on next bump.
It is only useful inside filters and we don't allow user filters for
now.
13 years ago
Stefano Sabatini
0f0f3bd1e0
lavfi: use av_default_item_name() as filter private context logger
avfilter_default_filter_name() is supposed to access an AVFilterContext
struct, if used with a private struct it will cause a crash since it will
access fields which are non defined in the private struct.
13 years ago
Stefano Sabatini
4d6a8a2bdb
lavfi: add avfilter_default_filter_name()
The function is modelled after av_default_item_name(), and will print the
name of the instance filter if defined, otherwise the name of the filter.
This allows to show the instance name in the log, which is useful when
debugging complex filter graphs.
13 years ago
Anton Khirnov
c04c533f62
lavfi: remove avfilter_null_* from public API on next bump.
Those functions are only useful inside filters. It is better to not
support user filters until the API is more stable.
13 years ago
Stefano Sabatini
126ba1626e
lavfi/drawtext: give a new alias "timecode_rate" to the the r/rate option
The option is related to the timecode, the new name clearly specifies the
context. Also it allows to list the option close to the other timecode
options.
13 years ago
Stefano Sabatini
eb07f4ccb5
lavfi/drawtext: rename and document variables d_expr and d_pexpr
Use the more expressive names draw_expr and draw_pexpr, also more
consistent.
13 years ago
Stefano Sabatini
65d2b2fbe4
lavfi/drawtext: alphabetically sort the expression parameters
13 years ago
Nicolas George
40b7a27bad
vf_drawtext: fontconfig support.
13 years ago
Nicolas George
be9b0d2c5a
vf_drawtext: fix memory leak of draw expression.
13 years ago
Nicolas George
423047ea31
vf_drawtext: fix memory leak of glyph data.
13 years ago
Nicolas George
a63712d37c
vf_drawtext: use drawutils.
13 years ago
Lou Logan
2d38081b4f
cosmetics: fix some typos
Patch attached.
From 2d4094fc0d
Mon Sep 17 00:00:00 2001
From: Lou Logan <lou@lrcd.com>
Date: Mon, 12 Mar 2012 14:13:44 -0800
Subject: [PATCH] cosmetics: fix some typos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
4fe5448790
lavfi/drawtext: add 24 hours wrapping option for timecode.
Fixes ticket #1044 .
13 years ago
Alex Converse
b0f29db5c2
Mark mutable static data const where appropriate.
13 years ago
Andrey Utkin
e496c45d9b
drawtext: add 'fix_bounds' option on coords fixing
Before, drawtext filter deliberately altered given text coordinates if
text didn't fully fit on the picture. This breaks the use case of
scrolling large text, e.g. movie closing credits.
Add 'fix_bounds', to make it usable in such cases (by setting its value to 0).
Default behavior is not changed, and non-fitting text coords are fixed.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Andrey Utkin
2b43dfce36
drawtext: fix text_{w, h} expression vars
Before, {text_,}{w,h} vars hadn't got initialized
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Andrey Utkin
e7f0bc8c0f
drawtext: add missing braces around an if() block.
Prevents uninitialized read.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Clément Bœsch
f65600d519
drawtext: use new public timecode API.
13 years ago
Clément Bœsch
98aafc5bbf
timecode: set a fixed buffer size of 16B for tc string.
13 years ago
Clément Bœsch
940d3cc0b0
drawtext: fix hard dependency to lavc (timecode).
13 years ago
Diego Biurrun
d4b63054d9
cosmetics: Drop unnecessary parentheses around return values.
13 years ago
Stefano Sabatini
1858a5c25e
vf_drawtext: select YUV color for drawbox() in case YUV colorspace is used
Fix box alpha rendering when a YUV colorspace is selected, in particular
fix trac ticket #763 .
13 years ago
Clément Bœsch
80914cde6f
timecode: rename internal ff_* symbols to avpriv_*.
Those functions are shared between libs.
Also fix a typo in function names: smtpe → smpte.
13 years ago
Clément Bœsch
fa4e30af7e
drawtext: allow burning the timecode.
13 years ago
Luca Barbato
78212cefe1
drawtext: remove typo
It slipped through the last two iterations.
13 years ago
Luca Barbato
f5edfc9e92
drawtext: introduce rand(min, max)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Luca Barbato
73585620b8
drawtext: introduce explicit draw/hide variable
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Michael Niedermayer
dda3d716d6
vf_drawtext: support W/H parameters to reduce UI differences to qatar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
f88d5df383
vf_drawtext: cosmetics to reduce diff to qatar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
297422b338
vf_drawtext: Add main_w/h to improve compatibility with the modified UI
from the fork.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Luca Barbato
2cf74eca70
drawtext: make x and y parametric
Introduce variables "E", "PHI", "PI", "main_w"/"W", "main_h"/"H",
"text_w"/"w", "text_h"/"h", "x", "y", "n" and "t" in line with
vf_overlay and refactor the code accordingly.
13 years ago
Luca Barbato
ec11ff8407
drawtext: manage memory allocation better
Call dtext_prepare_text as early as possible
Do not draw if the memory allocation failed
13 years ago
Luca Barbato
a2fb4bcb01
drawtext: refactor draw_text
Split the memory allocation from the actual drawing.
13 years ago
Clément Bœsch
2f0f9a87d0
Fix various if parenthesis misplacements.
13 years ago
Reimar Döffinger
5af7daabc4
Mark AVFilterPad[] compound literals as const.
GCC 4.6.2 at least still seems to fail to put them in .rodata though,
see also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Reimar Döffinger
d78473334e
Add const to static arrays where it was forgotten.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Diego Biurrun
124e28847b
Remove some stray unnecessary ffmpeg references.
13 years ago
Nicolas George
a2af901295
vf_drawtext: remove mathematical constants now redundant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
145f741e11
AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
13 years ago
Stefano Sabatini
9921613e82
vf_drawtext: apply misc style fixes
13 years ago
Stefano Sabatini
80daa247d8
vf_drawtext: do not reset "n" variable to 0 in case the filter is reinited
13 years ago
Stefano Sabatini
87f5e79732
vf_drawtext: use ctx for expressing outlink and dtext in end_frame
(Very) slighly improve readability.
13 years ago
Stefano Sabatini
3de684206e
vf_drawtext: perform misc cosmetics changes to uninit
In particular:
* lexically sort strings freeing commands
* logically group freeing instructions
* prefer NULL over 0 when setting dtext->glyphs
13 years ago
Stefano Sabatini
275516f87c
vf_drawtext: set string defaults in the options array
Simplify.
13 years ago
Stefano Sabatini
482ce0ce4e
vf_drawtext: make x and y options parametric
Address trac issue #378 .
13 years ago
Stefano Sabatini
163854bca0
vf_drawtext: drop text wrapping feature
Or in other word, do not go to the next line when the text cannot be
rendered within the frame.
The rationale is that wrapping is hard to manage, as it depends on the
position of the text, thus making hard/impossible to compute the size
occupied by the rendered text, and makes the filter behavior
unpredictible with moving text (implemented in a pending patch).
Also the current wrapping code is very limited (for example it splits
words in the middle), and correctly handling wrapping requires much
more complexity (alignment, gravity, word parsing etc.), while
drawtext is meant to be only a thin wrapper around libfreetype, so
such advanced features don't belong here.
13 years ago
Stefano Sabatini
b87d4c2b9f
vf_drawtext: do not set limitations on fontsize
It may be needed to use values greater than 72, and in general greater
than an arbitrary big value. Let the user choose what's too big for
her.
13 years ago
Stefano Sabatini
3a87dce6bf
vf_drawtext: remove useless and misnamed intermediary "baseline" variable in draw_text()
13 years ago
Stefano Sabatini
500b3210da
vf_drawtext: fix background box coloring with RGB formats != RGBA
drawbox() expects a color specified in RGBA format, while the code was
providing a color with the components specified in the same order of
the input pixel format.
In particular, fix box coloring with AXXX RGB formats.
13 years ago