Fix compilation with MSVC by using gst_util_guint64_to_gdouble() and checking for rint() and implementing it ourself ...
Original commit message from CVS: Based on a patch by: Kwang Yul Seo <kwangyul dot seo at gmail dot com> * configure.ac: * ext/cairo/gsttimeoverlay.c: (gst_cairo_time_overlay_print_smpte_time): Fix compilation with MSVC by using gst_util_guint64_to_gdouble() and checking for rint() and implementing it ourself if it doesn't exist.
This commit is contained in:
parent
7ea8f11b9a
commit
1e28a69371
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2007-12-09 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
Based on a patch by: Kwang Yul Seo <kwangyul dot seo at gmail dot com>
|
||||||
|
|
||||||
|
* configure.ac:
|
||||||
|
* ext/cairo/gsttimeoverlay.c:
|
||||||
|
(gst_cairo_time_overlay_print_smpte_time):
|
||||||
|
Fix compilation with MSVC by using gst_util_guint64_to_gdouble()
|
||||||
|
and checking for rint() and implementing it ourself if it doesn't
|
||||||
|
exist.
|
||||||
|
|
||||||
2007-12-09 Sebastian Dröge <slomo@circular-chaos.org>
|
2007-12-09 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
* configure.ac:
|
* configure.ac:
|
||||||
|
@ -218,6 +218,11 @@ AC_C99_FUNC_LRINTF
|
|||||||
|
|
||||||
dnl *** checks for library functions ***
|
dnl *** checks for library functions ***
|
||||||
|
|
||||||
|
LIBS_SAVE=$LIBS
|
||||||
|
LIBS="$LIBS $LIBM"
|
||||||
|
AC_CHECK_FUNCS(rint)
|
||||||
|
$LIBS=$LIB_SAVE
|
||||||
|
|
||||||
dnl Check for mmap (needed by electricfence plugin)
|
dnl Check for mmap (needed by electricfence plugin)
|
||||||
AC_FUNC_MMAP
|
AC_FUNC_MMAP
|
||||||
AM_CONDITIONAL(GST_HAVE_MMAP, test "x$ac_cv_func_mmap_fixed_mapped" == "xyes")
|
AM_CONDITIONAL(GST_HAVE_MMAP, test "x$ac_cv_func_mmap_fixed_mapped" == "xyes")
|
||||||
|
@ -48,6 +48,10 @@
|
|||||||
|
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
|
|
||||||
|
#ifndef HAVE_RINT
|
||||||
|
#define rint(x) ((double) floor((x)+(((x) < 0)? -0.5 : 0.5)))
|
||||||
|
#endif
|
||||||
|
|
||||||
static const GstElementDetails cairo_time_overlay_details =
|
static const GstElementDetails cairo_time_overlay_details =
|
||||||
GST_ELEMENT_DETAILS ("Time overlay",
|
GST_ELEMENT_DETAILS ("Time overlay",
|
||||||
"Filter/Editor/Video",
|
"Filter/Editor/Video",
|
||||||
@ -159,7 +163,7 @@ gst_cairo_time_overlay_print_smpte_time (guint64 time)
|
|||||||
int ms;
|
int ms;
|
||||||
double x;
|
double x;
|
||||||
|
|
||||||
x = rint ((time + 500000) * 1e-6);
|
x = rint (gst_util_guint64_to_gdouble (time + 500000) * 1e-6);
|
||||||
|
|
||||||
hours = floor (x / (60 * 60 * 1000));
|
hours = floor (x / (60 * 60 * 1000));
|
||||||
x -= hours * 60 * 60 * 1000;
|
x -= hours * 60 * 60 * 1000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user