~ubuntu-branches/ubuntu/vivid/media-hub/vivid-updates

« back to all changes in this revision

Viewing changes to src/core/media/player_stub.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Alberto Aguirre
  • Date: 2014-10-20 13:47:46 UTC
  • mfrom: (1.1.21)
  • Revision ID: package-import@ubuntu.com-20141020134746-mey5bmttfzo29xzm
Tags: 2.0.0+14.10.20141020-0ubuntu1
[ Alberto Aguirre ]
Move worker thread from player stub to service stub.

Show diffs side-by-side

added added

removed removed

Lines of Context:
232
232
    const std::shared_ptr<core::dbus::Object>& object)
233
233
        : d(new Private{parent, object})
234
234
{
235
 
    auto bus = the_session_bus();
236
 
    worker = std::move(std::thread([bus]()
237
 
    {
238
 
        bus->run();
239
 
    }));
240
235
}
241
236
 
242
237
media::PlayerStub::~PlayerStub()
243
238
{
244
 
    auto bus = the_session_bus();
245
 
    bus->stop();
246
 
 
247
 
    if (worker.joinable())
248
 
        worker.join();
249
239
}
250
240
 
251
241
std::shared_ptr<media::TrackList> media::PlayerStub::track_list()