+2005-11-21 Andy Wingo <wingo@pobox.com>
+
+ * *.h:
+ * *.c: Ran scripts/update-macros. Oh yes.
+
2005-11-21 Tim-Philipp Müller <tim at centricular dot net>
* gst/matroska/matroska-demux.c: (gst_matroska_demux_sync_streams):
{
GstTextOverlay *overlay = GST_TEXT_OVERLAY (object);
- GST_LOCK (overlay);
+ GST_OBJECT_LOCK (overlay);
switch (prop_id) {
case ARG_TEXT:{
overlay->need_render = TRUE;
- GST_UNLOCK (overlay);
+ GST_OBJECT_UNLOCK (overlay);
}
static void
{
GstFlacEnc *this = GST_FLACENC (object);
- GST_LOCK (this);
+ GST_OBJECT_LOCK (this);
switch (prop_id) {
case PROP_QUALITY:
break;
}
- GST_UNLOCK (this);
+ GST_OBJECT_UNLOCK (this);
}
static void
{
GstFlacEnc *this = GST_FLACENC (object);
- GST_LOCK (this);
+ GST_OBJECT_LOCK (this);
switch (prop_id) {
case PROP_QUALITY:
break;
}
- GST_UNLOCK (this);
+ GST_OBJECT_UNLOCK (this);
}
static GstStateChangeReturn
const GList *pads = NULL;
GstElement *element = NULL;
- GST_LOCK (bin);
+ GST_OBJECT_LOCK (bin);
elements = bin->children;
/* traverse all elements looking for unconnected pads */
while (elements && pad == NULL) {
element = GST_ELEMENT (elements->data);
- GST_LOCK (element);
+ GST_OBJECT_LOCK (element);
pads = element->pads;
while (pads) {
GstPad *testpad = GST_PAD (pads->data);
/* check if the direction matches */
if (GST_PAD_DIRECTION (testpad) == direction) {
- GST_LOCK (testpad);
+ GST_OBJECT_LOCK (testpad);
if (GST_PAD_PEER (testpad) == NULL) {
- GST_UNLOCK (testpad);
+ GST_OBJECT_UNLOCK (testpad);
/* found it ! */
pad = testpad;
break;
}
- GST_UNLOCK (testpad);
+ GST_OBJECT_UNLOCK (testpad);
}
pads = g_list_next (pads);
}
- GST_UNLOCK (element);
+ GST_OBJECT_UNLOCK (element);
elements = g_list_next (elements);
}
- GST_UNLOCK (bin);
+ GST_OBJECT_UNLOCK (bin);
return pad;
}
{
GstBreakMyData *bmd = GST_BREAK_MY_DATA (object);
- GST_LOCK (bmd);
+ GST_OBJECT_LOCK (bmd);
switch (prop_id) {
case ARG_SEED:
break;
}
- GST_UNLOCK (bmd);
+ GST_OBJECT_UNLOCK (bmd);
}
static void
{
GstBreakMyData *bmd = GST_BREAK_MY_DATA (object);
- GST_LOCK (bmd);
+ GST_OBJECT_LOCK (bmd);
switch (prop_id) {
case ARG_SEED:
break;
}
- GST_UNLOCK (bmd);
+ GST_OBJECT_UNLOCK (bmd);
}
static GstFlowReturn
g_return_val_if_fail (gst_buffer_is_writable (buf), GST_FLOW_ERROR);
- GST_LOCK (bmd);
+ GST_OBJECT_LOCK (bmd);
if (bmd->skipped < bmd->skip) {
i = bmd->skip - bmd->skipped;
/* don't overflow */
bmd->skipped += MIN (G_MAXUINT - bmd->skipped, GST_BUFFER_SIZE (buf));
- GST_UNLOCK (bmd);
+ GST_OBJECT_UNLOCK (bmd);
return GST_FLOW_OK;
}
{
GstBreakMyData *bmd = GST_BREAK_MY_DATA (trans);
- GST_LOCK (bmd);
+ GST_OBJECT_LOCK (bmd);
bmd->rand = g_rand_new_with_seed (bmd->seed);
bmd->skipped = 0;
- GST_UNLOCK (bmd);
+ GST_OBJECT_UNLOCK (bmd);
return TRUE;
}
{
GstBreakMyData *bmd = GST_BREAK_MY_DATA (trans);
- GST_LOCK (bmd);
+ GST_OBJECT_LOCK (bmd);
g_rand_free (bmd->rand);
bmd->rand = NULL;
- GST_UNLOCK (bmd);
+ GST_OBJECT_UNLOCK (bmd);
return TRUE;
}
switch (prop_id) {
case ARG_SEEKOFFSET:
- GST_LOCK (navseek);
+ GST_OBJECT_LOCK (navseek);
navseek->seek_offset = g_value_get_double (value);
- GST_UNLOCK (navseek);
+ GST_OBJECT_UNLOCK (navseek);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
switch (prop_id) {
case ARG_SEEKOFFSET:
- GST_LOCK (navseek);
+ GST_OBJECT_LOCK (navseek);
g_value_set_double (value, navseek->seek_offset);
- GST_UNLOCK (navseek);
+ GST_OBJECT_UNLOCK (navseek);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:
- GST_LOCK (navseek);
+ GST_OBJECT_LOCK (navseek);
if (navseek->loop)
gst_navseek_segseek (navseek);
- GST_UNLOCK (navseek);
+ GST_OBJECT_UNLOCK (navseek);
break;
default:
break;
{
GstNavSeek *navseek = GST_NAVSEEK (basetrans);
- GST_LOCK (navseek);
+ GST_OBJECT_LOCK (navseek);
if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
if (navseek->grab_seg_start) {
}
}
- GST_UNLOCK (navseek);
+ GST_OBJECT_UNLOCK (navseek);
return GST_FLOW_OK;
}
gint hh, mm, ss, i;
glong run_time;
- GST_LOCK (filter);
+ GST_OBJECT_LOCK (filter);
run_time = cur_time.tv_sec - filter->start_time.tv_sec;
hh = (run_time / 3600) % 100;
GST_OBJECT_NAME (filter), hh, mm, ss);
}
- GST_UNLOCK (filter);
+ GST_OBJECT_UNLOCK (filter);
gst_object_unref (peer_pad);
}
filter = GST_PROGRESS_REPORT (trans);
/* Check if update_freq seconds have passed since the last update */
- GST_LOCK (filter);
+ GST_OBJECT_LOCK (filter);
need_update =
((cur_time.tv_sec - filter->last_report.tv_sec) >= filter->update_freq);
- GST_UNLOCK (filter);
+ GST_OBJECT_UNLOCK (filter);
if (need_update) {
gst_progress_report_report (filter, cur_time);
- GST_LOCK (filter);
+ GST_OBJECT_LOCK (filter);
filter->last_report = cur_time;
- GST_UNLOCK (filter);
+ GST_OBJECT_UNLOCK (filter);
}
return GST_FLOW_OK;
switch (prop_id) {
case ARG_UPDATE_FREQ:
- GST_LOCK (filter);
+ GST_OBJECT_LOCK (filter);
filter->update_freq = g_value_get_int (value);
- GST_UNLOCK (filter);
+ GST_OBJECT_UNLOCK (filter);
break;
case ARG_SILENT:
- GST_LOCK (filter);
+ GST_OBJECT_LOCK (filter);
filter->silent = g_value_get_boolean (value);
- GST_UNLOCK (filter);
+ GST_OBJECT_UNLOCK (filter);
break;
default:
break;
switch (prop_id) {
case ARG_UPDATE_FREQ:
- GST_LOCK (filter);
+ GST_OBJECT_LOCK (filter);
g_value_set_int (value, filter->update_freq);
- GST_UNLOCK (filter);
+ GST_OBJECT_UNLOCK (filter);
break;
case ARG_SILENT:
- GST_LOCK (filter);
+ GST_OBJECT_LOCK (filter);
g_value_set_boolean (value, filter->silent);
- GST_UNLOCK (filter);
+ GST_OBJECT_UNLOCK (filter);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
} else {
/* expected values */
- GST_LOCK (test);
+ GST_OBJECT_LOCK (test);
g_value_copy (value, &test->values[prop_id / 2 - 1]);
- GST_UNLOCK (test);
+ GST_OBJECT_UNLOCK (test);
}
}
return;
}
- GST_LOCK (test);
+ GST_OBJECT_LOCK (test);
if (prop_id % 2) {
/* real values */
g_value_copy (&test->values[id], value);
}
- GST_UNLOCK (test);
+ GST_OBJECT_UNLOCK (test);
}
gboolean
break;
}
- GST_LOCK (demux);
+ GST_OBJECT_LOCK (demux);
gst_query_set_position (query, GST_FORMAT_TIME, demux->pos);
- GST_UNLOCK (demux);
+ GST_OBJECT_UNLOCK (demux);
res = TRUE;
break;
break;
}
- GST_LOCK (demux);
+ GST_OBJECT_LOCK (demux);
gst_query_set_duration (query, GST_FORMAT_TIME, demux->duration);
- GST_UNLOCK (demux);
+ GST_OBJECT_UNLOCK (demux);
res = TRUE;
break;
/* check sanity before we start flushing and all that */
if (cur_type == GST_SEEK_TYPE_SET) {
- GST_LOCK (demux);
+ GST_OBJECT_LOCK (demux);
if (!gst_matroskademux_do_index_seek (demux, cur)) {
GST_DEBUG ("No matching seek entry in index");
- GST_UNLOCK (demux);
+ GST_OBJECT_UNLOCK (demux);
return FALSE;
}
GST_DEBUG ("Seek position looks sane");
- GST_UNLOCK (demux);
+ GST_OBJECT_UNLOCK (demux);
}
flush = !!(flags & GST_SEEK_FLAG_FLUSH);
* forever. */
GST_STREAM_LOCK (demux->sinkpad);
- GST_LOCK (demux);
+ GST_OBJECT_LOCK (demux);
/* if nothing configured, play complete file */
if (cur == GST_CLOCK_TIME_NONE)
newsegment_event = gst_event_new_newsegment (FALSE, demux->segment_rate,
GST_FORMAT_TIME, entry->time, demux->segment_stop, entry->time);
- GST_UNLOCK (demux);
+ GST_OBJECT_UNLOCK (demux);
GST_DEBUG ("Stopping flush");
if (flush) {
/* FIXME: shouldn't we either make it a real error or start the task
* function again so that things can continue from where they left off? */
GST_DEBUG ("Got a seek error");
- GST_UNLOCK (demux);
+ GST_OBJECT_UNLOCK (demux);
GST_STREAM_UNLOCK (demux->sinkpad);
return FALSE;
struct count_info count;
GstOssDMABuffer *obuf = (GstOssDMABuffer *) buf;
- GST_LOCK (buf);
+ GST_OBJECT_LOCK (buf);
while (obuf->running) {
if (buf->state == GST_RINGBUFFER_STATE_PLAYING) {
int segsize;
- GST_UNLOCK (buf);
+ GST_OBJECT_UNLOCK (buf);
segsize = buf->spec.segsize;
gst_ringbuffer_callback (buf, count.blocks);
- GST_LOCK (buf);
+ GST_OBJECT_LOCK (buf);
} else {
GST_OSSDMABUFFER_SIGNAL (obuf);
GST_OSSDMABUFFER_WAIT (obuf);
}
}
- GST_UNLOCK (buf);
+ GST_OBJECT_UNLOCK (buf);
}
static gboolean
return FALSE;
}
- GST_LOCK (obuf);
+ GST_OBJECT_LOCK (obuf);
obuf->running = TRUE;
obuf->thread = g_thread_create ((GThreadFunc) gst_ossdmabuffer_func,
buf, TRUE, NULL);
GST_OSSDMABUFFER_WAIT (obuf);
- GST_UNLOCK (obuf);
+ GST_OBJECT_UNLOCK (obuf);
return TRUE;
}
gst_buffer_unref (buf->data);
- GST_LOCK (obuf);
+ GST_OBJECT_LOCK (obuf);
obuf->running = FALSE;
GST_OSSDMABUFFER_SIGNAL (obuf);
- GST_UNLOCK (obuf);
+ GST_OBJECT_UNLOCK (obuf);
g_thread_join (obuf->thread);
typedef struct _GstOssDMABufferClass GstOssDMABufferClass;
#define GST_OSSDMABUFFER_THREAD(buf) (GST_OSSDMABUFFER(buf)->thread)
-#define GST_OSSDMABUFFER_LOCK GST_LOCK
-#define GST_OSSDMABUFFER_UNLOCK GST_UNLOCK
+#define GST_OSSDMABUFFER_LOCK GST_OBJECT_LOCK
+#define GST_OSSDMABUFFER_UNLOCK GST_OBJECT_UNLOCK
#define GST_OSSDMABUFFER_COND(buf) (GST_OSSDMABUFFER(buf)->cond)
#define GST_OSSDMABUFFER_SIGNAL(buf) (g_cond_signal (GST_OSSDMABUFFER_COND (buf)))
-#define GST_OSSDMABUFFER_WAIT(buf) (g_cond_wait (GST_OSSDMABUFFER_COND (buf), GST_GET_LOCK (buf)))
+#define GST_OSSDMABUFFER_WAIT(buf) (g_cond_wait (GST_OSSDMABUFFER_COND (buf), GST_OBJECT_GET_LOCK (buf)))
struct _GstOssDMABuffer {
GstRingBuffer buffer;