~ubuntu-branches/ubuntu/jaunty/moon/jaunty

« back to all changes in this revision

Viewing changes to src/mediaelement.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-03-06 10:09:49 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090306100949-pgxjxjqltaxi12rz
Tags: 1.0.1-0ubuntu1
New upstream release (LP: #338665)

Show diffs side-by-side

added added

removed removed

Lines of Context:
689
689
        SetCanPause (false);
690
690
        SetCanSeek (false);
691
691
        SetDownloadProgress (0);
692
 
        
693
 
        SetState (MediaElement::Error);
694
 
        
 
692
 
 
693
        // Always terminate the downloader, even if we will transition
 
694
        // to the next item in the playlist in case of Surface::GetRelaxedMediaMode
695
695
        DownloaderAbort ();
696
 
        
697
 
        Emit (MediaFailedEvent, args);
 
696
 
 
697
        if (!GetSurface ()->GetRelaxedMediaMode () || 
 
698
                playlist == NULL || playlist->IsCurrentEntryLastEntry ()) {
 
699
                // This will cause the entire playlist to stop playing, even if there
 
700
                // are entries after the current item that may be consumable
 
701
                SetState (MediaElement::Error);
 
702
                Emit (MediaFailedEvent, args);
 
703
        } else {
 
704
                // This allows the playlist to continue playing
 
705
                // even though the current item was invalid
 
706
                Emit (MediaEndedEvent);
 
707
                playlist->OnEntryEnded ();
 
708
        }
698
709
}
699
710
 
700
711
Point