- _content_connections.clear ();
-
- for (ContentList::const_iterator i = _content.begin(); i != _content.end(); ++i) {
-
- /* Video is video */
- shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (*i);
- if (vc) {
- _video.push_back (vc);
- }
-
- /* FFmpegContent is audio if we are doing AUDIO_FFMPEG */
- shared_ptr<FFmpegContent> fc = dynamic_pointer_cast<FFmpegContent> (*i);
- if (fc && _audio_from == AUDIO_FFMPEG) {
- _audio.push_back (fc);
- }
-
- /* SndfileContent trumps FFmpegContent for audio */
- shared_ptr<SndfileContent> sc = dynamic_pointer_cast<SndfileContent> (*i);
- if (sc) {
- if (_audio_from == AUDIO_FFMPEG) {
- /* This is our fist SndfileContent; clear any FFmpegContent and
- say that we are using Sndfile.
- */
- _audio.clear ();
- _audio_from = AUDIO_SNDFILE;
- }
-
- _audio.push_back (sc);
- }
-
- _content_connections.push_back ((*i)->Changed.connect (bind (&Playlist::content_changed, this, _1, _2)));
- }