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:
Steve Baker 2002-06-07 19:32:53 +00:00
parent 439f3240e3
commit 075ca64022
2 changed files with 12 additions and 10 deletions

View file

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

View file

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