opening/closing files and devices is done on NULL <-> READY
authorBenjamin Otte <otte@gnome.org>
Sun, 30 Mar 2003 22:16:47 +0000 (22:16 +0000)
committerBenjamin Otte <otte@gnome.org>
Sun, 30 Mar 2003 22:16:47 +0000 (22:16 +0000)
Original commit message from CVS:
opening/closing files and devices is done on NULL <-> READY

ext/cdparanoia/gstcdparanoia.c

index e4e4f7f421a8d334af72be0a9251faa0c4f64db7..470e270525b8c6fa5418e43dba7a2e74a174b6fe 100644 (file)
@@ -734,22 +734,23 @@ cdparanoia_change_state (GstElement *element)
 
   switch (GST_STATE_TRANSITION (element)) {
        case GST_STATE_NULL_TO_READY:
-               break;
-       case GST_STATE_READY_TO_PAUSED:
                if (!cdparanoia_open (CDPARANOIA (element))) {
                        g_warning ("cdparanoia: failed opening cd");
                        return GST_STATE_FAILURE;
                }
                cdparanoia->seq = 0;
                break;
+       case GST_STATE_READY_TO_PAUSED:
+               break;
        case GST_STATE_PAUSED_TO_PLAYING:
                break;
        case GST_STATE_PLAYING_TO_PAUSED:
                break;
        case GST_STATE_PAUSED_TO_READY:
-               cdparanoia_close (CDPARANOIA (element));
+               /* FIXME: Need code here to reset element to start of cd */
                break;
        case GST_STATE_READY_TO_NULL:
+               cdparanoia_close (CDPARANOIA (element));
                break;
        default:
                break;