media: move unprepare below default implementation

Makes it easier to find the default implementation
This commit is contained in:
Wim Taymans 2012-10-26 15:23:16 +02:00
parent 0d55e1f50c
commit 693dd3cfc4

View file

@ -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