diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2010-04-27 12:19:22 +0200 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2010-04-30 17:49:09 +0200 |
commit | b0ac4a4560eb1ece53fa1acc286e5d0485323fae (patch) | |
tree | 618ac70cad71619a824ebb9969256834a69a9aaa /ext/jpeg/gstjpegenc.h | |
parent | c5614dbb40b173a3d39aa56703d5c37dc86ca1a1 (diff) |
jpegenc: support more colour spaces and some cleanups
Diffstat (limited to 'ext/jpeg/gstjpegenc.h')
-rw-r--r-- | ext/jpeg/gstjpegenc.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/ext/jpeg/gstjpegenc.h b/ext/jpeg/gstjpegenc.h index 4f96e7231..f7a3ef0e7 100644 --- a/ext/jpeg/gstjpegenc.h +++ b/ext/jpeg/gstjpegenc.h @@ -23,6 +23,7 @@ #include <gst/gst.h> +#include <gst/video/video.h> /* this is a hack hack hack to get around jpeglib header bugs... */ #ifdef HAVE_STDLIB_H # undef HAVE_STDLIB_H @@ -41,9 +42,12 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_JPEGENC)) #define GST_IS_JPEGENC_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_JPEGENC)) + typedef struct _GstJpegEnc GstJpegEnc; typedef struct _GstJpegEncClass GstJpegEncClass; +#define GST_JPEG_ENC_MAX_COMPONENT 4 + struct _GstJpegEnc { GstElement element; @@ -51,15 +55,30 @@ struct _GstJpegEnc /* pads */ GstPad *sinkpad, *srcpad; - /* video state */ - gint format; + /* stream/image properties */ + GstVideoFormat format; gint width; gint height; + gint channels; + gint fps_num, fps_den; + gint par_num, par_den; + /* standard video_format indexed */ + gint stride[GST_JPEG_ENC_MAX_COMPONENT]; + gint offset[GST_JPEG_ENC_MAX_COMPONENT]; + gint inc[GST_JPEG_ENC_MAX_COMPONENT]; + gint cwidth[GST_JPEG_ENC_MAX_COMPONENT]; + gint cheight[GST_JPEG_ENC_MAX_COMPONENT]; + gint h_samp[GST_JPEG_ENC_MAX_COMPONENT]; + gint v_samp[GST_JPEG_ENC_MAX_COMPONENT]; + gint h_max_samp; + gint v_max_samp; + gboolean planar; /* the video buffer */ gint bufsize; - guint row_stride; /* the jpeg line buffer */ guchar **line[3]; + /* indirect encoding line buffers */ + guchar *row[3][4 * DCTSIZE]; struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; |