[DEV] continue integration of player video

This commit is contained in:
Edouard DUPIN 2017-01-03 22:31:44 +01:00
parent 22c82ecc49
commit 58f880f244
15 changed files with 571 additions and 460 deletions

View File

@ -129,6 +129,9 @@ void appl::Windows::init() {
}
m_composer->loadFromString(composition);
setSubWidget(m_composer);
m_listViewer = ememory::dynamicPointerCast<appl::widget::ListViewer>(m_composer->getSubObjectNamed("ws-name-list-viewer"));
subBind(ewol::widget::Button, "bt-previous", signalPressed, sharedFromThis(), &appl::Windows::onCallbackPrevious);
subBind(ewol::widget::Button, "bt-play", signalValue, sharedFromThis(), &appl::Windows::onCallbackPlay);
subBind(ewol::widget::Button, "bt-next", signalPressed, sharedFromThis(), &appl::Windows::onCallbackNext);
@ -260,6 +263,15 @@ void appl::Windows::onCallbackConnectPassword(const std::string& _value) {
void appl::Windows::onCallbackConnectConnect() {
APPL_INFO("Connect with : '" << m_login << "' ... '" << m_password << "'");
m_clientProp = ememory::makeShared<ClientProperty>();
if (m_clientProp == nullptr) {
APPL_ERROR("Can not create property");
return;
}
m_clientProp->address = "127.0.0.1";
m_clientProp->port = 1983;
// check connection is correct:
zeus::Client client1;
// separate loggin and IP adress ...
@ -271,10 +283,15 @@ void appl::Windows::onCallbackConnectConnect() {
} else {
std::vector<std::string> listElem2 = etk::split(listElem[0], ':');
client1.propertyIp.set(listElem2[0]);
m_clientProp->address = listElem2[0];
if (listElem2.size() >= 1) {
client1.propertyPort.set(etk::string_to_uint32_t(listElem2[1]));
m_clientProp->port = etk::string_to_uint32_t(listElem2[1]);
}
}
m_clientProp->fromUser = login;
m_clientProp->toUser = login;
m_clientProp->pass = m_password;
bool ret = client1.connect(login, m_password);
if (ret == false) {
APPL_ERROR(" ==> NOT Authentify to '" << login << "'");
@ -282,37 +299,41 @@ void appl::Windows::onCallbackConnectConnect() {
} else {
APPL_INFO(" ==> Authentify with '" << login << "'");
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list");
// set the client property interface:
if (m_listViewer == nullptr) {
APPL_ERROR("Nullptr in the viewer ...");
} else {
m_listViewer->setClientProperty(m_clientProp);
}
}
}
void appl::Windows::onCallbackSelectFilms() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "film");
m_listViewer->searchElements("film");
}
void appl::Windows::onCallbackSelectAnnimation() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "annimation");
m_listViewer->searchElements("annimation");
}
void appl::Windows::onCallbackSelectTVShow() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "tv-show");
m_listViewer->searchElements("tv-show");
}
void appl::Windows::onCallbackSelectTvAnnimation() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "tv-annimation");
m_listViewer->searchElements("tv-annimation");
}
void appl::Windows::onCallbackSelectTeather() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "teather");
m_listViewer->searchElements("theater");
}
void appl::Windows::onCallbackSelectOneManShow() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "one-man");
m_listViewer->searchElements("one-man");
}
void appl::Windows::onCallbackSelectSourses() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "courses");
m_listViewer->searchElements("courses");
}

View File

@ -7,6 +7,7 @@
#include <ewol/widget/Windows.hpp>
#include <ewol/widget/Composer.hpp>
#include <appl/widget/ListViewer.hpp>
namespace appl {
class Windows;
@ -17,6 +18,8 @@ namespace appl {
Windows();
void init();
ewol::widget::ComposerShared m_composer;
ememory::SharedPtr<ClientProperty> m_clientProp;
appl::widget::ListViewerShared m_listViewer;
std::vector<std::string> m_list;
int32_t m_id;
public:

View File

@ -14,6 +14,16 @@
#include <ewol/object/Manager.hpp>
#include <etk/tool.hpp>
#include <egami/egami.hpp>
#include <zeus/zeus.hpp>
#include <zeus/Client.hpp>
#include <zeus/service/ProxyVideo.hpp>
#include <zeus/ProxyFile.hpp>
#include <zeus/ObjectRemote.hpp>
#include <echrono/Steady.hpp>
#include <zeus/FutureGroup.hpp>
#include <etk/stdTools.hpp>
#include <ejson/ejson.hpp>
appl::widget::ListViewer::ListViewer() {
addObjectType("appl::widget::ListViewer");
@ -23,21 +33,128 @@ appl::widget::ListViewer::ListViewer() {
void appl::widget::ListViewer::init() {
ewol::Widget::init();
markToRedraw();
m_compImageVideo.setSource("DATA:Video.svg", 128);
m_compImageAudio.setSource("DATA:MusicNote.svg", 128);
//m_compImageVideo.setSource("DATA:Video.svg", 128);
//m_compImageAudio.setSource("DATA:MusicNote.svg", 128);
}
appl::widget::ListViewer::~ListViewer() {
}
void appl::widget::ListViewer::searchElements(std::string _filter) {
m_listElement.clear();
if (m_clientProp == nullptr) {
APPL_ERROR("No client Availlable ...");
return;
}
if (_filter == "film") {
_filter = "'type' == 'film' AND 'production-methode' == 'picture'";
} else if (_filter == "annimation") {
_filter = "'type' == 'film' AND 'production-methode' == 'draw'";
} else if (_filter == "tv-show") {
_filter = "'type' == 'tv-show' AND 'production-methode' == 'picture'";
} else if (_filter == "tv-annimation") {
_filter = "'type' == 'tv-show' AND 'production-methode' == 'draw'";
} else if (_filter == "theater") {
_filter = "'type' == 'theater'";
} else if (_filter == "one-man") {
_filter = "'type' == 'one-man'";
} else if (_filter == "courses") {
_filter = "'type' == 'courses'";
} else {
_filter = "";
}
// check connection is correct:
zeus::Client client1;
// Generate IP and Port in the client interface
client1.propertyIp.set(m_clientProp->address);
client1.propertyPort.set(m_clientProp->port);
// Connection depending on the mode requested
if (m_clientProp->fromUser == m_clientProp->toUser) {
bool ret = client1.connect(m_clientProp->fromUser, m_clientProp->pass);
if (ret == false) {
APPL_ERROR(" ==> NOT Authentify with '" << m_clientProp->toUser << "'");
return;
} else {
APPL_INFO(" ==> Authentify with '" << m_clientProp->toUser << "'");
}
} else if (m_clientProp->fromUser != "") {
bool ret = client1.connect(m_clientProp->fromUser, m_clientProp->toUser, m_clientProp->pass);
if (ret == false) {
APPL_ERROR(" ==> NOT Connected to '" << m_clientProp->toUser << "' with '" << m_clientProp->fromUser << "'");
return;
} else {
APPL_INFO(" ==> Connected with '" << m_clientProp->toUser << "'");
}
} else {
bool ret = client1.connect(m_clientProp->toUser);
if (ret == false) {
APPL_ERROR(" ==> NOT Connected with 'anonymous' to '" << m_clientProp->toUser << "'");
return;
} else {
APPL_INFO(" ==> Connected with 'anonymous' to '" << m_clientProp->toUser << "'");
}
}
// get all the data:
zeus::service::ProxyVideo remoteServiceVideo = client1.getService("video");
// remove all media (for test)
if (remoteServiceVideo.exist() == false) {
APPL_ERROR(" ==> Service does not exist : 'video'");
return;
}
zeus::Future<std::vector<uint32_t>> listElem = remoteServiceVideo.getMediaWhere(_filter);
listElem.wait();
std::vector<uint32_t> returnValues = listElem.get();
APPL_INFO("Get some Values: " << returnValues << "");
for (auto &it : returnValues) {
auto elem = ememory::makeShared<ElementProperty>();
if (elem == nullptr) {
APPL_ERROR("Can not allocate element... " << it);
continue;
}
elem->m_id = it;
elem->m_metadataUpdated = false;
elem->m_title = remoteServiceVideo.mediaMetadataGetKey(it, "title").wait().get();
elem->m_serie = remoteServiceVideo.mediaMetadataGetKey(it, "series-name").wait().get();
elem->m_saison = remoteServiceVideo.mediaMetadataGetKey(it, "saison").wait().get();
elem->m_episode = remoteServiceVideo.mediaMetadataGetKey(it, "episode").wait().get();
elem->m_description = remoteServiceVideo.mediaMetadataGetKey(it, "description").wait().get();
elem->m_mineType = remoteServiceVideo.mediaMineTypeGet(it).wait().get();
if (etk::start_with(elem->m_mineType, "video") == true) {
// TODO : Optimise this ...
elem->m_thumb = egami::load("DATA:Video.svg", ivec2(128,128));
} else if (etk::start_with(elem->m_mineType, "audio") == true) {
// TODO : Optimise this ...
elem->m_thumb = egami::load("DATA:MusicNote.svg", ivec2(128,128));
}
elem->m_metadataUpdated = true;
//elem->m_thumb = remoteServiceVideo.mediaThumbGet(it, 128).wait().get();
m_listElement.push_back(elem);
}
class ElementProperty {
public:
uint32_t id; //!< Remote Id of the Media
bool m_metadataUpdated; //!< Check value to know when metadata is getted (like thumb ...)
egami::Image thumb; //!< simple image describing the element
std::string title; //!< Title of the Element
std::string description; //!< Description of the element
std::string type; //!< video/audio/image/...
// TODO: float globalNote; //!< note over [0,0..1,0]
// TODO: int32_t countPersonalView; //!< number of view this media
// TODO: int64_t globalPersonalView; //!< number of time this media has been viewed
};
}
void appl::widget::ListViewer::onDraw() {
m_draw.draw();
m_compImageVideo.draw();
m_compImageAudio.draw();
m_text.draw();
for (auto &it : m_listDisplay) {
if (it == nullptr) {
continue;
}
it->draw();
}
WidgetScrolled::onDraw();
}
void appl::widget::ListViewer::onRegenerateDisplay() {
@ -45,86 +162,205 @@ void appl::widget::ListViewer::onRegenerateDisplay() {
if (needRedraw() == false) {
return;
}
m_draw.clear();
m_draw.setPos(vec2(10,10));
m_draw.setColor(etk::color::blue);
m_draw.rectangleWidth(m_size-vec2(20,20));
std::u32string errorString = U"No element Availlable";
/*
vec3 curentTextSize = m_text.calculateSizeDecorated(errorString);
// clean the element
m_text.reset();
m_text.setDefaultColorBg(etk::color::red);
m_text.setDefaultColorFg(etk::color::green);
vec2 origin = m_size - vec2(curentTextSize.x(),curentTextSize.y());
origin *= 0.5f;
APPL_INFO("Regenerate display : " << origin << " " << m_origin << " " << m_size);
m_text.setPos(origin);
m_text.setTextAlignement(origin.x(), origin.x(), ewol::compositing::alignLeft);
m_text.setClipping(origin, m_size);
m_text.printDecorated(errorString);
*/
m_text.clear();
int32_t paddingSize = 2;
vec2 tmpMax = propertyMaxSize->getPixel();
// to know the size of one line :
vec3 minSize = m_text.calculateSize(char32_t('A'));
/*
if (tmpMax.x() <= 999999) {
m_text.setTextAlignement(0, tmpMax.x()-2*paddingSize, ewol::compositing::alignLeft);
if (m_listElement.size() == 0) {
int32_t paddingSize = 2;
vec2 tmpMax = propertyMaxSize->getPixel();
// to know the size of one line :
vec3 minSize = m_text.calculateSize(char32_t('A'));
/*
if (tmpMax.x() <= 999999) {
m_text.setTextAlignement(0, tmpMax.x()-2*paddingSize, ewol::compositing::alignLeft);
}
*/
vec3 curentTextSize = m_text.calculateSizeDecorated(errorString);
ivec2 localSize = m_minSize;
// no change for the text orogin :
vec3 tmpTextOrigin((m_size.x() - m_minSize.x()) / 2.0,
(m_size.y() - m_minSize.y()) / 2.0,
0);
if (propertyFill->x() == true) {
localSize.setX(m_size.x());
tmpTextOrigin.setX(0);
}
if (propertyFill->y() == true) {
localSize.setY(m_size.y());
tmpTextOrigin.setY(m_size.y() - 2*paddingSize - curentTextSize.y());
}
tmpTextOrigin += vec3(paddingSize, paddingSize, 0);
localSize -= vec2(2*paddingSize,2*paddingSize);
tmpTextOrigin.setY( tmpTextOrigin.y() + (m_minSize.y()-2*paddingSize) - minSize.y());
vec2 textPos(tmpTextOrigin.x(), tmpTextOrigin.y());
vec3 drawClippingPos(paddingSize, paddingSize, -0.5);
vec3 drawClippingSize((m_size.x() - paddingSize),
(m_size.y() - paddingSize),
1);
// clean the element
m_text.reset();
m_text.setDefaultColorFg(etk::color::red);
m_text.setPos(tmpTextOrigin);
//APPL_INFO("Regenerate display : " << tmpTextOrigin << " " << m_origin << " " << m_size);
//APPL_VERBOSE("[" << getId() << "] {" << errorString << "} display at pos : " << tmpTextOrigin);
m_text.setTextAlignement(tmpTextOrigin.x(), tmpTextOrigin.x()+localSize.x(), ewol::compositing::alignLeft);
m_text.setClipping(drawClippingPos, drawClippingSize);
m_text.printDecorated(errorString);
// call the herited class...
WidgetScrolled::onRegenerateDisplay();
}
*/
vec3 curentTextSize = m_text.calculateSizeDecorated(errorString);
ivec2 localSize = m_minSize;
// no change for the text orogin :
vec3 tmpTextOrigin((m_size.x() - m_minSize.x()) / 2.0,
(m_size.y() - m_minSize.y()) / 2.0,
0);
if (propertyFill->x() == true) {
localSize.setX(m_size.x());
tmpTextOrigin.setX(0);
// Here the real Display get a square in pixel of 2cm x 2cm:
vec2 realPixelSize = gale::Dimension(vec2(3,3), gale::distance::centimeter).getPixel();
// TODO : Understand Why this not work ...
realPixelSize = vec2(150,150);
// This will generate the number of element that can be displayed:
int32_t verticalNumber = m_size.y() / realPixelSize.y() + 2; // +1 for the not entire view of element and +1 for the moving element view ...
//verticalNumber = 10;
// APPL_WARNING("We can see " << verticalNumber << " elements: " << realPixelSize);
// TODO : Remove this ... bad optim ...
//m_listDisplay.clear();
if (m_listDisplay.size() != verticalNumber) {
m_listDisplay.clear();
for (size_t iii=0; iii<verticalNumber; ++iii) {
auto elem = ememory::makeShared<ElementDisplayed>();
m_listDisplay.push_back(elem);
}
}
if (propertyFill->y() == true) {
localSize.setY(m_size.y());
tmpTextOrigin.setY(m_size.y() - 2*paddingSize - curentTextSize.y());
for (size_t iii=0; iii<m_listDisplay.size(); ++iii) {
auto elem = m_listDisplay[iii];
if (elem != nullptr) {
elem->m_idCurentElement = iii;
if (iii < m_listElement.size()) {
elem->m_property = m_listElement[iii];
}
switch(iii) {
case 0:
elem->m_bgColor = etk::color::red;
break;
case 1:
elem->m_bgColor = etk::color::green;
break;
case 2:
elem->m_bgColor = etk::color::orange;
break;
case 3:
elem->m_bgColor = etk::color::purple;
break;
case 4:
elem->m_bgColor = etk::color::gray;
break;
case 5:
elem->m_bgColor = etk::color::cyan;
break;
default:
elem->m_bgColor = etk::color::blue;
break;
}
} else {
APPL_ERROR("create nullptr");
}
}
tmpTextOrigin += vec3(paddingSize, paddingSize, 0);
localSize -= vec2(2*paddingSize,2*paddingSize);
tmpTextOrigin.setY( tmpTextOrigin.y() + (m_minSize.y()-2*paddingSize) - minSize.y());
vec2 textPos(tmpTextOrigin.x(), tmpTextOrigin.y());
vec3 drawClippingPos(paddingSize, paddingSize, -0.5);
vec3 drawClippingSize((m_size.x() - paddingSize),
(m_size.y() - paddingSize),
1);
// clean the element
m_text.reset();
m_text.setDefaultColorFg(etk::color::red);
m_text.setPos(tmpTextOrigin);
APPL_INFO("Regenerate display : " << tmpTextOrigin << " " << m_origin << " " << m_size);
//APPL_VERBOSE("[" << getId() << "] {" << errorString << "} display at pos : " << tmpTextOrigin);
m_text.setTextAlignement(tmpTextOrigin.x(), tmpTextOrigin.x()+localSize.x(), ewol::compositing::alignLeft);
m_text.setClipping(drawClippingPos, drawClippingSize);
m_text.printDecorated(errorString);
// Now we request display of the elements:
vec2 elementSize = vec2(m_size.x(), int32_t(realPixelSize.y()));
vec2 startPos = vec2(0, m_size.y()) - vec2(0, elementSize.y());
for (auto &it : m_listDisplay) {
if (it == nullptr) {
startPos -= vec2(0, elementSize.y());
continue;
}
it->generateDisplay(startPos, elementSize);
startPos -= vec2(0, elementSize.y());
}
m_maxSize.setX(m_size.x());
m_maxSize.setY((float)m_listElement.size()*elementSize.y());
// call the herited class...
WidgetScrolled::onRegenerateDisplay();
}
/*
public:
ememory::SharedPtr<appl::ElementProperty> m_property;
int32_t m_idCurentElement;
etk::Color<float> m_bgColor;
ewol::compositing::Image m_image;
ewol::compositing::Text m_text;
ewol::compositing::Drawing m_draw;
*/
void appl::ElementDisplayed::generateDisplay(vec2 _startPos, vec2 _size) {
m_image.clear();
m_text.clear();
m_draw.clear();
if (m_property == nullptr) {
return;
}
//APPL_INFO("Regenrate size : " << _startPos << " " << _size);
// --------------------------------------------
// -- Create a simple border
// --------------------------------------------
_startPos += vec2(3,3);
_size -= vec2(3,3)*2;
m_draw.setPos(_startPos);
m_draw.setColor(etk::color::black);
m_draw.rectangleWidth(_size);
_startPos += vec2(2,2);
_size -= vec2(2,2)*2;
m_draw.setPos(_startPos);
m_draw.setColor(m_bgColor);
m_draw.rectangleWidth(_size);
// --------------------------------------------
// -- Display text...
// --------------------------------------------
m_text.reset();
m_text.setDefaultColorFg(etk::color::black);
vec3 minSize = m_text.calculateSize(char32_t('A'));
vec2 originText = _startPos + vec2(_size.y()+10, _size.y()-minSize.y() - 10);
m_text.setPos(originText);
//APPL_INFO("Regenerate display : " << tmpTextOrigin << " " << m_origin << " " << m_size);
//APPL_VERBOSE("[" << getId() << "] {" << errorString << "} display at pos : " << tmpTextOrigin);
m_text.setTextAlignement(originText.x(), originText.x()+_size.x()-_size.y(), ewol::compositing::alignLeft);
//m_text.setClipping(drawClippingPos, drawClippingSize);
std::string textToDisplay = "<b>" + m_property->m_title + "</b><br/>";
bool newLine = false;
if (m_property->m_serie != "") {
textToDisplay += "<i>Serie: <b>" + m_property->m_serie + "</b></i><br/>";
}
if (m_property->m_saison != "") {
textToDisplay += "<i>Saison: <b>" + m_property->m_saison + "</b></i> ";
newLine = true;
}
if (m_property->m_episode != "") {
textToDisplay += "<i>Episode: <b>" + m_property->m_episode + "</b></i> ";
newLine = true;
}
if (newLine == true) {
textToDisplay += "<br/>";
}
textToDisplay += "<i>" + m_property->m_description + "</i>";
m_text.printDecorated(textToDisplay);
// --------------------------------------------
// -- Display Image...
// --------------------------------------------
if (etk::start_with(m_property->m_mineType, "video") == true) {
m_image.setSource("DATA:Video.svg", 128);
} else if (etk::start_with(m_property->m_mineType, "audio") == true) {
m_image.setSource("DATA:MusicNote.svg", 128);
} else {
APPL_INFO("Set image: Unknow type '" << m_property->m_mineType << "'");
}
m_image.setPos(_startPos+vec2(10,10));
m_image.print(vec2(_size.y(), _size.y())-vec2(20,20));
}

View File

@ -16,19 +16,59 @@
namespace appl {
class ClientProperty {
public:
std::string login;
std::string fromUser;
std::string toUser;
std::string pass;
std::string address;
uint16_t port;
};
class ElementProperty {
public:
uint32_t m_id; //!< Remote Id of the Media
bool m_metadataUpdated; //!< Check value to know when metadata is getted (like thumb ...)
egami::Image m_thumb; //!< simple image describing the element
std::string m_title; //!< Title of the Element
std::string m_description; //!< Description of the element
std::string m_serie; //!< Name of the serie or empty
std::string m_episode; //!< Id of the Episode or empty
std::string m_saison; //!< id of the saison or empty
std::string m_mineType; //!< mine type: video/audio/image/...
// TODO: float m_globalNote; //!< note over [0,0..1,0]
// TODO: int32_t m_countPersonalView; //!< number of view this media
// TODO: int64_t m_globalPersonalView; //!< number of time this media has been viewed
};
class ElementDisplayed {
public:
ememory::SharedPtr<appl::ElementProperty> m_property;
int32_t m_idCurentElement;
etk::Color<float> m_bgColor;
protected:
ewol::compositing::Image m_image;
ewol::compositing::Text m_text;
ewol::compositing::Drawing m_draw;
public:
void draw() {
m_draw.draw();
m_image.draw();
m_text.draw();
}
void generateDisplay(vec2 _startPos, vec2 _size);
};
namespace widget {
class ListViewer : public ewol::Widget {
class ListViewer;
using ListViewerShared = ememory::SharedPtr<appl::widget::ListViewer>;
using ListViewerWeak = ememory::WeakPtr<appl::widget::ListViewer>;
class ListViewer : public ewol::widget::WidgetScrolled {
protected:
ewol::compositing::Image m_compImageVideo;
ewol::compositing::Image m_compImageAudio;
ewol::compositing::Text m_text;
ewol::compositing::Drawing m_draw;
ememory::SharedPtr<ClientProperty> m_clientProp;
protected:
ememory::SharedPtr<ClientProperty> m_clientProp; //!< Generic entrypoint on the Client
protected:
std::vector<ememory::SharedPtr<ElementProperty>> m_listElement; //!< list of all element getted in the remote access
std::vector<ememory::SharedPtr<ElementDisplayed>> m_listDisplay; //!< list of element in the current local display
protected:
//! @brief constructor
ListViewer();
@ -44,6 +84,7 @@ namespace appl {
void setClientProperty(ememory::SharedPtr<ClientProperty> _prop) {
m_clientProp = _prop;
}
void searchElements(std::string _filter);
};
}
}

View File

@ -1,10 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="512px" height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
<path d="M448,160v64c0,95.094-69.25,173.844-160,189.125V480h48c8.844,0,16,7.156,16,16s-7.156,16-16,16H176
c-8.844,0-16-7.156-16-16s7.156-16,16-16h48v-66.875C133.25,397.844,64,319.094,64,224v-64h32v64
c-0.719,57.625,29.625,111.219,79.438,140.219c49.781,29.031,111.344,29.031,161.156,0c49.781-29,80.125-82.594,79.406-140.219v-64
H448z M256,320c53,0,96-42.969,96-96V96c0-53.016-43-96-96-96s-96,42.984-96,96v128C160,277.031,203,320,256,320z"/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" x="0px" y="0px" width="512px" height="512px" viewBox="0 0 512 512">
<path d="M448,160v64c0,95.094-69.25,173.844-160,189.125V480h48c8.844,0,16,7.156,16,16s-7.156,16-16,16H176
c-8.844,0-16-7.156-16-16s7.156-16,16-16h48v-66.875C133.25,397.844,64,319.094,64,224v-64h32v64
c-0.719,57.625,29.625,111.219,79.438,140.219c49.781,29.031,111.344,29.031,161.156,0c49.781-29,80.125-82.594,79.406-140.219v-64
H448z M256,320c53,0,96-42.969,96-96V96c0-53.016-43-96-96-96s-96,42.984-96,96v128C160,277.031,203,320,256,320z"/>
</svg>

Before

Width:  |  Height:  |  Size: 930 B

After

Width:  |  Height:  |  Size: 576 B

View File

@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="512px" height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
<path d="M160,96v304.625C142.984,390.406,120.703,384,96,384c-53.016,0-96,28.656-96,64s42.984,64,96,64s96-28.656,96-64V256l288-96
v144.625C463,294.406,440.688,288,416,288c-53,0-96,28.656-96,64s43,64,96,64s96-28.656,96-64V0L160,96z M192,224v-72.719
l288-78.563V128L192,224z"/>
</svg>
<svg version="1.1" x="0px" y="0px" width="512px" height="512px" viewBox="0 0 512 512">
<path d="M160,96v304.625C142.984,390.406,120.703,384,96,384c-53.016,0-96,28.656-96,64s42.984,64,96,64s96-28.656,96-64V256l288-96
v144.625C463,294.406,440.688,288,416,288c-53,0-96,28.656-96,64s43,64,96,64s96-28.656,96-64V0L160,96z M192,224v-72.719
l288-78.563V128L192,224z"/>
</svg>

Before

Width:  |  Height:  |  Size: 763 B

After

Width:  |  Height:  |  Size: 411 B

View File

@ -1,60 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="Next.svg">
<metadata
id="metadata18">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs16" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1021"
id="namedview14"
showgrid="true"
inkscape:zoom="7.375"
inkscape:cx="54.666851"
inkscape:cy="11.235725"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid4134" />
</sodipodi:namedview>
<path
style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
d="M 16,52 16,62 51,31.991525 16.003261,2.0107803 16,12 39.259882,32.095879 16,52"
id="path4136"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<svg width="64" height="64">
<path style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
d="M 16,52 16,62 51,31.991525 16.003261,2.0107803 16,12 39.259882,32.095879 16,52"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 335 B

View File

@ -1,60 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="Play.svg">
<metadata
id="metadata18">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs16" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1021"
id="namedview14"
showgrid="true"
inkscape:zoom="7.375"
inkscape:cx="63.516593"
inkscape:cy="28.116649"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid4134" />
</sodipodi:namedview>
<path
style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
d="M 15,2 52,32 15,62 Z"
id="path4176"
inkscape:connector-curvature="0" />
<svg width="64" height="64">
<path style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
d="M 15,2 52,32 15,62 Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 277 B

View File

@ -1,61 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="Previous.svg">
<metadata
id="metadata18">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs16" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1021"
id="namedview14"
showgrid="true"
inkscape:zoom="7.375"
inkscape:cx="54.666851"
inkscape:cy="11.235725"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid4134" />
</sodipodi:namedview>
<path
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 51.26828,52 0,10 -35,-30.008475 L 51.265019,2.0107803 51.26828,12 28.008398,32.095879 51.26828,52"
id="path4136"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<svg width="64" height="64">
<path style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 51.26828,52 0,10 -35,-30.008475 L 51.265019,2.0107803 51.26828,12 28.008398,32.095879 51.26828,52"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 356 B

View File

@ -1,49 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg height="64"
width="64" >
<metadata
id="metadata3975">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3973" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1680"
inkscape:window-height="968"
id="namedview3971"
showgrid="false"
inkscape:zoom="16"
inkscape:cx="27.03623"
inkscape:cy="33.687368"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg3965" />
<path
d="M 39.436904,24.062448 C 39.915614,33.278293 29.16429,41.203307 19.736168,37.727362 10.452887,34.884476 6.7103607,23.258769 12.262163,15.90798 17.329733,7.8698857 31.048441,7.5763012 36.47627,15.419465 c 1.929199,2.496703 2.965789,5.568455 2.960389,8.64209 z"
id="path3969"
style="fill:#ffffff;fill-opacity:0.87450981"
inkscape:connector-curvature="0" />
<path
d="M 58.168,50.56 46.013,38.407 c -0.91442,-0.91442 -2.3016,-1.0644 -3.3865,-0.47161 l -2.592,-2.592 c 2.208,-3.1357 3.5185,-6.9493 3.5185,-11.068 0,-10.629 -8.6485,-19.276 -19.277,-19.276 -10.629,0 -19.276,8.6461 -19.276,19.276 0,10.6299 8.6461,19.277 19.276,19.277 4.1017,0 7.8985,-1.296 11.026,-3.4873 0,0 0.596082,-5.606306 -5.038478,-5.016691 -4.69706,2.902115 -12.054397,2.017375 -15.875086,-3.769003 -3.142722,-4.56604 -2.630816,-13.100523 2.668347,-16.731928 5.299163,-3.631405 14.142128,-3.981951 18.471312,4.363412 2.363082,6.040278 0.78609,12.603632 -5.311526,16.1632 7.665096,7.559567 7.694231,7.60221 7.694231,7.60221 -0.56041,1.0752 -0.40321,2.4348 0.49681,3.3373 l 12.155,12.153 c 1.1088,1.1112 2.9268,1.1112 4.0357,0 l 3.5725,-3.5701 c 1.1064,-1.1088 1.1064,-2.9256 -0.0024,-4.0369 z"
id="path3967"
inkscape:connector-curvature="0"
style="fill:#333333"
sodipodi:nodetypes="ccccssssccczccccccccc" />
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<svg height="64" width="64" >
<path d="M 39.436904,24.062448 C 39.915614,33.278293 29.16429,41.203307 19.736168,37.727362 10.452887,34.884476 6.7103607,23.258769 12.262163,15.90798 17.329733,7.8698857 31.048441,7.5763012 36.47627,15.419465 c 1.929199,2.496703 2.965789,5.568455 2.960389,8.64209 z"
style="fill:#ffffff;fill-opacity:0.87450981"/>
<path d="M 58.168,50.56 46.013,38.407 c -0.91442,-0.91442 -2.3016,-1.0644 -3.3865,-0.47161 l -2.592,-2.592 c 2.208,-3.1357 3.5185,-6.9493 3.5185,-11.068 0,-10.629 -8.6485,-19.276 -19.277,-19.276 -10.629,0 -19.276,8.6461 -19.276,19.276 0,10.6299 8.6461,19.277 19.276,19.277 4.1017,0 7.8985,-1.296 11.026,-3.4873 0,0 0.596082,-5.606306 -5.038478,-5.016691 -4.69706,2.902115 -12.054397,2.017375 -15.875086,-3.769003 -3.142722,-4.56604 -2.630816,-13.100523 2.668347,-16.731928 5.299163,-3.631405 14.142128,-3.981951 18.471312,4.363412 2.363082,6.040278 0.78609,12.603632 -5.311526,16.1632 7.665096,7.559567 7.694231,7.60221 7.694231,7.60221 -0.56041,1.0752 -0.40321,2.4348 0.49681,3.3373 l 12.155,12.153 c 1.1088,1.1112 2.9268,1.1112 4.0357,0 l 3.5725,-3.5701 c 1.1064,-1.1088 1.1064,-2.9256 -0.0024,-4.0369 z"
style="fill:#333333"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,9 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated by IcoMoon.io -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" viewBox="0 0 512 512">
<g>
</g>
<svg version="1.1" width="512" height="512" viewBox="0 0 512 512">
<path d="M63.949 233.687h277.647v216.586h-277.647v-216.586z" fill="#000000" />
<path d="M192.614 142.224c0 44.278-35.737 80.19-79.852 80.19-44.083 0-79.821-35.911-79.821-80.19 0-44.329 35.737-80.22 79.821-80.22 44.103 0 79.852 35.891 79.852 80.22z" fill="#000000" />
<path d="M368.251 141.886c0 44.319-35.748 80.22-79.862 80.22-44.032 0-79.81-35.901-79.81-80.22 0-44.288 35.779-80.169 79.81-80.169 44.114 0 79.862 35.881 79.862 80.169z" fill="#000000" />

Before

Width:  |  Height:  |  Size: 945 B

After

Width:  |  Height:  |  Size: 726 B

View File

@ -1,59 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="VolumeMin.svg">
<metadata
id="metadata18">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs16" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="790"
inkscape:window-height="480"
id="namedview14"
showgrid="false"
inkscape:zoom="3.6875"
inkscape:cx="32"
inkscape:cy="32"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<polygon
id="polygon6"
style="fill:#333333"
points="26.103,394.151 16.142,384.189 7.177,384.189 7.177,372.236 16.142,372.236 26.103,362.274 "
transform="matrix(1.300523,0,0,1.300523,-4.3338536,-458.79144)" />
<path
inkscape:connector-curvature="0"
id="path8"
style="fill:#333333"
d="m 40.621325,22.075639 -3.662273,3.662272 c 1.881857,1.880557 3.048426,4.479002 3.048426,7.344054 0,2.865052 -1.165269,5.463497 -3.048426,7.342753 l 3.662273,3.662273 c 2.819534,-2.819534 4.567437,-6.712 4.567437,-11.006327 0,-4.294327 -1.747903,-8.184191 -4.567437,-11.005025 z" />
<svg width="64" height="64">
<polygon style="fill:#333333"
points="26.103,394.151 16.142,384.189 7.177,384.189 7.177,372.236 16.142,372.236 26.103,362.274 "
transform="matrix(1.300523,0,0,1.300523,-4.3338536,-458.79144)" />
<path style="fill:#333333"
d="m 40.621325,22.075639 -3.662273,3.662272 c 1.881857,1.880557 3.048426,4.479002 3.048426,7.344054 0,2.865052 -1.165269,5.463497 -3.048426,7.342753 l 3.662273,3.662273 c 2.819534,-2.819534 4.567437,-6.712 4.567437,-11.006327 0,-4.294327 -1.747903,-8.184191 -4.567437,-11.005025 z" />
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 627 B

View File

@ -1,60 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="ZoomOut.svg">
<metadata
id="metadata14">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs12" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="790"
inkscape:window-height="480"
id="namedview10"
showgrid="false"
inkscape:zoom="10.429825"
inkscape:cx="27.954015"
inkscape:cy="46.40949"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<path
inkscape:connector-curvature="0"
id="path6"
style="fill:#333333"
d="M 58.168086,50.559665 46.013083,38.407063 c -0.914415,-0.914416 -2.301638,-1.064418 -3.386457,-0.471608 l -2.592043,-2.592043 c 2.208037,-3.135653 3.518459,-6.949316 3.518459,-11.067785 0,-10.628577 -8.648544,-19.2759212 -19.277121,-19.2759212 -10.628577,0 -19.2759216,8.6461442 -19.2759216,19.2759212 0,10.629777 8.6461436,19.277121 19.2759216,19.277121 4.101668,0 7.898531,-1.296021 11.025783,-3.487258 l 2.608844,2.611244 c -0.560409,1.075218 -0.403207,2.43484 0.496808,3.337255 l 12.155003,12.152603 c 1.108818,1.111218 2.926849,1.111218 4.035667,0 l 3.57246,-3.57006 c 1.106418,-1.110018 1.106418,-2.925648 -0.0024,-4.036867 z M 24.274721,36.415029 c -6.700912,0 -12.135803,-5.43489 -12.135803,-12.138202 0,-6.700912 5.434891,-12.135802 12.135803,-12.135802 6.703311,0 12.138202,5.43489 12.138202,12.135802 0,6.702112 -5.434891,12.138202 -12.138202,12.138202 z" />
<path
inkscape:connector-curvature="0"
id="path8"
style="fill:#333333"
d="m 30.23522,21.887587 c -12.0002,0 0,0 -12.0002,0 -1.324822,0 -2.40004,1.075218 -2.40004,2.40004 0,1.326022 1.075218,2.40004 2.40004,2.40004 12.0002,0 0,0 12.0002,0 1.326022,0 2.40004,-1.074018 2.40004,-2.40004 0,-1.323622 -1.072818,-2.40004 -2.40004,-2.40004 z"
sodipodi:nodetypes="ccsccsc" />
<svg width="64" height="64">
<path style="fill:#333333"
d="M 58.168086,50.559665 46.013083,38.407063 c -0.914415,-0.914416 -2.301638,-1.064418 -3.386457,-0.471608 l -2.592043,-2.592043 c 2.208037,-3.135653 3.518459,-6.949316 3.518459,-11.067785 0,-10.628577 -8.648544,-19.2759212 -19.277121,-19.2759212 -10.628577,0 -19.2759216,8.6461442 -19.2759216,19.2759212 0,10.629777 8.6461436,19.277121 19.2759216,19.277121 4.101668,0 7.898531,-1.296021 11.025783,-3.487258 l 2.608844,2.611244 c -0.560409,1.075218 -0.403207,2.43484 0.496808,3.337255 l 12.155003,12.152603 c 1.108818,1.111218 2.926849,1.111218 4.035667,0 l 3.57246,-3.57006 c 1.106418,-1.110018 1.106418,-2.925648 -0.0024,-4.036867 z M 24.274721,36.415029 c -6.700912,0 -12.135803,-5.43489 -12.135803,-12.138202 0,-6.700912 5.434891,-12.135802 12.135803,-12.135802 6.703311,0 12.138202,5.43489 12.138202,12.135802 0,6.702112 -5.434891,12.138202 -12.138202,12.138202 z" />
<path style="fill:#333333"
d="m 30.23522,21.887587 c -12.0002,0 0,0 -12.0002,0 -1.324822,0 -2.40004,1.075218 -2.40004,2.40004 0,1.326022 1.075218,2.40004 2.40004,2.40004 12.0002,0 0,0 12.0002,0 1.326022,0 2.40004,-1.074018 2.40004,-2.40004 0,-1.323622 -1.072818,-2.40004 -2.40004,-2.40004 z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -46,6 +46,53 @@ static uint64_t createUniqueID() {
return m_lastMaxId;
}
static std::string removeSpaceOutQuote(const std::string& _in) {
std::string out;
bool insideQuote = false;
for (auto &it : _in) {
if (it == '\'') {
if (insideQuote == false) {
insideQuote = true;
} else {
insideQuote = false;
}
out += it;
} else if ( it == ' '
&& insideQuote == false) {
// nothing to add ...
} else {
out += it;
}
}
return out;
}
static std::vector<std::string> splitAction(const std::string& _in) {
std::vector<std::string> out;
bool insideQuote = false;
std::string value;
for (auto &it : _in) {
if (it == '\'') {
if (insideQuote == false) {
insideQuote = true;
} else {
insideQuote = false;
}
if (value != "") {
out.push_back(value);
value.clear();
}
} else {
value += it;
}
}
if (value != "") {
out.push_back(value);
}
return out;
}
namespace appl {
class VideoService : public zeus::service::Video {
private:
@ -82,6 +129,25 @@ namespace appl {
}
return out;
}
std::string mediaMineTypeGet(uint32_t _mediaId) override {
std::unique_lock<std::mutex> lock(g_mutex);
// TODO : Check right ...
//Check if the file exist:
bool find = false;
FileProperty property;
for (auto &it : m_listFile) {
if (it.m_id == _mediaId) {
find = true;
property = it;
break;
}
}
if (find == false) {
throw std::invalid_argument("Wrong file ID ...");
}
return property.m_mineType;
}
// Return a File Data (might be a video .tiff/.png/.jpg)
ememory::SharedPtr<zeus::File> mediaGet(uint32_t _mediaId) override {
std::unique_lock<std::mutex> lock(g_mutex);
@ -97,7 +163,7 @@ namespace appl {
}
}
if (find == false) {
throw std::invalid_argument("Wrong file name ...");
throw std::invalid_argument("Wrong file ID ...");
}
return zeus::File::create(g_basePath + property.m_fileName + "." + zeus::getExtention(property.m_mineType), "", property.m_mineType);
}
@ -211,17 +277,78 @@ namespace appl {
throw std::invalid_argument("Wrong KEY ID ...");
}
std::vector<uint32_t> getMediaWhere(std::string _sqlLikeRequest) override {
std::unique_lock<std::mutex> lock(g_mutex);
std::vector<uint32_t> out;
if (_sqlLikeRequest == "") {
throw std::invalid_argument("empty request");
}
std::vector<std::string> listAnd = etk::split(_sqlLikeRequest, "AND");
std::vector<std::vector<std::string>> listAndParsed;
APPL_INFO("Find list AND : ");
for (auto &it : listAnd) {
APPL_INFO(" - '" << it << "'");
it = removeSpaceOutQuote(it);
std::vector<std::string> elements = splitAction(it);
if (elements.size() != 3) {
APPL_ERROR("element : '" + it + "' have wrong spliting " << elements);
throw std::invalid_argument("element : \"" + it + "\" have wrong spliting");
}
if ( elements[1] != "=="
&& elements[1] != "!="
&& elements[1] != ">="
&& elements[1] != "<="
&& elements[1] != ">"
&& elements[1] != "<") {
throw std::invalid_argument("action invalid : '" + elements[1] + "' only availlable : [==,!=,<=,>=,<,>]");
}
APPL_INFO(" - '" << elements[0] << "' action='" << elements[1] << "' with='" << elements[2] << "'");
listAndParsed.push_back(elements);
}
std::unique_lock<std::mutex> lock(g_mutex);
for (auto &it : m_listFile) {
bool isCorrectElement = true;
for (auto &itCheck : listAndParsed) {
// find matadataValue:
auto itM = it.m_metadata.find(itCheck[0]);
if (itM == it.m_metadata.end()) {
// not find key ==> no check to do ...
isCorrectElement = false;
break;
}
if (itCheck[1] == "==") {
if (itM->second != itCheck[2]) {
isCorrectElement = false;
break;
}
} else if (itCheck[1] == "!=") {
if (itM->second == itCheck[2]) {
isCorrectElement = false;
break;
}
} else if (itCheck[1] == "<=") {
if (itM->second < itCheck[2]) {
isCorrectElement = false;
break;
}
} else if (itCheck[1] == ">=") {
if (itM->second > itCheck[2]) {
isCorrectElement = false;
break;
}
} else if (itCheck[1] == "<") {
if (itM->second <= itCheck[2]) {
isCorrectElement = false;
break;
}
} else if (itCheck[1] == ">") {
if (itM->second >= itCheck[2]) {
isCorrectElement = false;
break;
}
}
}
if (isCorrectElement == true) {
out.push_back(it.m_id);
}
}
return out;
}

View File

@ -17,6 +17,11 @@ uint32 mediaIdCount()
vector:uint32 mediaIdGet(uint32,uint32)
// ----------------- media Access -----------------------
#brief:Get the media mine-type
#param:mediaId:Id of the media
#return:A string describing the type of the media
string mediaMineTypeGet(uint32)
#brief:Get a media
#param:mediaId:Id of the media
#return:A file reference on the media (transmission is async)