g_mutex_lock (souphttpsink->mutex);
+ /* FIXME: error handling */
+#if !GLIB_CHECK_VERSION (2, 31, 0)
souphttpsink->thread = g_thread_create (thread_func, souphttpsink,
TRUE, &error);
+#else
+ souphttpsink->thread = g_thread_try_new ("souphttpclientsink-thread",
+ thread_func, souphttpsink, &error);
+#endif
GST_LOG_OBJECT (souphttpsink, "waiting for main loop thread to start up");
g_cond_wait (souphttpsink->cond, souphttpsink->mutex);
g_thread_join (rtpsession->priv->thread);
/* only create a new thread if the old one was stopped. Otherwise we can
* just reuse the currently running one. */
+#if !GLIB_CHECK_VERSION (2, 31, 0)
rtpsession->priv->thread =
g_thread_create ((GThreadFunc) rtcp_thread, rtpsession, TRUE, &error);
+#else
+ rtpsession->priv->thread = g_thread_try_new ("rtpsession-rtcp-thread",
+ (GThreadFunc) rtcp_thread, rtpsession, &error);
+#endif
rtpsession->priv->thread_stopped = FALSE;
}
GST_RTP_SESSION_UNLOCK (rtpsession);
mixer->watch_cond = g_cond_new ();
mixer->watch_shutdown = FALSE;
+#if !GLIB_CHECK_VERSION (2, 31, 0)
mixer->watch_thread = g_thread_create (gst_oss4_mixer_watch_thread,
gst_object_ref (mixer), TRUE, &err);
+#else
+ mixer->watch_thread = g_thread_try_new ("oss4-mixer-thread",
+ gst_oss4_mixer_watch_thread, gst_object_ref (mixer), &err);
+#endif
if (mixer->watch_thread == NULL) {
GST_ERROR_OBJECT (mixer, "Could not create watch thread: %s", err->message);
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
loop = g_main_loop_new (NULL, FALSE);
- if (!(input_thread = g_thread_create (read_user, source, TRUE, NULL))) {
+#if !GLIB_CHECK_VERSION (2, 31, 0)
+ input_thread = g_thread_create (read_user, source, TRUE, NULL);
+#else
+ input_thread = g_thread_try_new ("v4l2src-test", read_user, source, NULL);
+#endif
+
+ if (input_thread == NULL) {
fprintf (stderr, "error: g_thread_create return NULL");
return -1;
}