mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 12:41:05 +00:00
Merge branch 'master' into 0.11
This commit is contained in:
commit
bace3995d5
2 changed files with 13 additions and 0 deletions
|
@ -715,6 +715,11 @@ gst_rtsp_media_seek (GstRTSPMedia * media, GstRTSPTimeRange * range)
|
||||||
g_return_val_if_fail (GST_IS_RTSP_MEDIA (media), FALSE);
|
g_return_val_if_fail (GST_IS_RTSP_MEDIA (media), FALSE);
|
||||||
g_return_val_if_fail (range != NULL, FALSE);
|
g_return_val_if_fail (range != NULL, FALSE);
|
||||||
|
|
||||||
|
if (media->seekable) {
|
||||||
|
GST_INFO ("pipeline is not seekable");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (range->unit != GST_RTSP_RANGE_NPT)
|
if (range->unit != GST_RTSP_RANGE_NPT)
|
||||||
goto not_supported;
|
goto not_supported;
|
||||||
|
|
||||||
|
@ -1704,6 +1709,7 @@ gst_rtsp_media_prepare (GstRTSPMedia * media)
|
||||||
|
|
||||||
/* reset some variables */
|
/* reset some variables */
|
||||||
media->is_live = FALSE;
|
media->is_live = FALSE;
|
||||||
|
media->seekable = FALSE;
|
||||||
media->buffering = FALSE;
|
media->buffering = FALSE;
|
||||||
/* we're preparing now */
|
/* we're preparing now */
|
||||||
media->status = GST_RTSP_MEDIA_STATUS_PREPARING;
|
media->status = GST_RTSP_MEDIA_STATUS_PREPARING;
|
||||||
|
@ -1755,13 +1761,18 @@ gst_rtsp_media_prepare (GstRTSPMedia * media)
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
case GST_STATE_CHANGE_SUCCESS:
|
case GST_STATE_CHANGE_SUCCESS:
|
||||||
GST_INFO ("SUCCESS state change for media %p", media);
|
GST_INFO ("SUCCESS state change for media %p", media);
|
||||||
|
media->seekable = TRUE;
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_ASYNC:
|
case GST_STATE_CHANGE_ASYNC:
|
||||||
GST_INFO ("ASYNC state change for media %p", media);
|
GST_INFO ("ASYNC state change for media %p", media);
|
||||||
|
media->seekable = TRUE;
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_NO_PREROLL:
|
case GST_STATE_CHANGE_NO_PREROLL:
|
||||||
/* we need to go to PLAYING */
|
/* we need to go to PLAYING */
|
||||||
GST_INFO ("NO_PREROLL state change: live media %p", media);
|
GST_INFO ("NO_PREROLL state change: live media %p", media);
|
||||||
|
/* FIXME we disable seeking for live streams for now. We should perform a
|
||||||
|
* seeking query in preroll instead and do a seeking query. */
|
||||||
|
media->seekable = FALSE;
|
||||||
media->is_live = TRUE;
|
media->is_live = TRUE;
|
||||||
ret = gst_element_set_state (media->pipeline, GST_STATE_PLAYING);
|
ret = gst_element_set_state (media->pipeline, GST_STATE_PLAYING);
|
||||||
if (ret == GST_STATE_CHANGE_FAILURE)
|
if (ret == GST_STATE_CHANGE_FAILURE)
|
||||||
|
|
|
@ -179,6 +179,7 @@ typedef enum {
|
||||||
* @source: the bus watch for pipeline messages.
|
* @source: the bus watch for pipeline messages.
|
||||||
* @id: the id of the watch
|
* @id: the id of the watch
|
||||||
* @is_live: if the pipeline is live
|
* @is_live: if the pipeline is live
|
||||||
|
* @seekable: if the pipeline can perform a seek
|
||||||
* @buffering: if the pipeline is buffering
|
* @buffering: if the pipeline is buffering
|
||||||
* @target_state: the desired target state of the pipeline
|
* @target_state: the desired target state of the pipeline
|
||||||
* @rtpbin: the rtpbin
|
* @rtpbin: the rtpbin
|
||||||
|
@ -220,6 +221,7 @@ struct _GstRTSPMedia {
|
||||||
guint id;
|
guint id;
|
||||||
|
|
||||||
gboolean is_live;
|
gboolean is_live;
|
||||||
|
gboolean seekable;
|
||||||
gboolean buffering;
|
gboolean buffering;
|
||||||
GstState target_state;
|
GstState target_state;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue