mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
Use getters and setters in property code
Use the getters and setters for the timeout property instead of locking ourselves.
This commit is contained in:
parent
734dedaeac
commit
c5b06ab5f8
1 changed files with 2 additions and 6 deletions
|
@ -88,9 +88,7 @@ gst_rtsp_session_pool_get_property (GObject *object, guint propid,
|
|||
|
||||
switch (propid) {
|
||||
case PROP_MAX_SESSIONS:
|
||||
g_mutex_lock (pool->lock);
|
||||
g_value_set_uint (value, pool->max_sessions);
|
||||
g_mutex_unlock (pool->lock);
|
||||
g_value_set_uint (value, gst_rtsp_session_pool_get_max_sessions (pool));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, propid, pspec);
|
||||
|
@ -106,9 +104,7 @@ gst_rtsp_session_pool_set_property (GObject *object, guint propid,
|
|||
|
||||
switch (propid) {
|
||||
case PROP_MAX_SESSIONS:
|
||||
g_mutex_lock (pool->lock);
|
||||
pool->max_sessions = g_value_get_uint (value);
|
||||
g_mutex_unlock (pool->lock);
|
||||
gst_rtsp_session_pool_set_max_sessions (pool, g_value_get_uint (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, propid, pspec);
|
||||
|
|
Loading…
Reference in a new issue