diff options
author | Mark Nauwelaerts <manauw@skynet.be> | 2008-03-05 05:38:06 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2008-03-05 05:38:06 +0000 |
commit | 646ac4cdf2054e5cd38c1869701a4e839f8436b2 (patch) | |
tree | 1b3a85ca8e1109983e8fc3c8c9138eb92c48615c /ext/mpeg2enc/gstmpeg2encpicturereader.cc | |
parent | 15ac9f5a1398cc7a65f5d44fd53452c2cdf27bc6 (diff) | |
download | gst-plugins-bad-646ac4cdf2054e5cd38c1869701a4e839f8436b2.tar.gz gst-plugins-bad-646ac4cdf2054e5cd38c1869701a4e839f8436b2.tar.bz2 gst-plugins-bad-646ac4cdf2054e5cd38c1869701a4e839f8436b2.zip |
configure.ac: Clean up detection of different mjpegtoolsAPI versions.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* configure.ac:
Clean up detection of different mjpegtoolsAPI versions.
* ext/mpeg2enc/gstmpeg2enc.cc:
* ext/mpeg2enc/gstmpeg2enc.hh:
* ext/mpeg2enc/gstmpeg2encoder.cc:
* ext/mpeg2enc/gstmpeg2encoptions.cc:
* ext/mpeg2enc/gstmpeg2encpicturereader.cc:
* ext/mpeg2enc/gstmpeg2encpicturereader.hh:
* ext/mpeg2enc/gstmpeg2encstreamwriter.cc:
* ext/mpeg2enc/gstmpeg2encstreamwriter.hh:
Streamline conditional code for evolving mjpegtools API,
optimize and fix/prevent crash in log handling, use
names/nicks for enums in the usual way andm inor updates
in code and properties/settings. Partially fixes bug #520329.
Diffstat (limited to 'ext/mpeg2enc/gstmpeg2encpicturereader.cc')
-rw-r--r-- | ext/mpeg2enc/gstmpeg2encpicturereader.cc | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/ext/mpeg2enc/gstmpeg2encpicturereader.cc b/ext/mpeg2enc/gstmpeg2encpicturereader.cc index 6b09bd1c..5bd09dd7 100644 --- a/ext/mpeg2enc/gstmpeg2encpicturereader.cc +++ b/ext/mpeg2enc/gstmpeg2encpicturereader.cc @@ -25,10 +25,6 @@ #include <encoderparams.hh> -#ifdef GST_MJPEGTOOLS_19x -#include <imageplanes.hh> -#endif - #include "gstmpeg2enc.hh" #include "gstmpeg2encpicturereader.hh" @@ -107,14 +103,13 @@ GstMpeg2EncPictureReader::StreamPictureParams (MPEG2EncInVidParams & strm) */ bool -#ifdef GST_MJPEGTOOLS_19x +#if GST_MJPEGTOOLS_API >= 10900 GstMpeg2EncPictureReader::LoadFrame (ImagePlanes & image) #else GstMpeg2EncPictureReader::LoadFrame () #endif { - -#ifndef GST_MJPEGTOOLS_19x +#if GST_MJPEGTOOLS_API < 10900 gint n; #endif gint i, x, y; @@ -136,27 +131,27 @@ bool } frame = GST_BUFFER_DATA (enc->buffer); -#ifndef GST_MJPEGTOOLS_19x +#if GST_MJPEGTOOLS_API < 10900 n = frames_read % input_imgs_buf_size; #endif x = encparams.horizontal_size; y = encparams.vertical_size; for (i = 0; i < y; i++) { -#ifdef GST_MJPEGTOOLS_19x +#if GST_MJPEGTOOLS_API >= 10900 memcpy (image.Plane (0) + i * encparams.phy_width, frame, x); #else memcpy (input_imgs_buf[n][0] + i * encparams.phy_width, frame, x); #endif frame += x; } -#ifndef GST_MJPEGTOOLS_19x +#if GST_MJPEGTOOLS_API < 10900 lum_mean[n] = LumMean (input_imgs_buf[n][0]); #endif x >>= 1; y >>= 1; for (i = 0; i < y; i++) { -#ifdef GST_MJPEGTOOLS_19x +#if GST_MJPEGTOOLS_API >= 10900 memcpy (image.Plane (1) + i * encparams.phy_chrom_width, frame, x); #else memcpy (input_imgs_buf[n][1] + i * encparams.phy_chrom_width, frame, x); @@ -164,7 +159,7 @@ bool frame += x; } for (i = 0; i < y; i++) { -#ifdef GST_MJPEGTOOLS_19x +#if GST_MJPEGTOOLS_API >= 10900 memcpy (image.Plane (2) + i * encparams.phy_chrom_width, frame, x); #else memcpy (input_imgs_buf[n][2] + i * encparams.phy_chrom_width, frame, x); |