mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
configure.ac: Improve mpeg2enc detection. This is for distributions that do ship mjpegtools, but without mpeg2enc. Al...
Original commit message from CVS: 2003-12-21 Ronald Bultje <rbultje@ronald.bitfreak.net> * configure.ac: Improve mpeg2enc detection. This is for distributions that do ship mjpegtools, but without mpeg2enc. Also does object check for might there ever be ABI incompatibility. * ext/mpeg2enc/gstmpeg2enc.cc: Add Andrew as second maintainer (he's helping me), and also add an error if no caps was set. This happens if I pull before capsnego and that's something I should solve sometime else. * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_blockgroup): Fix time parsing. * gst/matroska/matroska-mux.c: (gst_matroska_mux_audio_pad_link), (gst_matroska_mux_track_header): Add caps to templates. * gst/mpegaudioparse/gstmpegaudioparse.c: (mp3_sink_factory): Add mpegversion=1 to prevent confusion with MPEG/AAC. * gst/mpegstream/gstmpegdemux.c: Remove layer since it causes warnings about unfixed caps. * gst/videotestsrc/gstvideotestsrc.c: (gst_videotestsrc_get): Fix obvious typo (we error out if caps were set, we should of course error out if *no* caps were set). * sys/oss/gstosselement.c: (gst_osselement_convert): Fix format conversion, we confused bits/bytes. * sys/oss/gstosselement.h: Improve documentation for 'bps'. * sys/v4l/TODO: Remove stuff about plugins that need removing - this was done ages ago. * sys/v4l/gstv4lmjpegsrc.c: (gst_v4lmjpegsrc_init), (gst_v4lmjpegsrc_src_convert), (gst_v4lmjpegsrc_src_query): * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_init), (gst_v4lsrc_src_convert), (gst_v4lsrc_src_query): * sys/v4l2/gstv4l2src.c: (gst_v4l2src_init), (gst_v4l2src_src_convert), (gst_v4l2src_src_query): Add get_query_types(), get_formats() and query() functions.
This commit is contained in:
parent
fcec7bcfbf
commit
31b52089cc
6 changed files with 194 additions and 43 deletions
38
ChangeLog
38
ChangeLog
|
@ -1,3 +1,41 @@
|
|||
2003-12-21 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* configure.ac:
|
||||
Improve mpeg2enc detection. This is for distributions that do
|
||||
ship mjpegtools, but without mpeg2enc. Also does object check
|
||||
for might there ever be ABI incompatibility.
|
||||
* ext/mpeg2enc/gstmpeg2enc.cc:
|
||||
Add Andrew as second maintainer (he's helping me), and also add
|
||||
an error if no caps was set. This happens if I pull before capsnego
|
||||
and that's something I should solve sometime else.
|
||||
* gst/matroska/matroska-demux.c:
|
||||
(gst_matroska_demux_parse_blockgroup):
|
||||
Fix time parsing.
|
||||
* gst/matroska/matroska-mux.c: (gst_matroska_mux_audio_pad_link),
|
||||
(gst_matroska_mux_track_header):
|
||||
Add caps to templates.
|
||||
* gst/mpegaudioparse/gstmpegaudioparse.c: (mp3_sink_factory):
|
||||
Add mpegversion=1 to prevent confusion with MPEG/AAC.
|
||||
* gst/mpegstream/gstmpegdemux.c:
|
||||
Remove layer since it causes warnings about unfixed caps.
|
||||
* gst/videotestsrc/gstvideotestsrc.c: (gst_videotestsrc_get):
|
||||
Fix obvious typo (we error out if caps were set, we should of
|
||||
course error out if *no* caps were set).
|
||||
* sys/oss/gstosselement.c: (gst_osselement_convert):
|
||||
Fix format conversion, we confused bits/bytes.
|
||||
* sys/oss/gstosselement.h:
|
||||
Improve documentation for 'bps'.
|
||||
* sys/v4l/TODO:
|
||||
Remove stuff about plugins that need removing - this was done
|
||||
ages ago.
|
||||
* sys/v4l/gstv4lmjpegsrc.c: (gst_v4lmjpegsrc_init),
|
||||
(gst_v4lmjpegsrc_src_convert), (gst_v4lmjpegsrc_src_query):
|
||||
* sys/v4l/gstv4lsrc.c: (gst_v4lsrc_init), (gst_v4lsrc_src_convert),
|
||||
(gst_v4lsrc_src_query):
|
||||
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_init),
|
||||
(gst_v4l2src_src_convert), (gst_v4l2src_src_query):
|
||||
Add get_query_types(), get_formats() and query() functions.
|
||||
|
||||
2003-12-21 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* ChangeLog: moved to gstreamer/docs/random/old/ChangeLog.gst-plugins
|
||||
|
|
46
configure.ac
46
configure.ac
|
@ -1076,16 +1076,52 @@ GST_CHECK_FEATURE(MPEG2DEC, [mpeg2dec], mpeg2dec, [
|
|||
dnl *** mpeg2enc ***
|
||||
translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true)
|
||||
GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
|
||||
PKG_CHECK_MODULES(MPEG2ENC, mjpegtools >= 1.6.1.92,
|
||||
HAVE_MPEG2ENC="yes", HAVE_MPEG2ENC="no")
|
||||
MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp"
|
||||
AC_SUBST(MPEG2ENC_CFLAGS)
|
||||
AC_SUBST(MPEG2ENC_LIBS)
|
||||
HAVE_MPEG2ENC="no"
|
||||
dnl we require a c++ compiler for this one
|
||||
if [ test x$HAVE_CXX = xyes ]; then
|
||||
dnl libmpeg2enc was first included in mjpegtools-1.6.2-rc3 (1.6.1.92)
|
||||
dnl since many distros include mjpegtools specifically without mplex
|
||||
dnl and mpeg2enc, we check for mpeg2enc on its own, too.
|
||||
PKG_CHECK_MODULES(MPEG2ENC, mjpegtools >= 1.6.1.92, [
|
||||
dnl switch over to c++ to test things
|
||||
AC_LANG_CPLUSPLUS
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $MPEG2ENC_CFLAGS"
|
||||
AC_CHECK_HEADER(mpeg2encoder.hh, [
|
||||
MPEG2ENC_LIBS="$MPEG2ENC_LIBS -lmpeg2encpp -lm -lpthread"
|
||||
OLD_LIBS="$LIBS"
|
||||
LIBS="$LIBS $MPEG2ENC_LIBS"
|
||||
AC_MSG_CHECKING([for valid mpeg2enc objects])
|
||||
AC_TRY_RUN([
|
||||
#include <mpeg2encoder.hh>
|
||||
#include <mpeg2encoptions.hh>
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char *argv[])
|
||||
{
|
||||
MPEG2EncOptions *options = new MPEG2EncOptions ();
|
||||
MPEG2Encoder encoder (*options);
|
||||
return 0;
|
||||
}
|
||||
],[
|
||||
HAVE_MPEG2ENC="yes"
|
||||
AC_SUBST(MPEG2ENC_CFLAGS)
|
||||
AC_SUBST(MPEG2ENC_LIBS)
|
||||
AC_MSG_RESULT(yes)
|
||||
], AC_MSG_RESULT(no))
|
||||
LIBS="$OLD_LIBS"
|
||||
])
|
||||
CPPFLAGS="$OLD_CPPFLAGS"
|
||||
AC_LANG_C
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl *** mplex ***
|
||||
translit(dnm, m, l) AM_CONDITIONAL(USE_MPLEX, true)
|
||||
GST_CHECK_FEATURE(MPLEX, [mplex], mplex, [HAVE_MPLEX=$HAVE_CXX])
|
||||
])
|
||||
|
||||
dnl *** pango ***
|
||||
translit(dnm, m, l) AM_CONDITIONAL(USE_PANGO, true)
|
||||
|
|
|
@ -482,7 +482,7 @@ gst_videotestsrc_get (GstPad * pad)
|
|||
|
||||
videotestsrc = GST_VIDEOTESTSRC (gst_pad_get_parent (pad));
|
||||
|
||||
if (videotestsrc->fourcc != NULL) {
|
||||
if (!videotestsrc->fourcc) {
|
||||
gst_element_error (GST_ELEMENT (videotestsrc),
|
||||
"No color format set - aborting");
|
||||
return NULL;
|
||||
|
|
16
sys/v4l/TODO
16
sys/v4l/TODO
|
@ -1,19 +1,3 @@
|
|||
REMOVE list (HEAD)
|
||||
==================
|
||||
* xmms (depends on glib-1.2)
|
||||
* avifile (ffmpeg)
|
||||
* openquicktime (qtdemux)
|
||||
* stereo2mono/mono2stereo/int2float/float2int (audioconvert)
|
||||
* hermes (lcs)
|
||||
* mjpegtools (jpeg does the same, make it depend on libjpegmmx instead)
|
||||
* modplug (mikmod)
|
||||
* vga (unmaintained, not-working)
|
||||
* videosink (xvideo)
|
||||
* aviaudiodecoder (useless)
|
||||
* monkeymedia (licensing issues)
|
||||
* wavparse/enc goes in same dir
|
||||
* mulaw/alaw become separate mimetypes
|
||||
|
||||
TODO list (short term):
|
||||
=======================
|
||||
* v4lsrc/v4lmjpegsrc/v4l2src: fix interlacing (not handled at all...)
|
||||
|
|
|
@ -58,21 +58,31 @@ enum {
|
|||
ARG_USE_FIXED_FPS
|
||||
};
|
||||
|
||||
GST_FORMATS_FUNCTION (GstPad *, gst_v4lmjpegsrc_get_formats,
|
||||
GST_FORMAT_TIME, GST_FORMAT_DEFAULT);
|
||||
GST_QUERY_TYPE_FUNCTION (GstPad *, gst_v4lmjpegsrc_get_query_types,
|
||||
GST_QUERY_POSITION);
|
||||
|
||||
/* init functions */
|
||||
static void gst_v4lmjpegsrc_base_init (gpointer g_class);
|
||||
static void gst_v4lmjpegsrc_class_init (GstV4lMjpegSrcClass *klass);
|
||||
static void gst_v4lmjpegsrc_init (GstV4lMjpegSrc *v4lmjpegsrc);
|
||||
|
||||
/* pad/buffer functions */
|
||||
static gboolean gst_v4lmjpegsrc_srcconvert (GstPad *pad,
|
||||
/* pad/info functions */
|
||||
static gboolean gst_v4lmjpegsrc_src_convert (GstPad *pad,
|
||||
GstFormat src_format,
|
||||
gint64 src_value,
|
||||
GstFormat *dest_format,
|
||||
gint64 *dest_value);
|
||||
static gboolean gst_v4lmjpegsrc_src_query (GstPad *pad,
|
||||
GstQueryType type,
|
||||
GstFormat *format,
|
||||
gint64 *value);
|
||||
|
||||
/* buffer functions */
|
||||
static GstPadLinkReturn gst_v4lmjpegsrc_srcconnect (GstPad *pad,
|
||||
GstCaps *caps);
|
||||
static GstData* gst_v4lmjpegsrc_get (GstPad *pad);
|
||||
static GstData* gst_v4lmjpegsrc_get (GstPad *pad);
|
||||
static GstCaps* gst_v4lmjpegsrc_getcaps (GstPad *pad,
|
||||
GstCaps *caps);
|
||||
|
||||
|
@ -245,7 +255,10 @@ gst_v4lmjpegsrc_init (GstV4lMjpegSrc *v4lmjpegsrc)
|
|||
gst_pad_set_get_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_get);
|
||||
gst_pad_set_getcaps_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_getcaps);
|
||||
gst_pad_set_link_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_srcconnect);
|
||||
gst_pad_set_convert_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_srcconvert);
|
||||
gst_pad_set_convert_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_src_convert);
|
||||
gst_pad_set_formats_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_get_formats);
|
||||
gst_pad_set_query_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_src_query);
|
||||
gst_pad_set_query_type_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_get_query_types);
|
||||
|
||||
v4lmjpegsrc->bufferpool = gst_buffer_pool_new(
|
||||
NULL,
|
||||
|
@ -304,13 +317,12 @@ gst_v4lmjpegsrc_get_fps (GstV4lMjpegSrc *v4lmjpegsrc)
|
|||
return fps;
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
gst_v4lmjpegsrc_srcconvert (GstPad *pad,
|
||||
GstFormat src_format,
|
||||
gint64 src_value,
|
||||
GstFormat *dest_format,
|
||||
gint64 *dest_value)
|
||||
gst_v4lmjpegsrc_src_convert (GstPad *pad,
|
||||
GstFormat src_format,
|
||||
gint64 src_value,
|
||||
GstFormat *dest_format,
|
||||
gint64 *dest_value)
|
||||
{
|
||||
GstV4lMjpegSrc *v4lmjpegsrc;
|
||||
gdouble fps;
|
||||
|
@ -348,6 +360,40 @@ gst_v4lmjpegsrc_srcconvert (GstPad *pad,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_v4lmjpegsrc_src_query (GstPad *pad,
|
||||
GstQueryType type,
|
||||
GstFormat *format,
|
||||
gint64 *value)
|
||||
{
|
||||
GstV4lMjpegSrc *v4lmjpegsrc = GST_V4LMJPEGSRC (gst_pad_get_parent (pad));
|
||||
gboolean res = TRUE;
|
||||
gdouble fps;
|
||||
|
||||
if ((fps = gst_v4lmjpegsrc_get_fps(v4lmjpegsrc)) == 0)
|
||||
return FALSE;
|
||||
|
||||
switch (type) {
|
||||
case GST_QUERY_POSITION:
|
||||
switch (*format) {
|
||||
case GST_FORMAT_TIME:
|
||||
*value = v4lmjpegsrc->handled * GST_SECOND / fps;
|
||||
break;
|
||||
case GST_FORMAT_DEFAULT:
|
||||
*value = v4lmjpegsrc->handled;
|
||||
break;
|
||||
default:
|
||||
res = FALSE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
res = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline gulong
|
||||
calc_bufsize (int hor_dec,
|
||||
|
|
|
@ -51,23 +51,33 @@ enum {
|
|||
ARG_USE_FIXED_FPS
|
||||
};
|
||||
|
||||
GST_FORMATS_FUNCTION (GstPad *, gst_v4lsrc_get_formats,
|
||||
GST_FORMAT_TIME, GST_FORMAT_DEFAULT);
|
||||
GST_QUERY_TYPE_FUNCTION (GstPad *, gst_v4lsrc_get_query_types,
|
||||
GST_QUERY_POSITION);
|
||||
|
||||
/* init functions */
|
||||
static void gst_v4lsrc_base_init (gpointer g_class);
|
||||
static void gst_v4lsrc_class_init (GstV4lSrcClass *klass);
|
||||
static void gst_v4lsrc_init (GstV4lSrc *v4lsrc);
|
||||
|
||||
/* pad/buffer functions */
|
||||
static gboolean gst_v4lsrc_srcconvert (GstPad *pad,
|
||||
/* pad/info functions */
|
||||
static gboolean gst_v4lsrc_src_convert (GstPad *pad,
|
||||
GstFormat src_format,
|
||||
gint64 src_value,
|
||||
GstFormat *dest_format,
|
||||
gint64 *dest_value);
|
||||
static gboolean gst_v4lsrc_src_query (GstPad *pad,
|
||||
GstQueryType type,
|
||||
GstFormat *format,
|
||||
gint64 *value);
|
||||
|
||||
/* buffer functions */
|
||||
static GstPadLinkReturn gst_v4lsrc_srcconnect (GstPad *pad,
|
||||
GstCaps *caps);
|
||||
static GstCaps* gst_v4lsrc_getcaps (GstPad *pad,
|
||||
GstCaps *caps);
|
||||
static GstData* gst_v4lsrc_get (GstPad *pad);
|
||||
static GstData* gst_v4lsrc_get (GstPad *pad);
|
||||
|
||||
/* get/set params */
|
||||
static void gst_v4lsrc_set_property (GObject *object,
|
||||
|
@ -199,7 +209,10 @@ gst_v4lsrc_init (GstV4lSrc *v4lsrc)
|
|||
gst_pad_set_get_function (v4lsrc->srcpad, gst_v4lsrc_get);
|
||||
gst_pad_set_getcaps_function (v4lsrc->srcpad, gst_v4lsrc_getcaps);
|
||||
gst_pad_set_link_function (v4lsrc->srcpad, gst_v4lsrc_srcconnect);
|
||||
gst_pad_set_convert_function (v4lsrc->srcpad, gst_v4lsrc_srcconvert);
|
||||
gst_pad_set_convert_function (v4lsrc->srcpad, gst_v4lsrc_src_convert);
|
||||
gst_pad_set_formats_function (v4lsrc->srcpad, gst_v4lsrc_get_formats);
|
||||
gst_pad_set_query_function (v4lsrc->srcpad, gst_v4lsrc_src_query);
|
||||
gst_pad_set_query_type_function (v4lsrc->srcpad, gst_v4lsrc_get_query_types);
|
||||
|
||||
v4lsrc->bufferpool = gst_buffer_pool_new(
|
||||
NULL,
|
||||
|
@ -249,13 +262,12 @@ gst_v4lsrc_get_fps (GstV4lSrc *v4lsrc)
|
|||
return fps;
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
gst_v4lsrc_srcconvert (GstPad *pad,
|
||||
GstFormat src_format,
|
||||
gint64 src_value,
|
||||
GstFormat *dest_format,
|
||||
gint64 *dest_value)
|
||||
gst_v4lsrc_src_convert (GstPad *pad,
|
||||
GstFormat src_format,
|
||||
gint64 src_value,
|
||||
GstFormat *dest_format,
|
||||
gint64 *dest_value)
|
||||
{
|
||||
GstV4lSrc *v4lsrc;
|
||||
gdouble fps;
|
||||
|
@ -293,6 +305,41 @@ gst_v4lsrc_srcconvert (GstPad *pad,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_v4lsrc_src_query (GstPad *pad,
|
||||
GstQueryType type,
|
||||
GstFormat *format,
|
||||
gint64 *value)
|
||||
{
|
||||
GstV4lSrc *v4lsrc = GST_V4LSRC (gst_pad_get_parent (pad));
|
||||
gboolean res = TRUE;
|
||||
gdouble fps;
|
||||
|
||||
if ((fps = gst_v4lsrc_get_fps(v4lsrc)) == 0)
|
||||
return FALSE;
|
||||
|
||||
switch (type) {
|
||||
case GST_QUERY_POSITION:
|
||||
switch (*format) {
|
||||
case GST_FORMAT_TIME:
|
||||
*value = v4lsrc->handled * GST_SECOND / fps;
|
||||
break;
|
||||
case GST_FORMAT_DEFAULT:
|
||||
*value = v4lsrc->handled;
|
||||
break;
|
||||
default:
|
||||
res = FALSE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
res = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static GstCaps *
|
||||
gst_v4lsrc_palette_to_caps (int palette,
|
||||
GstPropsEntry *width,
|
||||
|
@ -568,7 +615,7 @@ gst_v4lsrc_getcaps (GstPad *pad,
|
|||
}
|
||||
|
||||
|
||||
static GstData*
|
||||
static GstData *
|
||||
gst_v4lsrc_get (GstPad *pad)
|
||||
{
|
||||
GstV4lSrc *v4lsrc;
|
||||
|
|
Loading…
Reference in a new issue