-/* Gnome-Streamer
+/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* This library is free software; you can redistribute it and/or
#include <string.h>
-//#define DEBUG_ENABLED
+/*#define DEBUG_ENABLED*/
#include "gstjpegdec.h"
extern GstPadTemplate *jpegdec_src_template, *jpegdec_sink_template;
static void gst_jpegdec_chain (GstPad *pad, GstBuffer *buf);
static GstElementClass *parent_class = NULL;
-//static guint gst_jpegdec_signals[LAST_SIGNAL] = { 0 };
+/*static guint gst_jpegdec_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_jpegdec_get_type(void) {
/* initialize the jpegdec decoder state */
jpegdec->next_time = 0;
- // reset the initial video state
+ /* reset the initial video state */
jpegdec->format = -1;
jpegdec->width = -1;
jpegdec->height = -1;
guchar *data, *outdata;
gulong size, outsize;
GstBuffer *outbuf;
- //GstMeta *meta;
+ /*GstMeta *meta;*/
gint width, height, width2;
guchar *base[3];
gint i,j, k;
g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad));
g_return_if_fail(buf != NULL);
- //g_return_if_fail(GST_IS_BUFFER(buf));
+ /*g_return_if_fail(GST_IS_BUFFER(buf));*/
jpegdec = GST_JPEGDEC (GST_OBJECT_PARENT (pad));
r_h = jpegdec->cinfo.cur_comp_info[0]->h_samp_factor;
r_v = jpegdec->cinfo.cur_comp_info[0]->v_samp_factor;
- //g_print ("%d %d\n", r_h, r_v);
- //g_print ("%d %d\n", jpegdec->cinfo.cur_comp_info[1]->h_samp_factor, jpegdec->cinfo.cur_comp_info[1]->v_samp_factor);
- //g_print ("%d %d\n", jpegdec->cinfo.cur_comp_info[2]->h_samp_factor, jpegdec->cinfo.cur_comp_info[2]->v_samp_factor);
+ /*g_print ("%d %d\n", r_h, r_v);*/
+ /*g_print ("%d %d\n", jpegdec->cinfo.cur_comp_info[1]->h_samp_factor, jpegdec->cinfo.cur_comp_info[1]->v_samp_factor);*/
+ /*g_print ("%d %d\n", jpegdec->cinfo.cur_comp_info[2]->h_samp_factor, jpegdec->cinfo.cur_comp_info[2]->v_samp_factor);*/
jpegdec->cinfo.do_fancy_upsampling = FALSE;
jpegdec->cinfo.do_block_smoothing = FALSE;
base[1] += width2; base[2] += width2;
}
}
- //g_print ("%d\n", jpegdec->cinfo.output_scanline);
+ /*g_print ("%d\n", jpegdec->cinfo.output_scanline);*/
jpeg_read_raw_data(&jpegdec->cinfo, jpegdec->line, r_v*DCTSIZE);
}
-/* Gnome-Streamer
+/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* This library is free software; you can redistribute it and/or
GstPad *sinkpad,*srcpad;
int parse_state;
- // the timestamp of the next frame
+ /* the timestamp of the next frame */
guint64 next_time;
- // the interval between frames
+ /* the interval between frames */
guint64 time_interval;
- // video state
+ /* video state */
gint format;
gint width;
gint height;
- // the size of the output buffer
+ /* the size of the output buffer */
gint outsize;
- // the jpeg line buffer
+ /* the jpeg line buffer */
guchar **line[3];
struct jpeg_decompress_struct cinfo;
-/* Gnome-Streamer
+/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* This library is free software; you can redistribute it and/or
jpegenc->srcpad = gst_pad_new("src",GST_PAD_SRC);
gst_element_add_pad(GST_ELEMENT(jpegenc),jpegenc->srcpad);
- // reset the initial video state
+ /* reset the initial video state */
jpegenc->width = -1;
jpegenc->height = -1;
jpeg_set_defaults(&jpegenc->cinfo);
jpegenc->cinfo.dct_method = JDCT_FASTEST;
- //jpegenc->cinfo.dct_method = JDCT_DEFAULT;
- //jpegenc->cinfo.smoothing_factor = 10;
+ /*jpegenc->cinfo.dct_method = JDCT_DEFAULT; */
+ /*jpegenc->cinfo.smoothing_factor = 10; */
jpeg_set_quality(&jpegenc->cinfo, 85, TRUE);
/*
guchar *data, *outdata;
gulong size, outsize;
GstBuffer *outbuf;
-// GstMeta *meta;
+/* GstMeta *meta; */
guint height, width, width2;
guchar *base[3];
gint i,j, k;
g_return_if_fail (pad != NULL);
g_return_if_fail (GST_IS_PAD (pad));
g_return_if_fail (buf != NULL);
- //g_return_if_fail(GST_IS_BUFFER(buf));
+ /*g_return_if_fail(GST_IS_BUFFER(buf)); */
- //usleep(10000);
+ /*usleep(10000); */
jpegenc = GST_JPEGENC (GST_OBJECT_PARENT (pad));
data = GST_BUFFER_DATA(buf);