~ubuntu-branches/ubuntu/saucy/clementine/saucy

« back to all changes in this revision

Viewing changes to src/core/songloader.h

  • Committer: Package Import Robot
  • Author(s): Thomas PIERSON
  • Date: 2012-01-01 20:43:39 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120101204339-lsb6nndwhfy05sde
Tags: 1.0.1+dfsg-1
New upstream release. (Closes: #653926, #651611, #657391)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <QUrl>
23
23
 
24
24
#include "song.h"
 
25
#include "musicbrainz/musicbrainzclient.h"
25
26
 
26
27
#include <boost/shared_ptr.hpp>
27
28
 
53
54
  void set_timeout(int msec) { timeout_ = msec; }
54
55
 
55
56
  Result Load(const QUrl& url);
 
57
  // To effectively load the songs:
 
58
  // when we call Load() on a directory, it will return WillLoadAsync, load the
 
59
  // files with only filenames and emit LoadFinished(). When LoadFinished() is
 
60
  // received by songloaderinserter, it will insert songs (incompletely loaded)
 
61
  // in playlist, and call EffectiveSongsLoad() in a background thread to
 
62
  // perform the real load of the songs. Next, UpdateItems() will be called on
 
63
  // playlist and replace the partially-loaded items by the new ones, fully
 
64
  // loaded.
 
65
  void EffectiveSongsLoad();
 
66
  Result LoadAudioCD();
56
67
 
57
68
signals:
58
69
  void LoadFinished(bool success);
60
71
private slots:
61
72
  void Timeout();
62
73
  void StopTypefind();
 
74
  void AudioCDTagsLoaded(const QString& artist, const QString& album,
 
75
                         const MusicBrainzClient::ResultList& results);
63
76
 
64
77
private:
65
78
  enum State {
70
83
  };
71
84
 
72
85
  Result LoadLocal(const QString& filename, bool block = false, bool ignore_playlists = false);
 
86
  Result LoadLocalPartial(const QString& filename);
73
87
  void LoadLocalDirectory(const QString& filename);
74
88
  void LoadPlaylist(ParserBase* parser, const QString& filename);
75
89
  void LoadLocalDirectoryAndEmit(const QString& filename);
89
103
  void ErrorMessageReceived(GstMessage* msg);
90
104
  void EndOfStreamReached();
91
105
  void MagicReady();
 
106
  bool IsPipelinePlaying();
92
107
 
93
108
private:
94
109
  static QSet<QString> sRawUriSchemes;