[FFmpeg-devel] [PATCH] video stabilization plugins using vid.stab library

Georg Martius georg.martius at web.de
Thu Apr 11 00:10:45 CEST 2013


On Tuesday 09 April 2013 10:27:35 Clément Bœsch wrote:
> On Tue, Apr 02, 2013 at 12:36:00AM +0200, Georg Martius wrote:
> > Hi,
> > 
> > attached is my new patch with new names for the filters:
> > vidstabdetect and vidstabtransform
> > 
> > with configure script and makefile adaptations
> > with documentation in filters.texi
> > without tabs ;-)
> 
> Sorry for the delay.
NP and thanks for the review.
> 
> The following review is mostly cosmetics now; if you honor the comments
> below, it should be OK at the next iteration.
Great. I did what you suggested. 

> [...]
> Could it make sense to factorize all these 3 functions in a
> libavfilter/vidstabutils.c or similar?
Yes it makes sense and I did it. The implemenation of the wrapper had to be 
changed a bit:

+typedef struct {
+    const AVClass* class;
+} VS2AVLogCtx;
+
+/** wrapper to log vs_log into av_log */
+static int vs_2_av_log_wrapper(int type, const char* tag, const char* format, 
...){
+    va_list ap;
+    VS2AVLogCtx ctx;
+    AVClass class = {
+      .class_name = tag,
+      .item_name  = av_default_item_name,
+      .option     = 0,
+      .version    = LIBAVUTIL_VERSION_INT,
+      .category   = AV_CLASS_CATEGORY_FILTER,
+    };
+    ctx.class = &class;
+    va_start (ap, format);
+    av_vlog(&ctx, type, format, ap);
+    va_end (ap);
+    return VS_OK;
+}

The only disadvantage is that I need to initialize the entire AVClass 
structure.

Regards
  Georg

> 
> [...]
-- 
---- Georg Martius,  Tel: +49 177 6413311  -----
--------- http://georg.hronopik.de -------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-video-stabilization-plugins-using-vid.stab-library-v.patch
Type: text/x-patch
Size: 38553 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130411/16a9f785/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130411/16a9f785/attachment.asc>


More information about the ffmpeg-devel mailing list