Made the player work, first WIP version
This commit is contained in:
@@ -40,6 +40,9 @@
|
||||
#include "admin/DatabaseSettingsView.hpp"
|
||||
#include "admin/AdminWizardView.hpp"
|
||||
|
||||
#include "resource/ImageResource.hpp"
|
||||
#include "resource/TranscodeResource.hpp"
|
||||
|
||||
#include "LmsApplication.hpp"
|
||||
|
||||
namespace UserInterface {
|
||||
@@ -356,6 +359,7 @@ LmsApplication::handleAuthEvent(void)
|
||||
|
||||
// Events from the PlayQueue
|
||||
playqueue->playTrack.connect(player, &MediaPlayer::playTrack);
|
||||
playqueue->playbackStop.connect(player, &MediaPlayer::stop);
|
||||
|
||||
// Events from MediaScanner
|
||||
if (CurrentUser()->isAdmin())
|
||||
|
||||
@@ -26,12 +26,13 @@
|
||||
#include "database/DatabaseHandler.hpp"
|
||||
#include "scanner/MediaScanner.hpp"
|
||||
|
||||
#include "resource/ImageResource.hpp"
|
||||
#include "resource/TranscodeResource.hpp"
|
||||
#include "Auth.hpp"
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
class TranscodeResource;
|
||||
class ImageResource;
|
||||
|
||||
class LmsApplication : public Wt::WApplication
|
||||
{
|
||||
public:
|
||||
|
||||
+43
-2
@@ -21,15 +21,29 @@
|
||||
#include <Wt/WTemplate>
|
||||
#include <Wt/WText>
|
||||
|
||||
#include "av/AvInfo.hpp"
|
||||
#include "utils/Logger.hpp"
|
||||
|
||||
#include "resource/TranscodeResource.hpp"
|
||||
|
||||
#include "LmsApplication.hpp"
|
||||
#include "MediaPlayer.hpp"
|
||||
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
MediaPlayer::MediaPlayer(Wt::WContainerWidget* parent)
|
||||
: Wt::WContainerWidget(parent)
|
||||
{
|
||||
_audio = new Wt::WAudio(this);
|
||||
_audio->setOptions(Wt::WAudio::Autoplay);
|
||||
_audio->setPreloadMode(Wt::WAudio::PreloadNone);
|
||||
|
||||
_audio->ended().connect(std::bind([=] ()
|
||||
{
|
||||
playbackEnded.emit();
|
||||
}));
|
||||
|
||||
auto player = new Wt::WTemplate(Wt::WString::tr("template-mediaplayer"), this);
|
||||
|
||||
auto playPauseBtn = new Wt::WText(Wt::WString::tr("btn-mediaplayer-play"), Wt::XHTMLText);
|
||||
@@ -66,9 +80,36 @@ MediaPlayer::MediaPlayer(Wt::WContainerWidget* parent)
|
||||
}
|
||||
|
||||
void
|
||||
MediaPlayer::playTrack(Database::Track::id_type id)
|
||||
MediaPlayer::playTrack(Database::Track::id_type trackId)
|
||||
{
|
||||
LMS_LOG(UI, DEBUG) << "Playing track ID = " << id;
|
||||
LMS_LOG(UI, DEBUG) << "Playing track ID = " << trackId;
|
||||
|
||||
Wt::Dbo::Transaction transaction(DboSession());
|
||||
auto track = Database::Track::getById(DboSession(), trackId);
|
||||
transaction.commit();
|
||||
|
||||
// Analyse track, select the best media stream
|
||||
Av::MediaFile mediaFile(track->getPath());
|
||||
|
||||
if (!mediaFile.open() || !mediaFile.scan())
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Cannot open file '" << track->getPath();
|
||||
return;
|
||||
}
|
||||
|
||||
auto streamId = mediaFile.getBestStreamId(Av::Stream::Type::Audio);
|
||||
|
||||
_audio->pause();
|
||||
_audio->clearSources();
|
||||
_audio->addSource(LmsApp->getTranscodeResource()->getUrl(trackId, Av::Encoding::MP3, boost::posix_time::seconds(0), streamId));
|
||||
_audio->setPreloadMode(Wt::WAudio::PreloadNone);
|
||||
_audio->play();
|
||||
}
|
||||
|
||||
void
|
||||
MediaPlayer::stop()
|
||||
{
|
||||
_audio->pause();
|
||||
}
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Wt/WSignal>
|
||||
#include <Wt/WAudio>
|
||||
#include <Wt/WContainerWidget>
|
||||
|
||||
#include "database/Types.hpp"
|
||||
@@ -31,6 +32,7 @@ class MediaPlayer : public Wt::WContainerWidget
|
||||
public:
|
||||
MediaPlayer(Wt::WContainerWidget* parent = 0);
|
||||
|
||||
void stop();
|
||||
void playTrack(Database::Track::id_type);
|
||||
|
||||
// Signals
|
||||
@@ -38,6 +40,8 @@ class MediaPlayer : public Wt::WContainerWidget
|
||||
Wt::Signal<void> playPrevious;
|
||||
Wt::Signal<void> playNext;
|
||||
|
||||
private:
|
||||
Wt::WAudio* _audio;
|
||||
};
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
@@ -93,6 +93,7 @@ PlayQueue::stop()
|
||||
{
|
||||
updateCurrentTrack(false);
|
||||
_trackPos.reset();
|
||||
playbackStop.emit();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -47,6 +47,9 @@ class PlayQueue : public Wt::WContainerWidget
|
||||
// Signal emitted when a track is to be played
|
||||
Wt::Signal<Database::Track::id_type> playTrack;
|
||||
|
||||
// Signal emitted when play has to be stopped
|
||||
Wt::Signal<void> playbackStop;
|
||||
|
||||
private:
|
||||
void addSome();
|
||||
void updateInfo();
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "utils/Logger.hpp"
|
||||
#include "utils/Utils.hpp"
|
||||
|
||||
#include "resource/ImageResource.hpp"
|
||||
|
||||
#include "LmsApplication.hpp"
|
||||
#include "Filters.hpp"
|
||||
#include "ArtistView.hpp"
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "utils/Logger.hpp"
|
||||
#include "utils/Utils.hpp"
|
||||
|
||||
#include "resource/ImageResource.hpp"
|
||||
|
||||
#include "LmsApplication.hpp"
|
||||
#include "Filters.hpp"
|
||||
#include "ReleaseView.hpp"
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "utils/Logger.hpp"
|
||||
#include "utils/Utils.hpp"
|
||||
|
||||
#include "resource/ImageResource.hpp"
|
||||
|
||||
#include "LmsApplication.hpp"
|
||||
#include "Filters.hpp"
|
||||
#include "ReleasesView.hpp"
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#include "utils/Logger.hpp"
|
||||
#include "utils/Utils.hpp"
|
||||
|
||||
#include "resource/ImageResource.hpp"
|
||||
|
||||
#include "LmsApplication.hpp"
|
||||
#include "Filters.hpp"
|
||||
#include "TracksView.hpp"
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Emeric Poupon
|
||||
*
|
||||
* This file is part of LMS.
|
||||
*
|
||||
* LMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* LMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <Wt/Http/Request>
|
||||
#include <Wt/Http/Response>
|
||||
|
||||
#include "utils/Logger.hpp"
|
||||
|
||||
#include "AvConvTranscodeStreamResource.hpp"
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
AvConvTranscodeStreamResource::AvConvTranscodeStreamResource(boost::filesystem::path p, Av::TranscodeParameters parameters, Wt::WObject *parent)
|
||||
: Wt::WResource(parent),
|
||||
_filePath(p),
|
||||
_parameters( parameters )
|
||||
{
|
||||
LMS_LOG(UI, DEBUG) << "CONSTRUCTING RESOURCE";
|
||||
}
|
||||
|
||||
AvConvTranscodeStreamResource::~AvConvTranscodeStreamResource()
|
||||
{
|
||||
LMS_LOG(UI, DEBUG) << "DESTRUCTING RESOURCE";
|
||||
beingDeleted();
|
||||
}
|
||||
|
||||
void
|
||||
AvConvTranscodeStreamResource::handleRequest(const Wt::Http::Request& request,
|
||||
Wt::Http::Response& response)
|
||||
{
|
||||
LMS_LOG(UI, DEBUG) << "Handling new request...";
|
||||
|
||||
// see if this request is for a continuation:
|
||||
Wt::Http::ResponseContinuation *continuation = request.continuation();
|
||||
|
||||
LMS_LOG(UI, DEBUG) << "Handling new request. Continuation = " << continuation;
|
||||
|
||||
std::shared_ptr<Av::Transcoder> transcoder;
|
||||
if (continuation)
|
||||
transcoder = boost::any_cast<std::shared_ptr<Av::Transcoder> >(continuation->data());
|
||||
|
||||
if (!transcoder)
|
||||
{
|
||||
LMS_LOG(UI, DEBUG) << "Launching transcoder";
|
||||
transcoder = std::make_shared<Av::Transcoder>( _filePath, _parameters);
|
||||
|
||||
LMS_LOG(UI, DEBUG) << "Mime type set to '" << Av::encoding_to_mimetype(_parameters.getEncoding());
|
||||
response.setMimeType( Av::encoding_to_mimetype(_parameters.getEncoding()) );
|
||||
|
||||
if (!transcoder->start())
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Cannot start transcoder";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!transcoder->isComplete())
|
||||
{
|
||||
std::vector<unsigned char> data;
|
||||
data.reserve(_bufferSize);
|
||||
|
||||
transcoder->process(data, _bufferSize);
|
||||
|
||||
// Give the client all the output data
|
||||
response.out().write(reinterpret_cast<char*>(&data[0]), data.size());
|
||||
|
||||
LMS_LOG(UI, DEBUG) << "Written " << data.size() << " bytes! complete = " << std::boolalpha << transcoder->isComplete();
|
||||
|
||||
if (!response.out())
|
||||
LMS_LOG(UI, ERROR) << "Write failed!";
|
||||
}
|
||||
|
||||
if (!transcoder->isComplete() && response.out()) {
|
||||
continuation = response.createContinuation();
|
||||
continuation->setData(transcoder);
|
||||
LMS_LOG(UI, DEBUG) << "Continuation set to " << continuation;
|
||||
}
|
||||
else
|
||||
LMS_LOG(UI, DEBUG) << "No more data!";
|
||||
}
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Emeric Poupon
|
||||
*
|
||||
* This file is part of LMS.
|
||||
*
|
||||
* LMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* LMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef AVCONV_TRANSCODE_STREAM_RESOURCE_HPP
|
||||
#define AVCONV_TRANSCODE_STREAM_RESOURCE_HPP
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
#include <Wt/WResource>
|
||||
|
||||
#include "av/AvTranscoder.hpp"
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
class AvConvTranscodeStreamResource : public Wt::WResource
|
||||
{
|
||||
public:
|
||||
AvConvTranscodeStreamResource(boost::filesystem::path p, Av::TranscodeParameters parameters, Wt::WObject *parent = 0);
|
||||
~AvConvTranscodeStreamResource();
|
||||
|
||||
void handleRequest(const Wt::Http::Request& request,
|
||||
Wt::Http::Response& response);
|
||||
|
||||
private:
|
||||
boost::filesystem::path _filePath;
|
||||
Av::TranscodeParameters _parameters;
|
||||
|
||||
static const std::size_t _bufferSize = 8192;
|
||||
};
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,15 +41,13 @@ TranscodeResource:: ~TranscodeResource()
|
||||
}
|
||||
|
||||
std::string
|
||||
TranscodeResource::getUrl(Database::Track::id_type trackId, Av::Encoding encoding, std::size_t offset, std::vector<std::size_t> streamIds) const
|
||||
TranscodeResource::getUrl(Database::Track::id_type trackId, Av::Encoding encoding, boost::posix_time::time_duration offset, boost::optional<std::size_t> streamId) const
|
||||
{
|
||||
std::string res = url()+ "&trackid=" + std::to_string(trackId) + "&encoding=" + std::to_string(Av::encoding_to_int(encoding));
|
||||
if (!streamIds.empty())
|
||||
{
|
||||
for (std::size_t streamId : streamIds)
|
||||
res += "&stream=" + std::to_string(streamId);
|
||||
}
|
||||
res += "&offset=" + std::to_string(offset);
|
||||
if (streamId)
|
||||
res += "&stream=" + std::to_string(*streamId);
|
||||
res += "&offset=" + std::to_string(offset.seconds());
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -57,121 +55,107 @@ void
|
||||
TranscodeResource::handleRequest(const Wt::Http::Request& request,
|
||||
Wt::Http::Response& response)
|
||||
{
|
||||
// Retrieve parameters
|
||||
const std::string *trackIdStr = request.getParameter("trackid");
|
||||
const std::string *offsetStr = request.getParameter("offset");
|
||||
const std::string *encodingStr = request.getParameter("encoding");
|
||||
std::vector<std::string> streams = request.getParameterValues ("stream");
|
||||
std::shared_ptr<Av::Transcoder> transcoder;
|
||||
|
||||
LMS_LOG(UI, DEBUG) << "Handling new request...";
|
||||
|
||||
try
|
||||
// First, see if this request is for a continuation
|
||||
Wt::Http::ResponseContinuation *continuation = request.continuation();
|
||||
if (continuation)
|
||||
{
|
||||
std::shared_ptr<Av::Transcoder> transcoder;
|
||||
|
||||
// First, see if this request is for a continuation
|
||||
Wt::Http::ResponseContinuation *continuation = request.continuation();
|
||||
if (continuation)
|
||||
{
|
||||
LMS_LOG(UI, DEBUG) << "Continuation! " << continuation ;
|
||||
transcoder = boost::any_cast<std::shared_ptr<Av::Transcoder> >(continuation->data());
|
||||
if (!transcoder)
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "No transcoder set -> abort!";
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LMS_LOG(UI, DEBUG) << "No continuation yet";
|
||||
|
||||
if (!trackIdStr
|
||||
|| !offsetStr
|
||||
|| !encodingStr)
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Missing transcode parameter";
|
||||
return;
|
||||
}
|
||||
|
||||
Database::Track::id_type trackId = std::stol(*trackIdStr);
|
||||
|
||||
// transactions are not thread safe
|
||||
{
|
||||
Wt::WApplication::UpdateLock lock(LmsApplication::instance());
|
||||
|
||||
Wt::Dbo::Transaction transaction(_db.getSession());
|
||||
|
||||
Database::User::pointer user = _db.getCurrentUser();
|
||||
Database::Track::pointer track = Database::Track::getById(_db.getSession(), trackId);
|
||||
|
||||
if (!track)
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Missing track";
|
||||
return;
|
||||
}
|
||||
|
||||
if (!user)
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Missing user";
|
||||
return;
|
||||
}
|
||||
|
||||
Av::TranscodeParameters parameters;
|
||||
|
||||
parameters.setOffset(boost::posix_time::seconds(std::stol(*offsetStr)));
|
||||
parameters.setEncoding(Av::encoding_from_int(std::stol(*encodingStr)));
|
||||
parameters.setBitrate(Av::Stream::Type::Audio, user->getAudioBitrate() );
|
||||
for (std::string strStream: streams)
|
||||
{
|
||||
LMS_LOG(UI, DEBUG) << "Added stream " << std::stol(strStream);
|
||||
parameters.addStream(std::stol(strStream));
|
||||
}
|
||||
|
||||
LMS_LOG(UI, DEBUG) << "Offset set to " << parameters.getOffset();
|
||||
transcoder = std::make_shared<Av::Transcoder>(track->getPath(), parameters);
|
||||
}
|
||||
|
||||
std::string mimeType = Av::encoding_to_mimetype(transcoder->getParameters().getEncoding());
|
||||
|
||||
LMS_LOG(UI, DEBUG) << "Mime type set to '" << mimeType << "'";
|
||||
response.setMimeType(mimeType);
|
||||
|
||||
if (!transcoder->start())
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Cannot start transcoder";
|
||||
return;
|
||||
}
|
||||
|
||||
LMS_LOG(UI, DEBUG) << "Transcoder started";
|
||||
}
|
||||
|
||||
if (!transcoder->isComplete())
|
||||
{
|
||||
std::vector<unsigned char> data;
|
||||
data.reserve(_chunkSize);
|
||||
|
||||
transcoder->process(data, _chunkSize);
|
||||
|
||||
response.out().write(reinterpret_cast<char*>(&data[0]), data.size());
|
||||
LMS_LOG(UI, DEBUG) << "Written " << data.size() << " bytes! complete = " << std::boolalpha << transcoder->isComplete();
|
||||
|
||||
if (!response.out())
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Write failed!";
|
||||
}
|
||||
}
|
||||
|
||||
if (!transcoder->isComplete() && response.out()) {
|
||||
continuation = response.createContinuation();
|
||||
continuation->setData(transcoder);
|
||||
}
|
||||
else
|
||||
LMS_LOG(UI, DEBUG) << "No more data!";
|
||||
LMS_LOG(UI, DEBUG) << "Continuation! " << continuation ;
|
||||
transcoder = boost::any_cast<std::shared_ptr<Av::Transcoder>>(continuation->data());
|
||||
}
|
||||
catch (std::invalid_argument& e)
|
||||
else
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Invalid argument: " << e.what();
|
||||
Database::Track::id_type trackId;
|
||||
Av::TranscodeParameters parameters;
|
||||
|
||||
LMS_LOG(UI, DEBUG) << "No continuation yet";
|
||||
try
|
||||
{
|
||||
auto trackIdStr = request.getParameter("trackid");
|
||||
if (!trackIdStr)
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Missing trackid transcode parameter!";
|
||||
return;
|
||||
}
|
||||
trackId = std::stol(*request.getParameter("trackid"));
|
||||
|
||||
auto offsetStr = request.getParameter("offset");
|
||||
if (offsetStr)
|
||||
parameters.offset = boost::posix_time::seconds(std::stol(*offsetStr));
|
||||
|
||||
auto encodingStr = request.getParameter("encoding");
|
||||
if (encodingStr)
|
||||
parameters.encoding = Av::encoding_from_int(std::stol(*encodingStr));
|
||||
|
||||
auto streamStr = request.getParameter("stream");
|
||||
if (streamStr)
|
||||
parameters.stream = std::stol(*streamStr);
|
||||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Exception while handling URL parameters: " << e.what();
|
||||
return;
|
||||
}
|
||||
|
||||
// transactions are not thread safe
|
||||
{
|
||||
Wt::WApplication::UpdateLock lock(LmsApplication::instance());
|
||||
|
||||
Wt::Dbo::Transaction transaction(_db.getSession());
|
||||
|
||||
Database::User::pointer user = _db.getCurrentUser();
|
||||
Database::Track::pointer track = Database::Track::getById(_db.getSession(), trackId);
|
||||
|
||||
if (!track)
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Missing track";
|
||||
return;
|
||||
}
|
||||
|
||||
parameters.bitrate = user->getAudioBitrate();
|
||||
transcoder = std::make_shared<Av::Transcoder>(track->getPath(), parameters);
|
||||
}
|
||||
|
||||
std::string mimeType = Av::encoding_to_mimetype(transcoder->getParameters().encoding);
|
||||
|
||||
LMS_LOG(UI, DEBUG) << "Mime type set to '" << mimeType << "'";
|
||||
response.setMimeType(mimeType);
|
||||
|
||||
if (!transcoder->start())
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Cannot start transcoder";
|
||||
return;
|
||||
}
|
||||
|
||||
LMS_LOG(UI, DEBUG) << "Transcoder started";
|
||||
}
|
||||
|
||||
if (!transcoder->isComplete())
|
||||
{
|
||||
std::vector<unsigned char> data;
|
||||
data.reserve(_chunkSize);
|
||||
|
||||
transcoder->process(data, _chunkSize);
|
||||
|
||||
response.out().write(reinterpret_cast<char*>(&data[0]), data.size());
|
||||
LMS_LOG(UI, DEBUG) << "Written " << data.size() << " bytes! complete = " << std::boolalpha << transcoder->isComplete();
|
||||
|
||||
if (!response.out())
|
||||
{
|
||||
LMS_LOG(UI, ERROR) << "Write failed!";
|
||||
}
|
||||
}
|
||||
|
||||
if (!transcoder->isComplete() && response.out())
|
||||
{
|
||||
continuation = response.createContinuation();
|
||||
continuation->setData(transcoder);
|
||||
}
|
||||
else
|
||||
LMS_LOG(UI, DEBUG) << "No more data!";
|
||||
}
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#include <Wt/WResource>
|
||||
|
||||
#include "av/AvTranscoder.hpp"
|
||||
@@ -35,7 +37,7 @@ class TranscodeResource : public Wt::WResource
|
||||
TranscodeResource(Database::Handler& db, Wt::WObject *parent);
|
||||
~TranscodeResource();
|
||||
|
||||
std::string getUrl(Database::Track::id_type trackId, Av::Encoding encoding = Av::Encoding::OGA, size_t offset_secs = 0, std::vector<size_t> streamIds = {}) const;
|
||||
std::string getUrl(Database::Track::id_type trackId, Av::Encoding encoding, boost::posix_time::time_duration offset, boost::optional<size_t> stream = boost::none) const;
|
||||
|
||||
void handleRequest(const Wt::Http::Request& request,
|
||||
Wt::Http::Response& response);
|
||||
|
||||
Reference in New Issue
Block a user