We are currently experiencing downtime impacting viewing & cloning the Mesa repo, and some GitLab pages returning 503. Please see #freedesktop on IRC for more updates.

expand tabs

Original commit message from CVS:
expand tabs
parent 6ba0fee5
2005-12-06 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegdeinterlace.c:
(gst_ffmpegdeinterlace_pad_link), (gst_ffmpegdeinterlace_init),
(gst_ffmpegdeinterlace_chain):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_class_init),
(gst_ffmpegenc_chain_audio):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_loop):
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_write):
* ext/ffmpeg/gstffmpegscale.c: (gst_ffmpegscale_pad_link),
(gst_ffmpegscale_init), (gst_ffmpegscale_chain),
(gst_ffmpegscale_change_state):
* ext/libpostproc/gstpostproc.c: (change_context), (change_mode),
(gst_postproc_base_init), (gst_postproc_class_init),
(gst_postproc_init), (gst_postproc_link), (gst_postproc_chain),
(gst_postproc_change_state), (gst_postproc_set_property),
(gst_postproc_get_property), (gst_postproc_register):
expand tabs
=== release 0.10.0 ===
2005-12-05 <thomas (at) apestaart (dot) org>
......
......@@ -81,34 +81,34 @@ gst_ffmpeg_set_palette (GstCaps *caps, AVCodecContext *context)
* but I'm too lazy today. Maybe later.
*/
#define GST_FF_VID_CAPS_NEW(mimetype, ...) \
(context != NULL) ? \
gst_caps_new_simple (mimetype, \
"width", G_TYPE_INT, context->width, \
"height", G_TYPE_INT, context->height, \
"framerate", GST_TYPE_FRACTION, context->time_base.den, \
context->time_base.num, __VA_ARGS__, NULL) \
: \
gst_caps_new_simple (mimetype, \
"width", GST_TYPE_INT_RANGE, 16, 4096, \
"height", GST_TYPE_INT_RANGE, 16, 4096, \
"framerate", GST_TYPE_FRACTION_RANGE, 0, 1, \
#define GST_FF_VID_CAPS_NEW(mimetype, ...) \
(context != NULL) ? \
gst_caps_new_simple (mimetype, \
"width", G_TYPE_INT, context->width, \
"height", G_TYPE_INT, context->height, \
"framerate", GST_TYPE_FRACTION, context->time_base.den, \
context->time_base.num, __VA_ARGS__, NULL) \
: \
gst_caps_new_simple (mimetype, \
"width", GST_TYPE_INT_RANGE, 16, 4096, \
"height", GST_TYPE_INT_RANGE, 16, 4096, \
"framerate", GST_TYPE_FRACTION_RANGE, 0, 1, \
G_MAXINT, 1, __VA_ARGS__, NULL)
/* same for audio - now with channels/sample rate
*/
#define GST_FF_AUD_CAPS_NEW(mimetype, ...) \
(context != NULL) ? \
gst_caps_new_simple (mimetype, \
"rate", G_TYPE_INT, context->sample_rate, \
"channels", G_TYPE_INT, context->channels, \
__VA_ARGS__, NULL) \
: \
gst_caps_new_simple (mimetype, \
"rate", GST_TYPE_INT_RANGE, 8000, 96000, \
"channels", GST_TYPE_INT_RANGE, 1, 2, \
__VA_ARGS__, NULL)
#define GST_FF_AUD_CAPS_NEW(mimetype, ...) \
(context != NULL) ? \
gst_caps_new_simple (mimetype, \
"rate", G_TYPE_INT, context->sample_rate, \
"channels", G_TYPE_INT, context->channels, \
__VA_ARGS__, NULL) \
: \
gst_caps_new_simple (mimetype, \
"rate", GST_TYPE_INT_RANGE, 8000, 96000, \
"channels", GST_TYPE_INT_RANGE, 1, 2, \
__VA_ARGS__, NULL)
/* Convert a FFMPEG codec ID and optional AVCodecContext
* to a GstCaps. If the context is ommitted, no fixed values
......@@ -259,7 +259,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
switch (context->codec_tag) {
case GST_MAKE_FOURCC ('D', 'I', 'V', 'X'):
caps = GST_FF_VID_CAPS_NEW ("video/x-divx",
"divxversion", G_TYPE_INT, 5, NULL);
"divxversion", G_TYPE_INT, 5, NULL);
break;
case GST_MAKE_FOURCC ('m', 'p', '4', 'v'):
default:
......@@ -450,10 +450,10 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
case CODEC_ID_MSRLE:
caps = GST_FF_VID_CAPS_NEW ("video/x-rle",
"layout", G_TYPE_STRING, "microsoft", NULL);
"layout", G_TYPE_STRING, "microsoft", NULL);
if (context) {
gst_caps_set_simple (caps,
"depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
"depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
} else {
gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
}
......@@ -472,7 +472,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
case CODEC_ID_MSVIDEO1:
caps = GST_FF_VID_CAPS_NEW ("video/x-msvideocodec",
"msvideoversion", G_TYPE_INT, 1, NULL);
"msvideoversion", G_TYPE_INT, 1, NULL);
break;
case CODEC_ID_WMV3:
......@@ -899,8 +899,8 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context)
case PIX_FMT_GRAY8:
bpp = depth = 8;
caps = GST_FF_VID_CAPS_NEW ("video/x-raw-gray",
"bpp", G_TYPE_INT, bpp,
"depth", G_TYPE_INT, depth, NULL);
"bpp", G_TYPE_INT, bpp,
"depth", G_TYPE_INT, depth, NULL);
break;
default:
/* give up ... */
......@@ -910,28 +910,28 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context)
if (caps == NULL) {
if (bpp != 0) {
if (r_mask != 0) {
caps = GST_FF_VID_CAPS_NEW ("video/x-raw-rgb",
"bpp", G_TYPE_INT, bpp,
"depth", G_TYPE_INT, depth,
"red_mask", G_TYPE_INT, r_mask,
"green_mask", G_TYPE_INT, g_mask,
"blue_mask", G_TYPE_INT, b_mask,
"endianness", G_TYPE_INT, endianness, NULL);
if (a_mask) {
gst_caps_set_simple (caps, "alpha_mask", G_TYPE_INT, a_mask, NULL);
}
caps = GST_FF_VID_CAPS_NEW ("video/x-raw-rgb",
"bpp", G_TYPE_INT, bpp,
"depth", G_TYPE_INT, depth,
"red_mask", G_TYPE_INT, r_mask,
"green_mask", G_TYPE_INT, g_mask,
"blue_mask", G_TYPE_INT, b_mask,
"endianness", G_TYPE_INT, endianness, NULL);
if (a_mask) {
gst_caps_set_simple (caps, "alpha_mask", G_TYPE_INT, a_mask, NULL);
}
} else {
caps = GST_FF_VID_CAPS_NEW ("video/x-raw-rgb",
"bpp", G_TYPE_INT, bpp,
"depth", G_TYPE_INT, depth,
"endianness", G_TYPE_INT, endianness, NULL);
if (context) {
gst_ffmpeg_set_palette (caps, context);
}
caps = GST_FF_VID_CAPS_NEW ("video/x-raw-rgb",
"bpp", G_TYPE_INT, bpp,
"depth", G_TYPE_INT, depth,
"endianness", G_TYPE_INT, endianness, NULL);
if (context) {
gst_ffmpeg_set_palette (caps, context);
}
}
} else if (fmt) {
caps = GST_FF_VID_CAPS_NEW ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, fmt, NULL);
"format", GST_TYPE_FOURCC, fmt, NULL);
}
}
......@@ -1116,8 +1116,8 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
context->time_base.num = gst_value_get_fraction_denominator (fps);
GST_DEBUG ("setting framerate %d/%d = %lf",
context->time_base.den, context->time_base.num,
1. * context->time_base.den / context->time_base.num);
context->time_base.den, context->time_base.num,
1. * context->time_base.den / context->time_base.num);
}
if (!raw)
......@@ -1273,7 +1273,7 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
if (!context->extradata) {
gint halfpel_flag, thirdpel_flag, low_delay, unknown_svq3_flag;
guint16 flags;
if (gst_structure_get_int (str, "halfpel_flag", &halfpel_flag) ||
gst_structure_get_int (str, "thirdpel_flag", &thirdpel_flag) ||
gst_structure_get_int (str, "low_delay", &low_delay) ||
......@@ -1872,7 +1872,7 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
if ((codec = avcodec_find_decoder_by_name (ext)) ||
(codec = avcodec_find_encoder_by_name (ext))) {
id = codec->id;
audio = TRUE;
audio = TRUE;
}
}
} else if (!strncmp (mimetype, "video/x-gst_ff-", 15)) {
......
......@@ -35,7 +35,7 @@
GstCaps *
gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
AVCodecContext *context,
gboolean encode);
gboolean encode);
/*
* _codectype_to_caps () gets the GstCaps that belongs to
......@@ -63,9 +63,9 @@ gst_ffmpeg_caps_to_codecid (const GstCaps *caps,
void
gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
enum CodecType codec_type,
const GstCaps *caps,
AVCodecContext *context);
enum CodecType codec_type,
const GstCaps *caps,
AVCodecContext *context);
/*
* caps_with_codectype () transforms a GstCaps that belongs to
......@@ -95,8 +95,8 @@ gst_ffmpeg_formatid_to_caps (const gchar *format_name);
gboolean
gst_ffmpeg_formatid_get_codecids (const gchar *format_name,
enum CodecID ** video_codec_list,
enum CodecID ** audio_codec_list);
enum CodecID ** video_codec_list,
enum CodecID ** audio_codec_list);
/*
* Since FFMpeg has such really cool and useful descriptions
......@@ -118,10 +118,10 @@ gst_ffmpeg_avpicture_get_size (int pix_fmt, int width, int height);
int
gst_ffmpeg_avpicture_fill (AVPicture * picture,
uint8_t * ptr,
enum PixelFormat pix_fmt,
int width,
int height);
uint8_t * ptr,
enum PixelFormat pix_fmt,
int width,
int height);
/*
* convert an image, we only use this for copying the image, ie,
......@@ -129,8 +129,8 @@ gst_ffmpeg_avpicture_fill (AVPicture * picture,
*/
int
gst_ffmpeg_img_convert (AVPicture * dst, int dst_pix_fmt,
const AVPicture * src, int src_pix_fmt,
int src_width, int src_height);
const AVPicture * src, int src_pix_fmt,
int src_width, int src_height);
/*
* Convert from/to a GStreamer <-> FFMpeg timestamp.
......
......@@ -183,7 +183,7 @@ gst_ffmpegdeinterlace_pad_link (GstPad * pad, const GstCaps * caps)
deinterlace->width = width;
deinterlace->height = height;
deinterlace->to_size = avpicture_get_size (deinterlace->pixfmt,
deinterlace->width, deinterlace->height);
deinterlace->width, deinterlace->height);
return GST_PAD_LINK_OK;
}
......@@ -246,16 +246,16 @@ static void
gst_ffmpegdeinterlace_init (GstFFMpegDeinterlace * deinterlace)
{
deinterlace->sinkpad = gst_pad_new_from_template (gst_static_pad_template_get
(&gst_ffmpegdeinterlace_sink_template),
"sink");
(&gst_ffmpegdeinterlace_sink_template),
"sink");
gst_pad_set_link_function (deinterlace->sinkpad, gst_ffmpegdeinterlace_pad_link);
gst_pad_set_getcaps_function (deinterlace->sinkpad, gst_ffmpegdeinterlace_getcaps);
gst_pad_set_chain_function (deinterlace->sinkpad, gst_ffmpegdeinterlace_chain);
gst_element_add_pad (GST_ELEMENT (deinterlace), deinterlace->sinkpad);
deinterlace->srcpad = gst_pad_new_from_template (gst_static_pad_template_get
(&gst_ffmpegdeinterlace_src_template),
"src");
(&gst_ffmpegdeinterlace_src_template),
"src");
gst_element_add_pad (GST_ELEMENT (deinterlace), deinterlace->srcpad);
gst_pad_set_link_function (deinterlace->srcpad, gst_ffmpegdeinterlace_pad_link);
gst_pad_set_getcaps_function (deinterlace->srcpad, gst_ffmpegdeinterlace_getcaps);
......@@ -285,20 +285,20 @@ gst_ffmpegdeinterlace_chain (GstPad * pad, GstData * data)
}
outbuf = gst_pad_alloc_buffer_and_set_caps (deinterlace->srcpad,
GST_BUFFER_OFFSET_NONE, deinterlace->to_size);
GST_BUFFER_OFFSET_NONE, deinterlace->to_size);
gst_ffmpeg_avpicture_fill (&deinterlace->from_frame,
GST_BUFFER_DATA (inbuf),
deinterlace->pixfmt,
deinterlace->width, deinterlace->height);
GST_BUFFER_DATA (inbuf),
deinterlace->pixfmt,
deinterlace->width, deinterlace->height);
gst_ffmpeg_avpicture_fill (&deinterlace->to_frame,
GST_BUFFER_DATA (outbuf),
deinterlace->pixfmt,
deinterlace->width, deinterlace->height);
GST_BUFFER_DATA (outbuf),
deinterlace->pixfmt,
deinterlace->width, deinterlace->height);
avpicture_deinterlace (&deinterlace->to_frame, &deinterlace->from_frame,
deinterlace->pixfmt, deinterlace->width, deinterlace->height);
deinterlace->pixfmt, deinterlace->width, deinterlace->height);
gst_buffer_stamp (outbuf, (const GstBuffer *) inbuf);
......
......@@ -228,7 +228,7 @@ gst_ffmpegenc_class_init (GstFFMpegEncClass * klass)
"Size of the video buffers", 0, G_MAXULONG, 0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass),
ARG_RTP_PAYLOAD_SIZE,
g_param_spec_ulong ("rtp_payload_size", "RTP Payload Size",
g_param_spec_ulong ("rtp_payload_size", "RTP Payload Size",
"Target GOB length", 0, G_MAXULONG, 0, G_PARAM_READWRITE));
} else if (klass->in_plugin->type == CODEC_TYPE_AUDIO) {
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BIT_RATE,
......@@ -566,7 +566,7 @@ gst_ffmpegenc_chain_audio (GstPad * pad, GstBuffer * inbuf)
/* this is panic! we got a buffer, but still don't have enough
* data. Merge them and retry in the next cycle... */
ffmpegenc->cache = gst_buffer_span (ffmpegenc->cache, 0, inbuf,
GST_BUFFER_SIZE (ffmpegenc->cache) + GST_BUFFER_SIZE (inbuf));
GST_BUFFER_SIZE (ffmpegenc->cache) + GST_BUFFER_SIZE (inbuf));
} else if (in_size == size) {
/* exactly the same! how wonderful */
ffmpegenc->cache = inbuf;
......@@ -593,7 +593,7 @@ gst_ffmpegenc_chain_audio (GstPad * pad, GstBuffer * inbuf)
GST_BUFFER_DURATION (subbuf) =
GST_BUFFER_DURATION (inbuf) * GST_BUFFER_SIZE (subbuf) / size;
subbuf = gst_buffer_span (ffmpegenc->cache, 0, subbuf,
GST_BUFFER_SIZE (ffmpegenc->cache) + GST_BUFFER_SIZE (subbuf));
GST_BUFFER_SIZE (ffmpegenc->cache) + GST_BUFFER_SIZE (subbuf));
ffmpegenc->cache = NULL;
} else {
subbuf = gst_buffer_create_sub (inbuf, size - in_size, frame_size);
......
......@@ -414,10 +414,10 @@ gst_ffmpegmux_loop (GstElement * element)
gst_tag_list_free (tags);
}
/* set the streamheader flag for gstffmpegprotocol if codec supports it */
if (!strcmp (ffmpegmux->context->oformat->name, "flv") ) {
open_flags |= GST_FFMPEG_URL_STREAMHEADER;
}
/* set the streamheader flag for gstffmpegprotocol if codec supports it */
if (!strcmp (ffmpegmux->context->oformat->name, "flv") ) {
open_flags |= GST_FFMPEG_URL_STREAMHEADER;
}
if (url_fopen (&ffmpegmux->context->pb,
ffmpegmux->context->filename, open_flags) < 0) {
......@@ -441,7 +441,7 @@ gst_ffmpegmux_loop (GstElement * element)
("Failed to write file header - check codec settings"));
return;
}
/* flush the header so it will be used as streamheader */
put_flush_packet (&ffmpegmux->context->pb);
}
......
......@@ -220,7 +220,7 @@ gst_ffmpegdata_write (URLContext * h, unsigned char *buf, int size)
g_value_init (&list, GST_TYPE_FIXED_LIST);
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_IN_CAPS);
g_value_init (&value, GST_TYPE_BUFFER);
g_value_set_boxed (&value, outbuf);
gst_value_list_append_value (&list, &value);
......@@ -234,7 +234,7 @@ gst_ffmpegdata_write (URLContext * h, unsigned char *buf, int size)
/* only set the first buffer */
info->set_streamheader = FALSE;
}
gst_pad_push (info->pad, GST_DATA (outbuf));
return size;
......
......@@ -255,7 +255,7 @@ gst_ffmpegscale_pad_link (GstPad * pad, const GstCaps * caps)
if (scale->res != NULL) img_resample_close (scale->res);
scale->res = img_resample_init (scale->to_width, scale->to_height,
scale->from_width, scale->from_height);
scale->from_width, scale->from_height);
}
......@@ -321,16 +321,16 @@ static void
gst_ffmpegscale_init (GstFFMpegScale * scale)
{
scale->sinkpad = gst_pad_new_from_template (gst_static_pad_template_get
(&gst_ffmpegscale_sink_template),
"sink");
(&gst_ffmpegscale_sink_template),
"sink");
gst_pad_set_link_function (scale->sinkpad, gst_ffmpegscale_pad_link);
gst_pad_set_getcaps_function (scale->sinkpad, gst_ffmpegscale_getcaps);
gst_pad_set_chain_function (scale->sinkpad, gst_ffmpegscale_chain);
gst_element_add_pad (GST_ELEMENT (scale), scale->sinkpad);
scale->srcpad = gst_pad_new_from_template (gst_static_pad_template_get
(&gst_ffmpegscale_src_template),
"src");
(&gst_ffmpegscale_src_template),
"src");
gst_element_add_pad (GST_ELEMENT (scale), scale->srcpad);
gst_pad_set_link_function (scale->srcpad, gst_ffmpegscale_pad_link);
gst_pad_set_getcaps_function (scale->srcpad, gst_ffmpegscale_getcaps);
......@@ -370,14 +370,14 @@ gst_ffmpegscale_chain (GstPad * pad, GstData * data)
outbuf = gst_pad_alloc_buffer_and_set_caps (scale->srcpad, GST_BUFFER_OFFSET_NONE, scale->to_size);
gst_ffmpeg_avpicture_fill (&scale->from_frame,
GST_BUFFER_DATA (inbuf),
scale->pixfmt,
scale->from_width, scale->from_height);
GST_BUFFER_DATA (inbuf),
scale->pixfmt,
scale->from_width, scale->from_height);
gst_ffmpeg_avpicture_fill (&scale->to_frame,
GST_BUFFER_DATA (outbuf),
scale->pixfmt,
scale->to_width, scale->to_height);
GST_BUFFER_DATA (outbuf),
scale->pixfmt,
scale->to_width, scale->to_height);
img_resample (scale->res, &scale->to_frame, &scale->from_frame);
......@@ -398,7 +398,7 @@ gst_ffmpegscale_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_READY_TO_NULL:
if (scale->res != NULL)
img_resample_close (scale->res);
img_resample_close (scale->res);
break;
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment