mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 22:01:27 +00:00
file is opened in ready->paused rather than null->ready. this makes it easier to set the location more than once
Original commit message from CVS: file is opened in ready->paused rather than null->ready. this makes it easier to set the location more than once
This commit is contained in:
parent
439f3240e3
commit
075ca64022
2 changed files with 12 additions and 10 deletions
|
@ -644,19 +644,20 @@ gst_filesrc_change_state (GstElement *element)
|
|||
|
||||
switch (GST_STATE_TRANSITION (element)) {
|
||||
case GST_STATE_NULL_TO_READY:
|
||||
break;
|
||||
case GST_STATE_READY_TO_NULL:
|
||||
break;
|
||||
case GST_STATE_READY_TO_PAUSED:
|
||||
if (!GST_FLAG_IS_SET (element, GST_FILESRC_OPEN)) {
|
||||
if (!gst_filesrc_open_file (GST_FILESRC (element)))
|
||||
return GST_STATE_FAILURE;
|
||||
}
|
||||
break;
|
||||
case GST_STATE_READY_TO_NULL:
|
||||
case GST_STATE_PAUSED_TO_READY:
|
||||
if (GST_FLAG_IS_SET (element, GST_FILESRC_OPEN))
|
||||
gst_filesrc_close_file (GST_FILESRC (element));
|
||||
break;
|
||||
case GST_STATE_READY_TO_PAUSED:
|
||||
case GST_STATE_PAUSED_TO_READY:
|
||||
src->curoffset = 0;
|
||||
src->seek_happened = TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -644,19 +644,20 @@ gst_filesrc_change_state (GstElement *element)
|
|||
|
||||
switch (GST_STATE_TRANSITION (element)) {
|
||||
case GST_STATE_NULL_TO_READY:
|
||||
break;
|
||||
case GST_STATE_READY_TO_NULL:
|
||||
break;
|
||||
case GST_STATE_READY_TO_PAUSED:
|
||||
if (!GST_FLAG_IS_SET (element, GST_FILESRC_OPEN)) {
|
||||
if (!gst_filesrc_open_file (GST_FILESRC (element)))
|
||||
return GST_STATE_FAILURE;
|
||||
}
|
||||
break;
|
||||
case GST_STATE_READY_TO_NULL:
|
||||
case GST_STATE_PAUSED_TO_READY:
|
||||
if (GST_FLAG_IS_SET (element, GST_FILESRC_OPEN))
|
||||
gst_filesrc_close_file (GST_FILESRC (element));
|
||||
break;
|
||||
case GST_STATE_READY_TO_PAUSED:
|
||||
case GST_STATE_PAUSED_TO_READY:
|
||||
src->curoffset = 0;
|
||||
src->seek_happened = TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue