mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
media: move unprepare below default implementation
Makes it easier to find the default implementation
This commit is contained in:
parent
0d55e1f50c
commit
693dd3cfc4
1 changed files with 35 additions and 35 deletions
|
@ -1255,41 +1255,6 @@ state_failed:
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_rtsp_media_unprepare:
|
||||
* @media: a #GstRTSPMedia
|
||||
*
|
||||
* Unprepare @media. After this call, the media should be prepared again before
|
||||
* it can be used again. If the media is set to be non-reusable, a new instance
|
||||
* must be created.
|
||||
*
|
||||
* Returns: %TRUE on success.
|
||||
*/
|
||||
gboolean
|
||||
gst_rtsp_media_unprepare (GstRTSPMedia * media)
|
||||
{
|
||||
gboolean success;
|
||||
|
||||
if (media->status == GST_RTSP_MEDIA_STATUS_UNPREPARED)
|
||||
return TRUE;
|
||||
|
||||
GST_INFO ("unprepare media %p", media);
|
||||
media->target_state = GST_STATE_NULL;
|
||||
success = TRUE;
|
||||
|
||||
if (media->status == GST_RTSP_MEDIA_STATUS_PREPARED) {
|
||||
GstRTSPMediaClass *klass;
|
||||
|
||||
klass = GST_RTSP_MEDIA_GET_CLASS (media);
|
||||
if (klass->unprepare)
|
||||
success = klass->unprepare (media);
|
||||
} else {
|
||||
finish_unprepare (media);
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
static void
|
||||
finish_unprepare (GstRTSPMedia * media)
|
||||
{
|
||||
|
@ -1343,6 +1308,41 @@ default_unprepare (GstRTSPMedia * media)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_rtsp_media_unprepare:
|
||||
* @media: a #GstRTSPMedia
|
||||
*
|
||||
* Unprepare @media. After this call, the media should be prepared again before
|
||||
* it can be used again. If the media is set to be non-reusable, a new instance
|
||||
* must be created.
|
||||
*
|
||||
* Returns: %TRUE on success.
|
||||
*/
|
||||
gboolean
|
||||
gst_rtsp_media_unprepare (GstRTSPMedia * media)
|
||||
{
|
||||
gboolean success;
|
||||
|
||||
if (media->status == GST_RTSP_MEDIA_STATUS_UNPREPARED)
|
||||
return TRUE;
|
||||
|
||||
GST_INFO ("unprepare media %p", media);
|
||||
media->target_state = GST_STATE_NULL;
|
||||
success = TRUE;
|
||||
|
||||
if (media->status == GST_RTSP_MEDIA_STATUS_PREPARED) {
|
||||
GstRTSPMediaClass *klass;
|
||||
|
||||
klass = GST_RTSP_MEDIA_GET_CLASS (media);
|
||||
if (klass->unprepare)
|
||||
success = klass->unprepare (media);
|
||||
} else {
|
||||
finish_unprepare (media);
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_rtsp_media_set_state:
|
||||
* @media: a #GstRTSPMedia
|
||||
|
|
Loading…
Reference in a new issue