gst_segment_init (&demux->segment, GST_FORMAT_TIME);
/* push based data */
- demux->ffpipe.tlock = g_mutex_new ();
- demux->ffpipe.cond = g_cond_new ();
+ g_mutex_init (&demux->ffpipe.tlock);
+ g_cond_init (&demux->ffpipe.cond);
demux->ffpipe.adapter = gst_adapter_new ();
/* blacklist unreliable push-based demuxers */
demux = (GstFFMpegDemux *) object;
- g_mutex_free (demux->ffpipe.tlock);
- g_cond_free (demux->ffpipe.cond);
+ g_mutex_clear (&demux->ffpipe.tlock);
+ g_cond_clear (&demux->ffpipe.cond);
gst_object_unref (demux->ffpipe.adapter);
gst_object_unref (demux->task);
/* pipe protocol helpers */
#define GST_FFMPEG_PIPE_MUTEX_LOCK(m) G_STMT_START { \
GST_LOG_OBJECT (m, "locking tlock from thread %p", g_thread_self ()); \
- g_mutex_lock (m->tlock); \
+ g_mutex_lock (&m->tlock); \
GST_LOG_OBJECT (m, "locked tlock from thread %p", g_thread_self ()); \
} G_STMT_END
#define GST_FFMPEG_PIPE_MUTEX_UNLOCK(m) G_STMT_START { \
- GST_LOG_OBJECT (m, "unlocking tlock from thread %p", g_thread_self ()); \
- g_mutex_unlock (m->tlock); \
+ GST_LOG_OBJECT (&m, "unlocking tlock from thread %p", g_thread_self ()); \
+ g_mutex_unlock (&m->tlock); \
} G_STMT_END
#define GST_FFMPEG_PIPE_WAIT(m) G_STMT_START { \
GST_LOG_OBJECT (m, "thread %p waiting", g_thread_self ()); \
- g_cond_wait (m->cond, m->tlock); \
+ g_cond_wait (&m->cond, &m->tlock); \
} G_STMT_END
#define GST_FFMPEG_PIPE_SIGNAL(m) G_STMT_START { \
GST_LOG_OBJECT (m, "signalling from thread %p", g_thread_self ()); \
- g_cond_signal (m->cond); \
+ g_cond_signal (&m->cond); \
} G_STMT_END
typedef struct _GstFFMpegPipe GstFFMpegPipe;
struct _GstFFMpegPipe
{
/* lock for syncing */
- GMutex *tlock;
+ GMutex tlock;
/* with TLOCK */
/* signals counterpart thread to have a look */
- GCond *cond;
+ GCond cond;
/* seen eos */
gboolean eos;
/* flowreturn obtained by src task */