path = klass->make_path_from_uri (client, ctx->uri);
/* get a handle to the configuration of the media in the session */
- sessmedia = gst_rtsp_session_get_media (session, path, &matched);
+ sessmedia = gst_rtsp_session_dup_media (session, path, &matched);
if (!sessmedia)
goto not_found;
/* unmanage the media in the session, returns false if all media session
* are torn down. */
keep_session = gst_rtsp_session_release_media (session, sessmedia);
+ g_object_unref (sessmedia);
/* construct the response now */
code = GST_RTSP_STS_OK;
send_generic_response (client,
GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED, ctx);
g_free (path);
+ g_object_unref (sessmedia);
return FALSE;
}
sig_failed:
send_generic_response (client, sig_result, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
+ g_object_unref (sessmedia);
return FALSE;
}
}
path = klass->make_path_from_uri (client, ctx->uri);
/* get a handle to the configuration of the media in the session */
- sessmedia = gst_rtsp_session_get_media (session, path, &matched);
+ sessmedia = gst_rtsp_session_dup_media (session, path, &matched);
if (!sessmedia)
goto not_found;
/* the state is now READY */
gst_rtsp_session_media_set_rtsp_state (sessmedia, GST_RTSP_STATE_READY);
+ g_object_unref (sessmedia);
g_signal_emit (client, gst_rtsp_client_signals[SIGNAL_PAUSE_REQUEST], 0, ctx);
GST_ERROR ("client %p: no aggregate path %s", client, path);
send_generic_response (client,
GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED, ctx);
+ g_object_unref (sessmedia);
g_free (path);
return FALSE;
}
gst_rtsp_status_as_text (sig_result));
send_generic_response (client, sig_result, ctx);
gst_rtsp_media_unlock (media);
+ g_object_unref (sessmedia);
g_object_unref (media);
return FALSE;
}
send_generic_response (client, GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE,
ctx);
gst_rtsp_media_unlock (media);
+ g_object_unref (sessmedia);
g_object_unref (media);
return FALSE;
}
GST_ERROR ("client %p: pausing not supported", client);
send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
gst_rtsp_media_unlock (media);
+ g_object_unref (sessmedia);
g_object_unref (media);
return FALSE;
}
path = klass->make_path_from_uri (client, uri);
/* get a handle to the configuration of the media in the session */
- sessmedia = gst_rtsp_session_get_media (session, path, &matched);
+ sessmedia = gst_rtsp_session_dup_media (session, path, &matched);
if (!sessmedia)
goto not_found;
gst_rtsp_session_media_set_state (sessmedia, GST_STATE_PLAYING);
gst_rtsp_session_media_set_rtsp_state (sessmedia, GST_RTSP_STATE_PLAYING);
+ g_object_unref (sessmedia);
g_signal_emit (client, gst_rtsp_client_signals[SIGNAL_PLAY_REQUEST], 0, ctx);
GST_ERROR ("client %p: no aggregate path %s", client, path);
send_generic_response (client,
GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED, ctx);
+ g_object_unref (sessmedia);
g_free (path);
return FALSE;
}
send_generic_response (client, sig_result, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
+ g_object_unref (sessmedia);
return FALSE;
}
invalid_state:
ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
+ g_object_unref (sessmedia);
return FALSE;
}
pipeline_error:
ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
+ g_object_unref (sessmedia);
return FALSE;
}
unsuspend_failed:
send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
+ g_object_unref (sessmedia);
return FALSE;
}
invalid_mode:
send_generic_response (client, code, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
+ g_object_unref (sessmedia);
return FALSE;
}
unsupported_mode:
send_generic_response (client, GST_RTSP_STS_METHOD_NOT_ALLOWED, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
+ g_object_unref (sessmedia);
return FALSE;
}
get_rates_error:
send_generic_response (client, GST_RTSP_STS_INTERNAL_SERVER_ERROR, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
+ g_object_unref (sessmedia);
return FALSE;
}
adjust_play_response_failed:
send_generic_response (client, code, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
+ g_object_unref (sessmedia);
return FALSE;
}
rtp_info_error:
send_generic_response (client, GST_RTSP_STS_INTERNAL_SERVER_ERROR, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
+ g_object_unref (sessmedia);
return FALSE;
}
}