WIP. some transcoding parameters update for video widget

This commit is contained in:
emeric
2014-09-14 17:12:57 +02:00
parent 29df5a889a
commit 55bdc9795f
2 changed files with 33 additions and 7 deletions
+4 -2
View File
@@ -51,12 +51,14 @@ AudioWidget::playTrack(boost::filesystem::path p)
if (user)
bitrate = user->getAudioBitrate();
else
{
LMS_LOG(MOD_UI, SEV_ERROR) << "Can't play video: user does not exists!";
return; // TODO logout?
}
}
Transcode::InputMediaFile inputFile(p);
// TODO get the input stream bitrate and min the result with the desired bitrate
Transcode::Parameters parameters(inputFile, Transcode::Format::get(Transcode::Format::OGA));
parameters.setBitrate(Transcode::Stream::Audio, bitrate);
@@ -70,7 +72,7 @@ AudioWidget::playTrack(boost::filesystem::path p)
if (!covers.empty())
{
LMS_LOG(MOD_UI, SEV_DEBUG) << "Cover found!";
if (!covers.front().scale(256))
if (!covers.front().scale(256)) // TODO
LMS_LOG(MOD_UI, SEV_ERROR) << "Cannot resize!";
//_imgResource->setMimeType(covers.front().getMimeType());