mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
[MOVED FROM GST-P-FARSIGHT] Remove trailing whitespace in mimic plugin
20080704204112-3e2dc-1ab4b913d58faa058742b01e083f7debd6877bb3.gz
This commit is contained in:
parent
3f12b5905b
commit
c6396458b7
5 changed files with 24 additions and 24 deletions
|
@ -55,7 +55,7 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
"green_mask = (int) 65280, "
|
||||
"blue_mask = (int) 255, "
|
||||
"height = (int) [16, 4096], "
|
||||
"width = (int) [16, 4096]"
|
||||
"width = (int) [16, 4096]"
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -64,12 +64,12 @@ static void gst_mimdec_base_init (GstMimDecClass *klass);
|
|||
static void gst_mimdec_init (GstMimDec *mimdec);
|
||||
static void gst_mimdec_finalize (GObject *object);
|
||||
|
||||
static GstFlowReturn gst_mimdec_chain (GstPad *pad,
|
||||
static GstFlowReturn gst_mimdec_chain (GstPad *pad,
|
||||
GstBuffer *in);
|
||||
static GstCaps *gst_mimdec_src_getcaps (GstPad *pad);
|
||||
|
||||
static GstStateChangeReturn
|
||||
gst_mimdec_change_state (GstElement *element,
|
||||
gst_mimdec_change_state (GstElement *element,
|
||||
GstStateChange transition);
|
||||
|
||||
static GstElementClass *parent_class = NULL;
|
||||
|
@ -217,7 +217,7 @@ gst_mimdec_chain (GstPad *pad, GstBuffer *in)
|
|||
header = (guchar *) gst_adapter_peek (mimdec->adapter, 24);
|
||||
header_size = GUINT16_FROM_LE (*(guint16 *) (header + 0));
|
||||
if (header_size != 24) {
|
||||
GST_WARNING_OBJECT (mimdec,
|
||||
GST_WARNING_OBJECT (mimdec,
|
||||
"invalid frame: header size %d incorrect", header_size);
|
||||
gst_adapter_flush (mimdec->adapter, 24);
|
||||
res = GST_FLOW_ERROR;
|
||||
|
@ -327,7 +327,7 @@ gst_mimdec_chain (GstPad *pad, GstBuffer *in)
|
|||
|
||||
mimic_get_property(mimdec->dec, "width", &width);
|
||||
mimic_get_property(mimdec->dec, "height", &height);
|
||||
GST_DEBUG_OBJECT (mimdec,
|
||||
GST_DEBUG_OBJECT (mimdec,
|
||||
"got WxH %d x %d payload size %d buffer_size %d",
|
||||
width, height, mimdec->payload_size, mimdec->buffer_size);
|
||||
caps = gst_caps_new_simple ("video/x-raw-rgb",
|
||||
|
|
|
@ -60,7 +60,7 @@ struct _GstMimDec
|
|||
GstClockTime gst_timestamp;
|
||||
};
|
||||
|
||||
struct _GstMimDecClass
|
||||
struct _GstMimDecClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* GStreamer
|
||||
* Copyright (c) 2005 INdT.
|
||||
* @author Andre Moreira Magalhaes <andre.magalhaes@indt.org.br>
|
||||
|
@ -75,11 +75,11 @@ static void gst_mimenc_class_init (GstMimEncClass *klass);
|
|||
static void gst_mimenc_base_init (GstMimEncClass *klass);
|
||||
static void gst_mimenc_init (GstMimEnc *mimenc);
|
||||
|
||||
static gboolean gst_mimenc_setcaps (GstPad *pad,
|
||||
static gboolean gst_mimenc_setcaps (GstPad *pad,
|
||||
GstCaps *caps);
|
||||
static GstFlowReturn gst_mimenc_chain (GstPad *pad,
|
||||
static GstFlowReturn gst_mimenc_chain (GstPad *pad,
|
||||
GstBuffer *in);
|
||||
static GstBuffer* gst_mimenc_create_tcp_header (GstMimEnc *mimenc,
|
||||
static GstBuffer* gst_mimenc_create_tcp_header (GstMimEnc *mimenc,
|
||||
gint payload_size);
|
||||
|
||||
static GstStateChangeReturn
|
||||
|
@ -236,7 +236,7 @@ gst_mimenc_chain (GstPad *pad, GstBuffer *in)
|
|||
res = GST_FLOW_ERROR;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
if (!mimic_encoder_init (mimenc->enc, mimenc->res)) {
|
||||
GST_WARNING_OBJECT (mimenc, "mimic_encoder_init error\n");
|
||||
mimic_close (mimenc->enc);
|
||||
|
@ -244,7 +244,7 @@ gst_mimenc_chain (GstPad *pad, GstBuffer *in)
|
|||
res = GST_FLOW_ERROR;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
if (!mimic_get_property (mimenc->enc, "buffer_size", &mimenc->buffer_size)) {
|
||||
GST_WARNING_OBJECT (mimenc, "mimic_get_property('buffer_size') error\n");
|
||||
mimic_close (mimenc->enc);
|
||||
|
@ -260,7 +260,7 @@ gst_mimenc_chain (GstPad *pad, GstBuffer *in)
|
|||
out_buf = gst_buffer_new_and_alloc (mimenc->buffer_size);
|
||||
GST_BUFFER_TIMESTAMP(out_buf) = GST_BUFFER_TIMESTAMP(buf);
|
||||
buffer_size = mimenc->buffer_size;
|
||||
if (!mimic_encode_frame (mimenc->enc, data, GST_BUFFER_DATA (out_buf),
|
||||
if (!mimic_encode_frame (mimenc->enc, data, GST_BUFFER_DATA (out_buf),
|
||||
&buffer_size, ((mimenc->frames % MAX_INTERFRAMES) == 0 ? TRUE : FALSE))) {
|
||||
GST_WARNING_OBJECT (mimenc, "mimic_encode_frame error\n");
|
||||
gst_buffer_unref (out_buf);
|
||||
|
@ -301,7 +301,7 @@ gst_mimenc_chain (GstPad *pad, GstBuffer *in)
|
|||
return res;
|
||||
}
|
||||
|
||||
static GstBuffer*
|
||||
static GstBuffer*
|
||||
gst_mimenc_create_tcp_header (GstMimEnc *mimenc, gint payload_size)
|
||||
{
|
||||
// 24 bytes
|
||||
|
@ -313,9 +313,9 @@ gst_mimenc_create_tcp_header (GstMimEnc *mimenc, gint payload_size)
|
|||
*((guint16 *) (p + 2)) = GUINT16_TO_LE(mimenc->width);
|
||||
*((guint16 *) (p + 4)) = GUINT16_TO_LE(mimenc->height);
|
||||
*((guint16 *) (p + 6)) = 0;
|
||||
*((guint32 *) (p + 8)) = GUINT32_TO_LE(payload_size);
|
||||
*((guint32 *) (p + 12)) = GUINT32_TO_LE(GST_MAKE_FOURCC ('M', 'L', '2', '0'));
|
||||
*((guint32 *) (p + 16)) = 0;
|
||||
*((guint32 *) (p + 8)) = GUINT32_TO_LE(payload_size);
|
||||
*((guint32 *) (p + 12)) = GUINT32_TO_LE(GST_MAKE_FOURCC ('M', 'L', '2', '0'));
|
||||
*((guint32 *) (p + 16)) = 0;
|
||||
*((guint32 *) (p + 20)) = 0; /* FIXME: must be timestamp */
|
||||
|
||||
return buf_header;
|
||||
|
|
|
@ -53,11 +53,11 @@ struct _GstMimEnc
|
|||
|
||||
MimicResEnum res;
|
||||
gint buffer_size;
|
||||
guint32 frames;
|
||||
guint32 frames;
|
||||
guint16 height, width;
|
||||
};
|
||||
|
||||
struct _GstMimEncClass
|
||||
struct _GstMimEncClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* GStreamer
|
||||
* Copyright (c) 2005 INdT.
|
||||
* @author Andre Moreira Magalhaes <andre.magalhaes@indt.org.br>
|
||||
|
@ -46,8 +46,8 @@ GST_PLUGIN_DEFINE (
|
|||
GST_VERSION_MINOR,
|
||||
"mimic",
|
||||
"Mimic codec",
|
||||
plugin_init,
|
||||
VERSION,
|
||||
"GPL",
|
||||
"Farsight",
|
||||
plugin_init,
|
||||
VERSION,
|
||||
"GPL",
|
||||
"Farsight",
|
||||
"http://farsight.sf.net/")
|
||||
|
|
Loading…
Reference in a new issue