~ubuntu-branches/ubuntu/precise/gst-plugins-bad0.10/precise-proposed

« back to all changes in this revision

Viewing changes to gst/debugutils/gstchecksumsink.c

  • Committer: Bazaar Package Importer
  • Author(s): Ken VanDine
  • Date: 2011-07-19 14:32:43 UTC
  • mfrom: (18.4.21 sid)
  • Revision ID: james.westby@ubuntu.com-20110719143243-p7pnkh45akfp0ihk
Tags: 0.10.22-2ubuntu1
* Rebased on debian unstable, remaining changes:
  - debian/gstreamer-plugins-bad.install
    * don't include dtmf, liveadder, rtpmux, autoconvert and shm, we include 
      them in -good

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <gst/base/gstbasesink.h>
26
26
#include "gstchecksumsink.h"
27
27
 
28
 
/* prototypes */
29
 
 
30
 
 
31
 
static void gst_checksum_sink_set_property (GObject * object,
32
 
    guint property_id, const GValue * value, GParamSpec * pspec);
33
 
static void gst_checksum_sink_get_property (GObject * object,
34
 
    guint property_id, GValue * value, GParamSpec * pspec);
35
28
static void gst_checksum_sink_dispose (GObject * object);
36
29
static void gst_checksum_sink_finalize (GObject * object);
37
30
 
40
33
static GstFlowReturn
41
34
gst_checksum_sink_render (GstBaseSink * sink, GstBuffer * buffer);
42
35
 
43
 
enum
44
 
{
45
 
  PROP_0,
46
 
  PROP_SYNC
47
 
};
48
 
 
49
 
/* pad templates */
50
 
 
51
36
static GstStaticPadTemplate gst_checksum_sink_sink_template =
52
37
GST_STATIC_PAD_TEMPLATE ("sink",
53
38
    GST_PAD_SINK,
86
71
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
87
72
  GstBaseSinkClass *base_sink_class = GST_BASE_SINK_CLASS (klass);
88
73
 
89
 
  gobject_class->set_property = gst_checksum_sink_set_property;
90
 
  gobject_class->get_property = gst_checksum_sink_get_property;
91
74
  gobject_class->dispose = gst_checksum_sink_dispose;
92
75
  gobject_class->finalize = gst_checksum_sink_finalize;
93
76
  base_sink_class->start = GST_DEBUG_FUNCPTR (gst_checksum_sink_start);
100
83
    GstChecksumSinkClass * checksumsink_class)
101
84
{
102
85
  gst_base_sink_set_sync (GST_BASE_SINK (checksumsink), FALSE);
103
 
 
104
 
}
105
 
 
106
 
void
107
 
gst_checksum_sink_set_property (GObject * object, guint property_id,
108
 
    const GValue * value, GParamSpec * pspec)
109
 
{
110
 
  GstChecksumSink *checksumsink;
111
 
 
112
 
  g_return_if_fail (GST_IS_CHECKSUM_SINK (object));
113
 
  checksumsink = GST_CHECKSUM_SINK (object);
114
 
 
115
 
  switch (property_id) {
116
 
    default:
117
 
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
118
 
      break;
119
 
  }
120
 
}
121
 
 
122
 
void
123
 
gst_checksum_sink_get_property (GObject * object, guint property_id,
124
 
    GValue * value, GParamSpec * pspec)
125
 
{
126
 
  GstChecksumSink *checksumsink;
127
 
 
128
 
  g_return_if_fail (GST_IS_CHECKSUM_SINK (object));
129
 
  checksumsink = GST_CHECKSUM_SINK (object);
130
 
 
131
 
  switch (property_id) {
132
 
    default:
133
 
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
134
 
      break;
135
 
  }
136
86
}
137
87
 
138
88
void
139
89
gst_checksum_sink_dispose (GObject * object)
140
90
{
141
 
  GstChecksumSink *checksumsink;
142
 
 
143
 
  g_return_if_fail (GST_IS_CHECKSUM_SINK (object));
144
 
  checksumsink = GST_CHECKSUM_SINK (object);
145
 
 
146
 
  /* clean up as possible.  may be called multiple times */
147
 
 
148
91
  G_OBJECT_CLASS (parent_class)->dispose (object);
149
92
}
150
93
 
151
94
void
152
95
gst_checksum_sink_finalize (GObject * object)
153
96
{
154
 
  GstChecksumSink *checksumsink;
155
 
 
156
 
  g_return_if_fail (GST_IS_CHECKSUM_SINK (object));
157
 
  checksumsink = GST_CHECKSUM_SINK (object);
158
 
 
159
 
  /* clean up object here */
160
 
 
161
97
  G_OBJECT_CLASS (parent_class)->finalize (object);
162
98
}
163
99
 
164
 
 
165
 
 
166
100
static gboolean
167
101
gst_checksum_sink_start (GstBaseSink * sink)
168
102
{
169
 
 
170
103
  return TRUE;
171
104
}
172
105
 
173
106
static gboolean
174
107
gst_checksum_sink_stop (GstBaseSink * sink)
175
108
{
176
 
 
177
109
  return TRUE;
178
110
}
179
111