summaryrefslogtreecommitdiffstats
path: root/gst/videomixer
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2005-10-31 22:08:52 +0000
committerAndy Wingo <wingo@pobox.com>2005-10-31 22:08:52 +0000
commit2778e393c67c6282e4d785725119f3db1dd6afee (patch)
treecd60c6189821b67ddc31d58af0eb30968f4fc111 /gst/videomixer
parentf8667dcaec550b285b5db27ac6172ee253e50dac (diff)
gst/videomixer/videomixer.c (gst_videomixer_pad_unlink)
Original commit message from CVS: 2005-10-31 Andy Wingo <wingo@pobox.com> * gst/videomixer/videomixer.c (gst_videomixer_pad_unlink) (gst_videomixer_pad_link): Kill some memleaks. (gst_videomixer_pad_get_property): Style fix. (gst_videomixer_pad_set_property): Style fix. (gst_videomixer_pad_init): Style fix. (gst_videomixer_update_queues): Kill memleak. (gst_videomixer_loop): Kill memleak. (gst_videomixer_collected): Kill memleak.
Diffstat (limited to 'gst/videomixer')
-rw-r--r--gst/videomixer/videomixer.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/gst/videomixer/videomixer.c b/gst/videomixer/videomixer.c
index 60966c46..dff53661 100644
--- a/gst/videomixer/videomixer.c
+++ b/gst/videomixer/videomixer.c
@@ -173,11 +173,7 @@ static void
gst_videomixer_pad_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
- GstVideoMixerPad *pad;
-
- g_return_if_fail (GST_IS_VIDEO_MIXER_PAD (object));
-
- pad = GST_VIDEO_MIXER_PAD (object);
+ GstVideoMixerPad *pad = GST_VIDEO_MIXER_PAD (object);
switch (prop_id) {
case ARG_PAD_ZORDER:
@@ -205,8 +201,6 @@ gst_videomixer_pad_set_property (GObject * object, guint prop_id,
GstVideoMixerPad *pad;
GstVideoMixer *mix;
- g_return_if_fail (GST_IS_PAD (object));
-
pad = GST_VIDEO_MIXER_PAD (object);
mix = GST_VIDEO_MIXER (gst_pad_get_parent (GST_PAD (pad)));
@@ -316,22 +310,22 @@ beach:
static void
gst_videomixer_pad_link (GstPad * pad, GstPad * peer, gpointer data)
{
- GST_DEBUG ("pad '%s' connected", gst_pad_get_name (pad));
+ GST_DEBUG_OBJECT (pad, "connected");
}
static void
gst_videomixer_pad_unlink (GstPad * pad, GstPad * peer, gpointer data)
{
- GST_DEBUG ("pad '%s' unlinked", gst_pad_get_name (pad));
+ GST_DEBUG_OBJECT (pad, "unlinked");
}
static void
gst_videomixer_pad_init (GstVideoMixerPad * mixerpad)
{
g_signal_connect (mixerpad, "linked",
- G_CALLBACK (gst_videomixer_pad_link), (gpointer) mixerpad);
+ G_CALLBACK (gst_videomixer_pad_link), mixerpad);
g_signal_connect (mixerpad, "unlinked",
- G_CALLBACK (gst_videomixer_pad_unlink), (gpointer) mixerpad);
+ G_CALLBACK (gst_videomixer_pad_unlink), mixerpad);
/* setup some pad functions */
gst_pad_set_setcaps_function (GST_PAD (mixerpad),
@@ -344,7 +338,6 @@ gst_videomixer_pad_init (GstVideoMixerPad * mixerpad)
}
-
/* elementfactory information */
static GstElementDetails gst_videomixer_details =
GST_ELEMENT_DETAILS ("video mixer",
@@ -981,8 +974,7 @@ gst_videomixer_update_queues (GstVideoMixer * mix)
if (mixcol->buffer != NULL && GST_CLOCK_TIME_IS_VALID (pad->queued)) {
pad->queued -= interval;
- GST_DEBUG ("queued now %s %lld", gst_pad_get_name (GST_PAD (pad)),
- pad->queued);
+ GST_DEBUG_OBJECT (pad, "queued now %lld", pad->queued);
if (pad->queued == 0) {
GST_DEBUG ("unreffing buffer");
gst_buffer_unref (mixcol->buffer);
@@ -1022,8 +1014,8 @@ gst_videomixer_loop (GstElement * element)
new_height != mix->out_height || !GST_PAD_CAPS (mix->srcpad)) {
GstCaps *newcaps;
- newcaps =
- gst_caps_copy (gst_pad_get_negotiated_caps (GST_PAD (mix->master)));
+ newcaps = gst_caps_make_writable (
+ gst_pad_get_negotiated_caps (GST_PAD (mix->master)));
gst_caps_set_simple (newcaps, "format", GST_TYPE_FOURCC,
GST_STR_FOURCC ("AYUV"), "width", G_TYPE_INT, new_width, "height",
G_TYPE_INT, new_height, NULL);
@@ -1091,8 +1083,8 @@ gst_videomixer_collected (GstCollectPads * pads, GstVideoMixer * mix)
if (mix->in_width != mix->out_width || mix->in_height != mix->out_height) {
GstCaps *newcaps = NULL;
- newcaps =
- gst_caps_copy (gst_pad_get_negotiated_caps (GST_PAD (mix->master)));
+ newcaps = gst_caps_make_writable
+ (gst_pad_get_negotiated_caps (GST_PAD (mix->master)));
gst_caps_set_simple (newcaps,
"format", GST_TYPE_FOURCC, GST_STR_FOURCC ("AYUV"),
"width", G_TYPE_INT, mix->in_width,