diff mbox

[FFmpeg-devel,v2] avfilter/avf_showwaves: Add draw mode also to showwavespic filter

Message ID 1556185048-19989-1-git-send-email-vobruba.martin@gmail.com
State Superseded
Headers show

Commit Message

Martin Vobruba April 25, 2019, 9:37 a.m. UTC
See commit a8c2d375ca68b7f001564ced14d8ac0757f53a29
---
 doc/filters.texi            | 15 +++++++++++++++
 libavfilter/avf_showwaves.c |  3 +++
 2 files changed, 18 insertions(+)

Comments

Michael Niedermayer April 25, 2019, 11:52 p.m. UTC | #1
On Thu, Apr 25, 2019 at 11:37:28AM +0200, Martin Vobruba wrote:
> See commit a8c2d375ca68b7f001564ced14d8ac0757f53a29
> ---
>  doc/filters.texi            | 15 +++++++++++++++
>  libavfilter/avf_showwaves.c |  3 +++
>  2 files changed, 18 insertions(+)

breaks build
HTML	doc/ffmpeg-all.html
doc/filters.texi:22650: @item outside of table or list
doc/filters.texi:22663: unmatched `@end table'
make: *** [doc/ffmpeg-all.html] Error 1
HTML	doc/ffplay-all.html
doc/filters.texi:22650: @item outside of table or list
doc/filters.texi:22663: unmatched `@end table'
make: *** [doc/ffplay-all.html] Error 1
HTML	doc/ffprobe-all.html
doc/filters.texi:22650: @item outside of table or list
doc/filters.texi:22663: unmatched `@end table'
make: *** [doc/ffprobe-all.html] Error 1
HTML	doc/ffmpeg-filters.html
doc/filters.texi:22650: @item outside of table or list
doc/filters.texi:22663: unmatched `@end table'
make: *** [doc/ffmpeg-filters.html] Error 1
make: Target `all' not remade because of errors.


[...]
diff mbox

Patch

diff --git a/doc/filters.texi b/doc/filters.texi
index e9cbccc..e8636da 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -22647,6 +22647,21 @@  Cubic root.
 Default is linear.
 @end table
 
+@item draw
+Set the draw mode.
+
+Available values are:
+@table @samp
+@item scale
+Scale pixel values for each drawn sample.
+
+@item full
+Draw every sample directly.
+@end table
+
+Default value is @code{scale}.
+@end table
+
 @subsection Examples
 
 @itemize
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index 0e683cf..a0d2b25 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -765,6 +765,9 @@  static const AVOption showwavespic_options[] = {
         { "log", "logarithmic",    0, AV_OPT_TYPE_CONST, {.i64=SCALE_LOG}, .flags=FLAGS, .unit="scale"},
         { "sqrt", "square root",   0, AV_OPT_TYPE_CONST, {.i64=SCALE_SQRT}, .flags=FLAGS, .unit="scale"},
         { "cbrt", "cubic root",    0, AV_OPT_TYPE_CONST, {.i64=SCALE_CBRT}, .flags=FLAGS, .unit="scale"},
+    { "draw", "set draw mode", OFFSET(draw_mode), AV_OPT_TYPE_INT, {.i64 = DRAW_SCALE}, 0, DRAW_NB-1, FLAGS, .unit="draw" },
+        { "scale", "scale pixel values for each drawn sample", 0, AV_OPT_TYPE_CONST, {.i64=DRAW_SCALE}, .flags=FLAGS, .unit="draw"},
+        { "full",  "draw every pixel for sample directly",     0, AV_OPT_TYPE_CONST, {.i64=DRAW_FULL},  .flags=FLAGS, .unit="draw"},
     { NULL }
 };