mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
drop mpeg2dec 0.2.1 support in favor of 0.3.0.
Original commit message from CVS: drop mpeg2dec 0.2.1 support in favor of 0.3.0. keeping old code around in cvs for a while just in case someone needs it.
This commit is contained in:
parent
976447564e
commit
4af44b1075
7 changed files with 843 additions and 920 deletions
19
configure.ac
19
configure.ac
|
@ -690,7 +690,24 @@ GST_CHECK_FEATURE(MJPEGTOOLS, [mjpegtools], jpegmmxenc jpegmmxdec, [
|
|||
dnl *** mpeg2dec ***
|
||||
translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2DEC, true)
|
||||
GST_CHECK_FEATURE(MPEG2DEC, [mpeg2dec], mpeg2dec, [
|
||||
AC_CHECK_MPEG2DEC(HAVE_MPEG2DEC=yes, HAVE_MPEG2DEC=no)
|
||||
PKG_CHECK_MODULES(LIBMPEG2, libmpeg2 >= 0.3.0,
|
||||
HAVE_LIBMPEG2="yes", HAVE_LIBMPEG2="no")
|
||||
AC_SUBST(LIBMPEG2_CFLAGS)
|
||||
AC_SUBST(LIBMPEG2_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(LIBCPUACCEL, libcpuaccel >= 0.3.0,
|
||||
HAVE_LIBCPUACCEL="yes", HAVE_LIBCPUACCEL="no")
|
||||
AC_SUBST(LIBCPUACCEL_CFLAGS)
|
||||
AC_SUBST(LIBCPUACCEL_LIBS)
|
||||
|
||||
HAVE_MPEG2DEC="no"
|
||||
if test x$HAVE_LIBMPEG2 = xyes -a x$HAVE_LIBCPUACCEL = xyes; then
|
||||
HAVE_MPEG2DEC="yes"
|
||||
MPEG2DEC_CFLAGS="$LIBMPEG2_CFLAGS $LIBCPUACCEL_CFLAGS"
|
||||
MPEG2DEC_LIBS="$LIBMPEG2_LIBS $LIBCPUACCEL_LIBS"
|
||||
AC_SUBST(MPEG2DEC_CFLAGS)
|
||||
AC_SUBST(MPEG2DEC_LIBS)
|
||||
fi
|
||||
])
|
||||
|
||||
dnl *** openquicktime ***
|
||||
|
|
|
@ -3,7 +3,7 @@ plugindir = $(libdir)/gst
|
|||
plugin_LTLIBRARIES = libgstmpeg2dec.la
|
||||
|
||||
libgstmpeg2dec_la_SOURCES = gstmpeg2dec.c
|
||||
libgstmpeg2dec_la_CFLAGS = $(GST_CFLAGS) $(MPEG2DEC_CFLAGS) $(FOMIT_FRAME_POINTER) -ffast-math
|
||||
libgstmpeg2dec_la_CFLAGS = $(GST_CFLAGS) $(MPEG2DEC_CFLAGS)
|
||||
libgstmpeg2dec_la_LIBADD = $(MPEG2DEC_LIBS)
|
||||
libgstmpeg2dec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -43,49 +43,34 @@ extern "C" {
|
|||
#define GST_IS_MPEG2DEC_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MPEG2DEC))
|
||||
|
||||
#define MPEGTIME_TO_GSTTIME(time) (((time) * (GST_MSECOND/10)) / 9LL)
|
||||
#define GSTTIME_TO_MPEGTIME(time) (((time) * 9LL) / (GST_MSECOND/10))
|
||||
|
||||
typedef struct _GstMpeg2dec GstMpeg2dec;
|
||||
typedef struct _GstMpeg2decClass GstMpeg2decClass;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MPEG2DEC_FORMAT_NONE,
|
||||
MPEG2DEC_FORMAT_I420,
|
||||
MPEG2DEC_FORMAT_YV12,
|
||||
} Mpeg2decFormat;
|
||||
|
||||
struct _GstMpeg2dec {
|
||||
GstElement element;
|
||||
GstElement element;
|
||||
|
||||
/* pads */
|
||||
GstPad *sinkpad,
|
||||
*srcpad;
|
||||
GstPad *sinkpad,*srcpad;
|
||||
GstBufferPool *peerpool;
|
||||
|
||||
mpeg2dec_t *decoder;
|
||||
guint32 accel;
|
||||
gboolean closed;
|
||||
mpeg2dec_t *decoder;
|
||||
guint32 accel;
|
||||
vo_instance_t *vo;
|
||||
gboolean closed;
|
||||
|
||||
/* the timestamp of the next frame */
|
||||
gboolean first;
|
||||
gboolean discont_pending;
|
||||
gint64 next_time;
|
||||
gint64 last_PTS;
|
||||
gboolean first;
|
||||
gint64 next_time;
|
||||
gint64 last_PTS;
|
||||
gint frames_per_PTS;
|
||||
gint adjust;
|
||||
|
||||
/* video state */
|
||||
Mpeg2decFormat format;
|
||||
gint width;
|
||||
gint height;
|
||||
gint pixel_width;
|
||||
gint pixel_height;
|
||||
gint frame_rate_code;
|
||||
gint64 total_frames;
|
||||
gint64 frame_period;
|
||||
|
||||
GstCache *cache;
|
||||
gint cache_id;
|
||||
gint format;
|
||||
gint width;
|
||||
gint height;
|
||||
gint frame_rate_code;
|
||||
gint64 total_frames;
|
||||
};
|
||||
|
||||
struct _GstMpeg2decClass {
|
File diff suppressed because it is too large
Load diff
|
@ -43,34 +43,49 @@ extern "C" {
|
|||
#define GST_IS_MPEG2DEC_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MPEG2DEC))
|
||||
|
||||
#define MPEGTIME_TO_GSTTIME(time) (((time) * (GST_MSECOND/10)) / 9LL)
|
||||
#define GSTTIME_TO_MPEGTIME(time) (((time) * 9LL) / (GST_MSECOND/10))
|
||||
|
||||
typedef struct _GstMpeg2dec GstMpeg2dec;
|
||||
typedef struct _GstMpeg2decClass GstMpeg2decClass;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MPEG2DEC_FORMAT_NONE,
|
||||
MPEG2DEC_FORMAT_I420,
|
||||
MPEG2DEC_FORMAT_YV12,
|
||||
} Mpeg2decFormat;
|
||||
|
||||
struct _GstMpeg2dec {
|
||||
GstElement element;
|
||||
GstElement element;
|
||||
|
||||
/* pads */
|
||||
GstPad *sinkpad,*srcpad;
|
||||
GstPad *sinkpad,
|
||||
*srcpad;
|
||||
GstBufferPool *peerpool;
|
||||
|
||||
mpeg2dec_t *decoder;
|
||||
guint32 accel;
|
||||
vo_instance_t *vo;
|
||||
gboolean closed;
|
||||
mpeg2dec_t *decoder;
|
||||
guint32 accel;
|
||||
gboolean closed;
|
||||
|
||||
/* the timestamp of the next frame */
|
||||
gboolean first;
|
||||
gint64 next_time;
|
||||
gint64 last_PTS;
|
||||
gint frames_per_PTS;
|
||||
gint adjust;
|
||||
gboolean first;
|
||||
gboolean discont_pending;
|
||||
gint64 next_time;
|
||||
gint64 last_PTS;
|
||||
|
||||
/* video state */
|
||||
gint format;
|
||||
gint width;
|
||||
gint height;
|
||||
gint frame_rate_code;
|
||||
gint64 total_frames;
|
||||
Mpeg2decFormat format;
|
||||
gint width;
|
||||
gint height;
|
||||
gint pixel_width;
|
||||
gint pixel_height;
|
||||
gint frame_rate_code;
|
||||
gint64 total_frames;
|
||||
gint64 frame_period;
|
||||
|
||||
GstCache *cache;
|
||||
gint cache_id;
|
||||
};
|
||||
|
||||
struct _GstMpeg2decClass {
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
dnl MPEG2DEC_CHECK-LIBHEADER(FEATURE-NAME, LIB-NAME, LIB-FUNCTION, HEADER-NAME,
|
||||
dnl ACTION-IF-FOUND, ACTION-IF-NOT-FOUND,
|
||||
dnl EXTRA-LDFLAGS, EXTRA-CPPFLAGS, INCLUDES)
|
||||
dnl
|
||||
dnl FEATURE-NAME - feature name; library and header files are treated
|
||||
dnl as feature, which we look for
|
||||
dnl LIB-NAME - library name as in AC_CHECK_LIB macro
|
||||
dnl LIB-FUNCTION - library symbol as in AC_CHECK_LIB macro
|
||||
dnl HEADER-NAME - header file name as in AC_CHECK_HEADER
|
||||
dnl ACTION-IF-FOUND - when feature is found then execute given action
|
||||
dnl ACTION-IF-NOT-FOUND - when feature is not found then execute given action
|
||||
dnl EXTRA-LDFLAGS - extra linker flags (-L or -l)
|
||||
dnl EXTRA-CPPFLAGS - extra C preprocessor flags, i.e. -I/usr/X11R6/include
|
||||
dnl INCLUDES - Any #include lines which need to be placed before the
|
||||
dnl header so that it works.
|
||||
dnl
|
||||
dnl Based on GST_CHECK_LIBHEADER from gstreamer plugins 0.3.1.
|
||||
dnl
|
||||
AC_DEFUN(MPEG2DEC_CHECK_LIBHEADER,
|
||||
[
|
||||
AC_CHECK_LIB([$2], [$3], HAVE_[$1]=yes, HAVE_[$1]=no, [$7])
|
||||
check_libheader_feature_name=translit([$1], A-Z, a-z)
|
||||
|
||||
if test "x$HAVE_[$1]" = "xyes"; then
|
||||
check_libheader_save_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="[$8] $CPPFLAGS"
|
||||
AC_CHECK_HEADER([$4], :, HAVE_[$1]=no, [$9])
|
||||
CPPFLAGS=$check_libheader_save_CPPFLAGS
|
||||
fi
|
||||
|
||||
if test "x$HAVE_[$1]" = "xyes"; then
|
||||
ifelse([$5], , :, [$5])
|
||||
else
|
||||
ifelse([$6], , :, [$6])
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
dnl
|
||||
dnl AC_CHECK_MPEG2DEC(ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
|
||||
dnl
|
||||
dnl ACTION-IF-FOUND - when feature is found then execute given action
|
||||
dnl ACTION-IF-NOT-FOUND - when feature is not found then execute given action
|
||||
dnl
|
||||
dnl Defines HAVE_MPEG2DEC to yes if mpeg2dec is found
|
||||
dnl
|
||||
dnl CFLAGS and LDFLAGS for the library are stored in MPEG2DEC_CFLAGS and
|
||||
dnl MPEG2DEC_LIBS, respectively
|
||||
dnl
|
||||
dnl Based on GST_CHECK_MPEG2DEC from gstreamer plugins 0.3.3.1
|
||||
dnl Thomas Vander Stichele <thomas@apestaart.org>, Andy Wingo <wingo@pobox.com>
|
||||
dnl
|
||||
AC_DEFUN(AC_CHECK_MPEG2DEC,
|
||||
[dnl
|
||||
AC_ARG_WITH(mpeg2dec-prefix,
|
||||
AC_HELP_STRING([--with-mpeg2dec-prefix=PFX],
|
||||
[prefix where mpeg2dec is installed (optional)]),
|
||||
mpeg2dec_config_prefix="$withval", mpeg2dec_config_prefix="")
|
||||
|
||||
if test x$mpeg2dec_config_prefix = x ; then
|
||||
MPEG2DEC_CHECK_LIBHEADER(CPUACCEL, cpuaccel, mm_accel, mpeg2dec/mm_accel.h)
|
||||
MPEG2DEC_CHECK_LIBHEADER(MPEG2DEC, mpeg2, mpeg2_init, mpeg2dec/mpeg2.h,
|
||||
MPEG2DEC_LIBS="-lmpeg2 -lcpuaccel",, -lcpuaccel, , [
|
||||
#include <inttypes.h>
|
||||
#include <mpeg2dec/mm_accel.h>
|
||||
#include <mpeg2dec/video_out.h>
|
||||
])
|
||||
else
|
||||
MPEG2DEC_CHECK_LIBHEADER(CPUACCEL, cpuaccel, mm_accel, mpeg2dec/mm_accel.h,
|
||||
,, -L$mpeg2dec_config_prefix/lib, -I$mpeg2dec_config_prefix/include)
|
||||
MPEG2DEC_CHECK_LIBHEADER(MPEG2DEC, mpeg2, mpeg2_init, mpeg2dec/mpeg2.h, [
|
||||
MPEG2DEC_LIBS="-lmpeg2 -lcpuaccel -L$mpeg2dec_config_prefix/lib"
|
||||
MPEG2DEC_CFLAGS="-I$mpeg2dec_config_prefix/include"
|
||||
], , -L$mpeg2dec_config_prefix/lib -lcpuaccel,
|
||||
-I$mpeg2dec_config_prefix/include, [
|
||||
#include <inttypes.h>
|
||||
#include <mpeg2dec/mm_accel.h>
|
||||
#include <mpeg2dec/video_out.h>
|
||||
])
|
||||
fi
|
||||
|
||||
if test "x$HAVE_MPEG2DEC" = "xyes"; then
|
||||
if test "x$HAVE_CPUACCEL" = "xyes"; then
|
||||
ifelse([$1], , :, [$1])
|
||||
else
|
||||
ifelse([$2], , :, [$2])
|
||||
fi
|
||||
else
|
||||
ifelse([$2], , :, [$2])
|
||||
fi
|
||||
|
||||
AC_SUBST(MPEG2DEC_CFLAGS)
|
||||
AC_SUBST(MPEG2DEC_LIBS)
|
||||
])
|
Loading…
Reference in a new issue