Commit ca3020cf authored by Thibault Saunier's avatar Thibault Saunier

videomeasure: Remove old unported videomeasure plugin as it is now replaced by IQA

parent b1710d7c
......@@ -475,7 +475,6 @@ GST_PLUGINS_NONPORTED=" cdxaparse \
mve nuvdemux \
patchdetect \
sdi tta \
videomeasure \
linsys \
apexsink \
nas sdl timidity \
......@@ -548,7 +547,6 @@ AG_GST_CHECK_PLUGIN(stereo)
AG_GST_CHECK_PLUGIN(timecode)
AG_GST_CHECK_PLUGIN(tta)
AG_GST_CHECK_PLUGIN(videofilters)
AG_GST_CHECK_PLUGIN(videomeasure)
AG_GST_CHECK_PLUGIN(videoparsers)
AG_GST_CHECK_PLUGIN(videosignal)
AG_GST_CHECK_PLUGIN(vmnc)
......@@ -3748,7 +3746,6 @@ gst/stereo/Makefile
gst/tta/Makefile
gst/timecode/Makefile
gst/videofilters/Makefile
gst/videomeasure/Makefile
gst/videoparsers/Makefile
gst/videosignal/Makefile
gst/vmnc/Makefile
......
......@@ -81,8 +81,6 @@ subdir('subenc')
#subdir('vbidec')
subdir('videofilters')
subdir('videoframe_audiolevel')
# did not work
#subdir('videomeasure')
subdir('videoparsers')
subdir('videosignal')
subdir('vmnc')
......
plugin_LTLIBRARIES = libgstvideomeasure.la
noinst_HEADERS = gstvideomeasure_ssim.h gstvideomeasure_collector.h
libgstvideomeasure_la_SOURCES = \
gstvideomeasure.c \
gstvideomeasure.h \
gstvideomeasure_ssim.c \
gstvideomeasure_collector.c
libgstvideomeasure_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_CFLAGS)
libgstvideomeasure_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
-lgstvideo-@GST_API_VERSION@ $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
libgstvideomeasure_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstvideomeasure_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
/* GStreamer
* Copyright (C) <2009> Руслан Ижбулатов <lrn1986 _at_ gmail _dot_ com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst-i18n-plugin.h>
#include "gstvideomeasure.h"
#include "gstvideomeasure_ssim.h"
#include "gstvideomeasure_collector.h"
GstEvent *
gst_event_new_measured (guint64 framenumber, GstClockTime timestamp,
const gchar * metric, const GValue * mean, const GValue * lowest,
const GValue * highest)
{
GstStructure *str = gst_structure_new (GST_EVENT_VIDEO_MEASURE,
"event", G_TYPE_STRING, "frame-measured",
"offset", G_TYPE_UINT64, framenumber,
"timestamp", GST_TYPE_CLOCK_TIME, timestamp,
"metric", G_TYPE_STRING, metric,
NULL);
gst_structure_set_value (str, "mean", mean);
gst_structure_set_value (str, "lowest", lowest);
gst_structure_set_value (str, "highest", highest);
return gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, str);
}
static gboolean
plugin_init (GstPlugin * plugin)
{
gboolean res;
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
res = gst_element_register (plugin, "ssim", GST_RANK_NONE, GST_TYPE_SSIM);
res &= gst_element_register (plugin, "measurecollector", GST_RANK_NONE,
GST_TYPE_MEASURE_COLLECTOR);
return res;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
videomeasure,
"Various video measurers",
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
/* GStreamer
* Copyright (C) <2009> Руслан Ижбулатов <lrn1986 _at_ gmail _dot_ com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef __GST_VIDEO_MEASURE_H__
#define __GST_VIDEO_MEASURE_H__
#include <gst/video/gstvideofilter.h>
#define GST_EVENT_VIDEO_MEASURE "application/x-videomeasure"
GstEvent *gst_event_new_measured (guint64 framenumber, GstClockTime timestamp,
const gchar *metric, const GValue *mean, const GValue *lowest,
const GValue *highest);
#endif /* __GST_VIDEO_MEASURE_H__ */
This diff is collapsed.
/* GStreamer
* Copyright (C) <2009> Руслан Ижбулатов <lrn1986 _at_ gmail _dot_ com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef __GST_MEASURE_COLLECTOR_H__
#define __GST_MEASURE_COLLECTOR_H__
#include "gstvideomeasure.h"
#include <gst/base/gstbasetransform.h>
G_BEGIN_DECLS
typedef struct _GstMeasureCollector GstMeasureCollector;
typedef struct _GstMeasureCollectorClass GstMeasureCollectorClass;
#define GST_TYPE_MEASURE_COLLECTOR (gst_measure_collector_get_type())
#define GST_MEASURE_COLLECTOR(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MEASURE_COLLECTOR, \
GstMeasureCollector))
#define GST_IS_MEASURE_COLLECTOR(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_MEASURE_COLLECTOR))
#define GST_MEASURE_COLLECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),\
GST_TYPE_MEASURE_COLLECTOR, GstMeasureCollectorClass))
#define GST_IS_MEASURE_COLLECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),\
GST_TYPE_MEASURE_COLLECTOR))
#define GST_MEASURE_COLLECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),\
GST_TYPE_MEASURE_COLLECTOR, GstMeasureCollectorClass))
typedef enum {
GST_MEASURE_COLLECTOR_0 = 0,
GST_MEASURE_COLLECTOR_WRITE_CSV = 0x1,
GST_MEASURE_COLLECTOR_EMIT_MESSAGE = 0x1 << 1,
GST_MEASURE_COLLECTOR_ALL =
GST_MEASURE_COLLECTOR_WRITE_CSV |
GST_MEASURE_COLLECTOR_EMIT_MESSAGE
} GstMeasureCollectorFlags;
struct _GstMeasureCollector {
GstBaseTransform element;
guint64 flags;
gchar *filename;
/* Array of pointers to GstStructure */
GPtrArray *measurements;
GValue *result;
guint64 nextoffset;
gchar *metric;
gboolean inited;
};
struct _GstMeasureCollectorClass {
GstBaseTransformClass parent_class;
};
GType gst_measure_collector_get_type (void);
G_END_DECLS
#endif /* __GST_MEASURE_COLLECTOR_H__ */
This diff is collapsed.
/* GStreamer
* Copyright (C) <2009> Руслан Ижбулатов <lrn1986 _at_ gmail _dot_ com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef __GST_SSIM_H__
#define __GST_SSIM_H__
#include <gst/gst.h>
#include <gst/base/gstcollectpads.h>
#include <gst/video/video.h>
G_BEGIN_DECLS
enum
{
PROP_0,
PROP_SSIM_TYPE,
PROP_WINDOW_TYPE,
PROP_WINDOW_SIZE,
PROP_GAUSS_SIGMA,
};
#define GST_TYPE_SSIM (gst_ssim_get_type())
#define GST_SSIM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
GST_TYPE_SSIM,GstSSim))
#define GST_IS_SSIM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
GST_TYPE_SSIM))
#define GST_SSIM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass) , \
GST_TYPE_SSIM,GstSSimClass))
#define GST_IS_SSIM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) , \
GST_TYPE_SSIM))
#define GST_SSIM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj) , \
GST_TYPE_SSIM,GstSSimClass))
typedef struct _GstSSim GstSSim;
typedef struct _GstSSimClass GstSSimClass;
typedef struct _GstSSimWindowCache {
gint x_window_start;
gint x_weight_start;
gint x_window_end;
gint y_window_start;
gint y_weight_start;
gint y_window_end;
gfloat element_summ;
} GstSSimWindowCache;
typedef void (*GstSSimFunction) (GstSSim *ssim, guint8 *org, gfloat *orgmu,
guint8 *mod, guint8 *out, gfloat *mean, gfloat *lowest, gfloat *highest);
typedef struct _GstSSimOutputContext GstSSimOutputContext;
/* TODO: check if all fields are used */
struct _GstSSimOutputContext {
GstPad *pad;
gboolean segment_pending;
};
/**
* GstSSim:
*
* The ssim object structure.
*/
struct _GstSSim {
GstElement element;
/* Array of GstSSimOutputContext */
GPtrArray *src;
gint padcount;
GstCollectPads *collect;
GstPad *orig;
gint frame_rate;
gint frame_rate_base;
gint width;
gint height;
GstCaps *sinkcaps;
GstCaps *srccaps;
/* SSIM type (0 - canonical; 1 - without mu) */
gint ssimtype;
/* Size of a window, windows are square */
gint windowsize;
/* Type of a weight-generator. 0 - no weighting. 1 - Gaussian weighting */
gint windowtype;
/* Array of width*height GstSSimWindowCaches */
GstSSimWindowCache *windows;
/* Array of windowsize*windowsize gfloats */
gfloat *weights;
/* For Gaussian function */
gfloat sigma;
GstSSimFunction func;
gfloat const1;
gfloat const2;
/* counters to keep track of timestamps */
gint64 timestamp;
gint64 offset;
/* sink event handling */
GstPadEventFunction collect_event;
GstSegment segment;
guint64 segment_position;
gdouble segment_rate;
};
struct _GstSSimClass {
GstElementClass parent_class;
};
GType gst_ssim_get_type (void);
G_END_DECLS
#endif /* __GST_SSIM_H__ */
measure_sources = [
'gstvideomeasure.c',
'gstvideomeasure_ssim.c',
'gstvideomeasure_collector.c',
]
gstvideomeasure = library('gstvideomeasure',
measure_sources,
c_args : gst_plugins_bad_args,
include_directories : [configinc, libsinc],
dependencies : [gstbase_dep, gstvideo_dep, libm],
install : true,
install_dir : plugins_install_dir,
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment