Commit ab57fbcd authored by Ronald S. Bultje's avatar Ronald S. Bultje

Adds divx/xvid encoders. divx encoder is based on divx4linux (commercial, closed-source)

Original commit message from CVS:
Adds divx/xvid encoders.
* divx encoder is based on divx4linux (commercial, closed-source)
* xvid encoder is based on xvidcore (http://www.xvid.org/, GPL - Christian? ;) )

Both use a GstCaps that doesn't conform with what we currently use, I might fix that later on or so. For now, it doesn't matter, it's just a test. We're also missing corresponding decoders (ffmpeg can decoded this too, but that's not the point), these might come later too.
parent 7ca85637
......@@ -506,6 +506,21 @@ dnl FIXME : add second check somehow if that is necessary
dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
dnl AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
dnl *** DIVX ***
translit(dnm, m, l) AM_CONDITIONAL(USE_DIVX, true)
GST_CHECK_FEATURE(DIVX, [divx plugins], divx, [
HAVE_DIVX=yes
AC_CHECK_HEADER(encore2.h, ,
[ AC_MSG_WARN([Divx4linux headers not found]) &&
HAVE_DIVX=no ] )
LIBS="-lm"
AC_CHECK_LIB(divxencore, encore, ,
[ AC_MSG_WARN([Divx4linux libs not found]) &&
HAVE_DIVX=no ] )
DIVX_LIBS="-lxvidcore -lm"
AC_SUBST(DIVX_LIBS)
])
dnl *** dvdread ***
translit(dnm, m, l) AM_CONDITIONAL(USE_DVDREAD, true)
GST_CHECK_FEATURE(DVDREAD, [dvdread library], dvdreadsrc, [
......@@ -875,6 +890,22 @@ GST_CHECK_FEATURE(XMMS, [xmms plug-in], xmms, [
AM_PATH_XMMS(0.1.0, HAVE_XMMS=yes, HAVE_XMMS=no)
])
dnl *** XVID ***
translit(dnm, m, l) AM_CONDITIONAL(USE_XVID, true)
GST_CHECK_FEATURE(XVID, [xvid plugins], xvid, [
HAVE_XVID=yes
AC_CHECK_HEADER(xvid.h, ,
[ AC_MSG_WARN([Xvid headers not found]) &&
HAVE_XVID=no ] )
LIBS="-lm"
AC_CHECK_LIB(xvidcore, xvid_encore, ,
[ AC_MSG_WARN([Xvid libs not found]) &&
HAVE_XVID=no ] )
XVID_LIBS="-lxvidcore -lm"
AC_SUBST(XVID_LIBS)
])
fi dnl of EXT plugins
dnl Check for atomic.h
......@@ -1127,6 +1158,7 @@ ext/artsd/Makefile
ext/audiofile/Makefile
ext/avifile/Makefile
ext/cdparanoia/Makefile
ext/divx/Makefile
ext/dv/Makefile
ext/dvdread/Makefile
ext/dvdnav/Makefile
......@@ -1162,6 +1194,7 @@ ext/swfdec/Makefile
ext/vorbis/Makefile
ext/tarkin/Makefile
ext/xmms/Makefile
ext/xvid/Makefile
gst-libs/Makefile
gst-libs/gst/Makefile
gst-libs/gst/audio/Makefile
......
......@@ -46,6 +46,12 @@ else
CDPARANOIA_DIR=
endif
if USE_DIVX
DIVX_DIR=divx
else
DIVX_DIR=
endif
if USE_DVDREAD
DVDREAD_DIR=dvdread
else
......@@ -244,6 +250,12 @@ else
VORBIS_DIR=
endif
if USE_XVID
XVID_DIR=xvid
else
XVID_DIR=
endif
if USE_XMMS
XMMS_DIR=xmms
else
......@@ -257,8 +269,8 @@ SNAPSHOT_DIR=
endif
SUBDIRS=$(A52DEC_DIR) $(AALIB_DIR) $(ALSA_DIR) \
$(ARTS_DIR) $(ARTSC_DIR) $(AUDIOFILE_DIR) \
$(AVIFILE_DIR) $(CDPARANOIA_DIR) \
$(ARTS_DIR) $(ARTSC_DIR) $(AUDIOFILE_DIR) \
$(AVIFILE_DIR) $(CDPARANOIA_DIR) $(DIVX_DIR) \
$(DVDREAD_DIR) $(DVDNAV_DIR) $(ESD_DIR) $(MAS_DIR) \
$(FFMPEG_DIR) $(FLAC_DIR) $(GNOMEVFS_DIR) $(GSM_DIR) \
$(HERMES_DIR) $(HTTP_DIR) $(JACK_DIR) $(JPEG_DIR) \
......@@ -268,7 +280,7 @@ SUBDIRS=$(A52DEC_DIR) $(AALIB_DIR) $(ALSA_DIR) \
$(OPENQUICKTIME_DIR) $(RAW1394_DIR) \
$(SDL_DIR) $(SHOUT_DIR) $(SIDPLAY_DIR) \
$(SMOOTHWAVE_DIR) $(SWFDEC_DIR) $(TARKIN_DIR) \
$(VORBIS_DIR) $(XMMS_DIR) $(SNAPSHOT_DIR)
$(VORBIS_DIR) $(XVID_DIR) $(XMMS_DIR) $(SNAPSHOT_DIR)
DIST_SUBDIRS=\
a52dec aalib alsa \
......@@ -281,4 +293,5 @@ DIST_SUBDIRS=\
mad mikmod mjpegtools mpeg2dec \
openquicktime raw1394 \
sdl snapshot shout shout2 sidplay \
smoothwave swfdec tarkin vorbis xmms
smoothwave swfdec tarkin vorbis \
xmms xvid
plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
plugin_LTLIBRARIES = libgstdivx.la
libgstdivx_la_SOURCES = gstdivxenc.c
libgstdivx_la_CFLAGS = $(GST_CFLAGS) $(DIVX_CFLAGS)
libgstdivx_la_LIBADD = $(DIVX_LIBS)
libgstdivx_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstdivxenc.h
This diff is collapsed.
/* GStreamer divx encoder plugin
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_DIVXENC_H__
#define __GST_DIVXENC_H__
#include <gst/gst.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define GST_TYPE_DIVXENC \
(gst_divxenc_get_type())
#define GST_DIVXENC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DIVXENC, GstDivxEnc))
#define GST_DIVXENC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DIVXENC, GstDivxEnc))
#define GST_IS_DIVXENC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DIVXENC))
#define GST_IS_DIVXENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DIVXENC))
typedef struct _GstDivxEnc GstDivxEnc;
typedef struct _GstDivxEncClass GstDivxEncClass;
struct _GstDivxEnc {
GstElement element;
/* pads */
GstPad *sinkpad, *srcpad;
/* quality of encoded image */
gulong bitrate;
/* size of the buffers */
gulong buffer_size;
/* max key interval */
gint max_key_interval;
/* divx handle */
void *handle;
int csp;
int width, height;
};
struct _GstDivxEncClass {
GstElementClass parent_class;
/* signals */
void (*frame_encoded) (GstElement *element);
};
GType gst_divxenc_get_type(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GST_DIVXENC_H__ */
plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
plugin_LTLIBRARIES = libgstxvid.la
libgstxvid_la_SOURCES = gstxvidenc.c
libgstxvid_la_CFLAGS = $(GST_CFLAGS) $(XVID_CFLAGS)
libgstxvid_la_LIBADD = $(XVID_LIBS)
libgstxvid_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstxvidenc.h
This diff is collapsed.
/* GStreamer xvid encoder plugin
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_XVIDENC_H__
#define __GST_XVIDENC_H__
#include <gst/gst.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define GST_TYPE_XVIDENC \
(gst_xvidenc_get_type())
#define GST_XVIDENC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_XVIDENC, GstXvidEnc))
#define GST_XVIDENC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_XVIDENC, GstXvidEnc))
#define GST_IS_XVIDENC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_XVIDENC))
#define GST_IS_XVIDENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_XVIDENC))
typedef struct _GstXvidEnc GstXvidEnc;
typedef struct _GstXvidEncClass GstXvidEncClass;
struct _GstXvidEnc {
GstElement element;
/* pads */
GstPad *sinkpad, *srcpad;
/* quality of encoded JPEG image */
gulong bitrate;
/* size of the JPEG buffers */
gulong buffer_size;
/* max key interval */
gint max_key_interval;
/* xvid handle */
void *handle;
int csp;
int width, height;
};
struct _GstXvidEncClass {
GstElementClass parent_class;
/* signals */
void (*frame_encoded) (GstElement *element);
};
GType gst_xvidenc_get_type(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GST_XVIDENC_H__ */
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