mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 09:38:17 +00:00
Remove hack to work with mjpegtools 1.9.0rc3 and above and instead use mjpeg_loglev_t() for getting the log levels. C...
Original commit message from CVS: Based on a patch by: Hans de Goede <j dot w dot r dot degoede at hhs dot nl> * configure.ac: * ext/mpeg2enc/gstmpeg2enc.cc: Remove hack to work with mjpegtools 1.9.0rc3 and above and instead use mjpeg_loglev_t() for getting the log levels. Check for this function in configure.ac as the pkg-config file doesn't tell us which release candidate we have. Fixes bug #517896.
This commit is contained in:
parent
ed7773728c
commit
b750dbd5ef
3 changed files with 30 additions and 24 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2008-02-22 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
Based on a patch by:
|
||||||
|
Hans de Goede <j dot w dot r dot degoede at hhs dot nl>
|
||||||
|
|
||||||
|
* configure.ac:
|
||||||
|
* ext/mpeg2enc/gstmpeg2enc.cc:
|
||||||
|
Remove hack to work with mjpegtools 1.9.0rc3 and above and instead
|
||||||
|
use mjpeg_loglev_t() for getting the log levels. Check for this
|
||||||
|
function in configure.ac as the pkg-config file doesn't tell us
|
||||||
|
which release candidate we have. Fixes bug #517896.
|
||||||
|
|
||||||
2008-02-22 Sebastian Dröge <slomo@circular-chaos.org>
|
2008-02-22 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
* configure.ac:
|
* configure.ac:
|
||||||
|
|
|
@ -678,6 +678,11 @@ AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
|
||||||
mpeg2enc_headers_ok=yes
|
mpeg2enc_headers_ok=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "x$have_mpjegtools_19x" = "xyes"; then
|
||||||
|
AG_GST_CHECK_LIBHEADER(MJPEGTOOLS_19rc3, mpeg2encpp, mjpeg_loglev_t, $MPEG2ENC_LIBS, mjpeg_logging.h,
|
||||||
|
AC_DEFINE(GST_MJPEGTOOLS_19rc3, 1, [mjpegtools >= 1.9.3rc3 is used]))
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x$mpeg2enc_headers_ok" = "xyes"; then
|
if test "x$mpeg2enc_headers_ok" = "xyes"; then
|
||||||
HAVE_MPEG2ENC="yes"
|
HAVE_MPEG2ENC="yes"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -90,30 +90,6 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
"mpegversion = (int) { 1, 2 }, " COMMON_VIDEO_CAPS)
|
"mpegversion = (int) { 1, 2 }, " COMMON_VIDEO_CAPS)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Workaround against stupid removal of the log_level_t enum in 1.9.0rc3.
|
|
||||||
* Without it doesn't make much sense to implement a mjpeg_log_handler_t */
|
|
||||||
#ifndef LOG_NONE
|
|
||||||
#define LOG_NONE 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LOG_DEBUG
|
|
||||||
#define LOG_DEBUG 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LOG_INFO
|
|
||||||
#define LOG_INFO 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LOG_WARN
|
|
||||||
#define LOG_WARN 3
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LOG_ERROR
|
|
||||||
#define LOG_ERROR 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void gst_mpeg2enc_finalize (GObject * object);
|
static void gst_mpeg2enc_finalize (GObject * object);
|
||||||
static void gst_mpeg2enc_reset (GstMpeg2enc * enc);
|
static void gst_mpeg2enc_reset (GstMpeg2enc * enc);
|
||||||
static gboolean gst_mpeg2enc_setcaps (GstPad * pad, GstCaps * caps);
|
static gboolean gst_mpeg2enc_setcaps (GstPad * pad, GstCaps * caps);
|
||||||
|
@ -679,6 +655,7 @@ gst_mpeg2enc_log_callback (log_level_t level, const char *message)
|
||||||
{
|
{
|
||||||
GstDebugLevel gst_level;
|
GstDebugLevel gst_level;
|
||||||
|
|
||||||
|
#ifndef GST_MJPEGTOOLS_19rc3
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case LOG_NONE:
|
case LOG_NONE:
|
||||||
gst_level = GST_LEVEL_NONE;
|
gst_level = GST_LEVEL_NONE;
|
||||||
|
@ -696,6 +673,18 @@ gst_mpeg2enc_log_callback (log_level_t level, const char *message)
|
||||||
gst_level = GST_LEVEL_INFO;
|
gst_level = GST_LEVEL_INFO;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
if (level == mjpeg_loglev_t ("debug"))
|
||||||
|
gst_level = GST_LEVEL_DEBUG;
|
||||||
|
else if (level == mjpeg_loglev_t ("info"))
|
||||||
|
gst_level = GST_LEVEL_INFO;
|
||||||
|
else if (level == mjpeg_loglev_t ("warn"))
|
||||||
|
gst_level = GST_LEVEL_WARNING;
|
||||||
|
else if (level == mjpeg_loglev_t ("error"))
|
||||||
|
gst_level = GST_LEVEL_ERROR;
|
||||||
|
else
|
||||||
|
gst_level = GST_LEVEL_INFO;
|
||||||
|
#endif
|
||||||
|
|
||||||
gst_debug_log (mpeg2enc_debug, gst_level, "", "", 0, NULL, message);
|
gst_debug_log (mpeg2enc_debug, gst_level, "", "", 0, NULL, message);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue