[DEV] start dev of the remote player

This commit is contained in:
Edouard DUPIN 2016-12-29 21:27:03 +01:00
parent ac206580d3
commit dd16edd4e8
27 changed files with 997 additions and 66 deletions

View File

@ -68,6 +68,29 @@ void installPath(zeus::service::ProxyPicture& _srv, std::string _path, uint32_t
}
}
static std::string extractAndRemove(const std::string& _inputValue, const char _startMark, const char _stopMark, std::vector<std::string>& _values) {
_values.clear();
std::string out;
bool inside=false;
std::string insideData;
for (auto &it : _inputValue) {
if ( inside == false
&& it == _startMark) {
inside = true;
} else if ( inside == true
&& it == _stopMark) {
inside = false;
_values.push_back(insideData);
insideData.clear();
} else if (inside == true) {
insideData += it;
} else {
out += it;
}
}
return out;
}
void installVideoPath(zeus::service::ProxyVideo& _srv, std::string _path, std::map<std::string,std::string> _basicKey = std::map<std::string,std::string>()) {
etk::FSNode node(_path);
@ -160,17 +183,75 @@ void installVideoPath(zeus::service::ProxyVideo& _srv, std::string _path, std::m
|| extention == "mov"
|| extention == "mp4") {
uint32_t mediaId = _srv.mediaAdd(zeus::File::create(itFile)).wait().get();
uint32_t mediaId = _srv.mediaAdd(zeus::File::create(itFile)).waitFor(echrono::seconds(20000)).get();
if (mediaId == 0) {
APPL_ERROR("Get media ID = 0 With no error");
continue;
}
// Parse file name:
std::vector<std::string> listElement = etk::split(itFile, '-');
std::string fileName = etk::split(itFile, '/').back();
APPL_INFO("Find fileName : '" << fileName << "'");
// Remove Date (XXXX)
std::vector<std::string> dates;
fileName = extractAndRemove(fileName, '(', ')', dates);
if (dates.size() > 1) {
APPL_INFO(" '" << fileName << "'");
APPL_ERROR("Parse Date error : () : " << dates);
} else if (dates.size() == 1) {
APPL_INFO(" '" << fileName << "'");
basicKeyTmp.insert(std::pair<std::string,std::string>("date", dates[0]));
}
// Remove the actors [XXX YYY][EEE TTT]...
std::vector<std::string> acthors;
fileName = extractAndRemove(fileName, '[', ']', acthors);
if (acthors.size() > 0) {
APPL_INFO(" '" << fileName << "'");
std::string actorList;
for (auto &itActor : acthors) {
if (actorList != "") {
actorList += ";";
}
actorList += itActor;
}
basicKeyTmp.insert(std::pair<std::string,std::string>("acthors", actorList));
}
// remove extention
fileName = std::string(fileName.begin(), fileName.begin() + fileName.size() - 4);
std::vector<std::string> listElementBase = etk::split(fileName, '-');
std::vector<std::string> listElement;
std::string tmpStartString;
for (size_t iii=0; iii<listElementBase.size(); ++iii) {
if ( listElementBase[iii][0] != 's'
&& listElementBase[iii][0] != 'e') {
if (tmpStartString != "") {
tmpStartString += '-';
}
tmpStartString += listElementBase[iii];
} else {
listElement.push_back(tmpStartString);
tmpStartString = "";
for (/* nothing to do */; iii<listElementBase.size(); ++iii) {
listElement.push_back(listElementBase[iii]);
}
}
}
if (tmpStartString != "") {
listElement.push_back(tmpStartString);
}
if (listElement.size() == 1) {
// nothing to do , it might be a film ...
basicKeyTmp.insert(std::pair<std::string,std::string>("title", etk::to_string(listElement[0])));
} else {
/*
for (auto &itt : listElement) {
APPL_INFO(" " << itt);
}
*/
if ( listElement.size() > 3
&& listElement[1][0] == 's'
&& listElement[2][0] == 'e') {
@ -178,6 +259,9 @@ void installVideoPath(zeus::service::ProxyVideo& _srv, std::string _path, std::m
int32_t saison = -1;
int32_t episode = -1;
std::string seriesName = listElement[0];
basicKeyTmp.insert(std::pair<std::string,std::string>("series-name", etk::to_string(seriesName)));
basicKeyTmp.insert(std::pair<std::string,std::string>("title", etk::to_string(listElement[3])));
if (std::string(&listElement[1][1]) == "XX") {
// saison unknow ... ==> nothing to do ...
} else {
@ -191,18 +275,34 @@ void installVideoPath(zeus::service::ProxyVideo& _srv, std::string _path, std::m
basicKeyTmp.insert(std::pair<std::string,std::string>("episode", etk::to_string(episode)));
}
APPL_INFO("Find a internal mode series: :");
APPL_INFO(" origin : '" << listElement << "'");
APPL_INFO(" recontituated: '" << seriesName << "'-s" << saison << "-e" << episode << "-" << &listElement[3][1]);
// TODO: try to find the date of the media: "(XXXX)"
// TODO: try to find main actor in the media: "[XXX][YYY]"
APPL_INFO(" origin : '" << fileName << "'");
std::string saisonPrint = "XX";
std::string episodePrint = "XX";
if (saison < 0) {
// nothing to do
} else if(saison < 10) {
saisonPrint = "0" + etk::to_string(saison);
basicKeyTmp.insert(std::pair<std::string,std::string>("saison", etk::to_string(saison)));
} else {
saisonPrint = etk::to_string(saison);
basicKeyTmp.insert(std::pair<std::string,std::string>("saison", etk::to_string(saison)));
}
if (episode < 0) {
// nothing to do
} else if(episode < 10) {
episodePrint = "0" + etk::to_string(episode);
basicKeyTmp.insert(std::pair<std::string,std::string>("episode", etk::to_string(episode)));
} else {
episodePrint = etk::to_string(episode);
basicKeyTmp.insert(std::pair<std::string,std::string>("episode", etk::to_string(episode)));
}
APPL_INFO(" recontituated: '" << seriesName << "-s" << saisonPrint << "-e" << episodePrint << "-" << listElement[3] << "'");
}
}
// send all meta data:
zeus::FutureGroup group;
for (auto &itKey : _basicKey) {
for (auto &itKey : basicKeyTmp) {
group.add(_srv.mediaMetadataSetKey(mediaId, itKey.first, itKey.second));
}
group.wait();
@ -237,7 +337,7 @@ int main(int _argc, const char *_argv[]) {
APPL_INFO("==================================");
if (false) {
bool ret = client1.connect("test1~atria-soft.com", "clientTest1~atria-soft.com", "QSDQSDGQSF54HSXWVCSQDJ654URTDJ654NBXCDFDGAEZ51968");
bool ret = client1.connect("test1", "clientTest1~atria-soft.com", "QSDQSDGQSF54HSXWVCSQDJ654URTDJ654NBXCDFDGAEZ51968");
if (ret == false) {
APPL_ERROR(" ==> NOT Connected to 'test1~atria-soft.com' with 'clientTest1~atria-soft.com'");
return -1;
@ -245,7 +345,7 @@ int main(int _argc, const char *_argv[]) {
APPL_INFO(" ==> Connected with 'clientTest1~atria-soft.com'");
}
} else if (true) {
bool ret = client1.connect("test1~atria-soft.com", "coucou");
bool ret = client1.connect("test1", "coucou");
if (ret == false) {
APPL_ERROR(" ==> NOT Authentify with 'test1~atria-soft.com'");
return -1;
@ -253,7 +353,7 @@ int main(int _argc, const char *_argv[]) {
APPL_INFO(" ==> Authentify with 'test1~atria-soft.com'");
}
} else {
bool ret = client1.connect("test1~atria-soft.com");
bool ret = client1.connect("test1");
if (ret == false) {
APPL_ERROR(" ==> NOT Connected with 'anonymous'");
return -1;
@ -389,10 +489,22 @@ int main(int _argc, const char *_argv[]) {
}
}
APPL_INFO(" ----------------------------------");
APPL_INFO(" -- Get service video");
APPL_INFO(" -- Get service video (send DATA) ");
APPL_INFO(" ----------------------------------");
if (true) {
zeus::service::ProxyVideo remoteServiceVideo = client1.getService("video");
// remove all media (for test)
if (remoteServiceVideo.exist() == true) {
uint32_t count = remoteServiceVideo.mediaIdCount().wait().get();
std::vector<uint32_t> list = remoteServiceVideo.mediaIdGet(0,count).wait().get();
zeus::FutureGroup groupWait;
for (auto& it : list) {
APPL_INFO("remove ELEMENT : " << it);
groupWait.add(remoteServiceVideo.mediaRemove(it));
}
groupWait.waitFor(echrono::seconds(2000));
}
// Update path:
if (remoteServiceVideo.exist() == true) {
// Send a full path:

View File

@ -15,6 +15,8 @@
#include <ewol/widget/Manager.hpp>
#include <ewol/context/Context.hpp>
#include <appl/widget/VideoPlayer.hpp>
#include <appl/widget/ListViewer.hpp>
#include <zeus/zeus.hpp>
namespace appl {
class MainApplication : public ewol::context::Application {
@ -64,9 +66,10 @@ namespace appl {
// eneble the search of the font in the system font path
_context.getFontDefault().setUseExternal(true);
// select font preference of der with a basic application size
_context.getFontDefault().set("FreeSerif;DejaVuSansMono", 19);
_context.getFontDefault().set("DejaVuSerif;FreeSerif;DejaVuSansMono", 19);
// set application widget:
appl::widget::VideoDisplay::createManagerWidget(_context.getWidgetManager());
appl::widget::ListViewer::createManagerWidget(_context.getWidgetManager());
// Create the windows
ememory::SharedPtr<appl::Windows> basicWindows = appl::Windows::create();
// configure the ewol context to use the new windows
@ -89,6 +92,7 @@ namespace appl {
*/
int main(int _argc, const char *_argv[]) {
audio::river::init();
zeus::init(_argc, _argv);
return ewol::run(new appl::MainApplication(), _argc, _argv);
}

View File

@ -33,7 +33,7 @@ namespace appl {
virtual ~MessageElement() = default;
};
// class that contain all the element needed for a buffer image transfert:
class MessageElementVideo : public appl::BufferElement {
class MessageElementVideo : public appl::MessageElement {
public:
egami::Image m_image; //!< Image to manage internal data
ivec2 m_imagerealSize; //!< Real size of the image, in OpenGL we need power of 2 border size.
@ -44,7 +44,7 @@ namespace appl {
}
};
class MessageElementAudio : public appl::BufferElement {
class MessageElementAudio : public appl::MessageElement {
public:
std::vector<uint8_t> m_buffer; //!< raw audio data
audio::format m_format; //!< Audio format buffer

View File

@ -9,8 +9,42 @@
#include <appl/Windows.hpp>
#include <ewol/widget/Label.hpp>
#include <ewol/widget/Button.hpp>
#include <ewol/widget/Entry.hpp>
#include <ewol/widget/Slider.hpp>
#include <appl/widget/VideoPlayer.hpp>
#include <ewol/tools/message.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>
static std::string g_baseDBName = "USERDATA:config.json";
void appl::Windows::store_db() {
APPL_DEBUG("Store database [START]");
ejson::Document database;
database.add("login", ejson::String(m_login));
database.add("pass", ejson::String(m_password));
bool retGenerate = database.storeSafe(g_baseDBName);
APPL_ERROR("Store database [STOP] : " << (g_baseDBName) << " ret = " << retGenerate);
}
void appl::Windows::load_db() {
ejson::Document database;
bool ret = database.load(g_baseDBName);
if (ret == false) {
APPL_WARNING(" ==> LOAD error");
}
m_login = database["login"].toString().get();
m_password = database["pass"].toString().get();
}
appl::Windows::Windows():
m_id(0) {
@ -20,29 +54,73 @@ appl::Windows::Windows():
void appl::Windows::init() {
ewol::widget::Windows::init();
load_db();
std::string composition = std::string("");
composition += "<sizer mode='vert'>\n";
composition += " <sizer mode='hori'>\n";
composition += " <button name='bt-previous'>\n";
composition += " <label>\n";
composition += " previous\n";
composition += " </label>\n";
composition += "<wslider name='view-selection' fill='true,true' expand='true,true'>\n";
composition += " <PopUp name='ws-name-connect' >\n";
composition += " <sizer mode='vert' fill='true,true' expand='false,false' lock='true,true' addmode='invert' min-size='45,10%'>\n";
composition += " <label>login</label>\n";
composition += " <entry name='connect-login' fill='true,false' expand='true,false'/>\n";
composition += " <label>password</label>\n";
composition += " <entry name='connect-password' fill='true,false' expand='true,false'/>\n";
composition += " <button name='connect-bt' toggle='false' fill='false,false' expand='true,false' gravity='right'>\n";
composition += " <label>Connect</label>\n";
composition += " </button>\n";
composition += " </sizer>\n";
composition += " </PopUp>\n";
composition += " <sizer mode='vert' name='ws-name-list' fill='true,true' expand='true,true' addmode='invert'>\n";
composition += " <button name='bt-film-picture' expand='true,false' fill='true,true'>\n";
composition += " <label>Films</label>\n";
composition += " </button>\n";
composition += " <button name='bt-play' toggle='true'>\n";
composition += " <label>play</label>\n";
composition += " <label>pause</label>\n";
composition += " <button name='bt-film-draw' expand='true,false' fill='true,true'>\n";
composition += " <label>Annimated films</label>\n";
composition += " </button>\n";
composition += " <button name='bt-next'>\n";
composition += " <label>\n";
composition += " Next\n";
composition += " </label>\n";
composition += " <button name='bt-tv-picture' expand='true,false' fill='true,true'>\n";
composition += " <label>TV Show</label>\n";
composition += " </button>\n";
composition += " <label name='lb-fps'/>\n";
composition += " <label name='lb-time'/>\n";
composition += " <button name='bt-tv-draw' expand='true,false' fill='true,true'>\n";
composition += " <label>Annimated TV Show</label>\n";
composition += " </button>\n";
composition += " <button name='bt-theater' expand='true,false' fill='true,true'>\n";
composition += " <label>Teather</label>\n";
composition += " </button>\n";
composition += " <button name='bt-one-man-show' expand='true,false' fill='true,true'>\n";
composition += " <label>One-man show</label>\n";
composition += " </button>\n";
composition += " <button name='bt-courses' expand='true,false' fill='true,true'>\n";
composition += " <label>Courses</label>\n";
composition += " </button>\n";
composition += " <spacer fill='true,true' expand='true,true'/>\n";
composition += " </sizer>\n";
composition += " <slider name='progress-bar' expand='true,false' fill='true' step='0.01' min='0'/>\n";
composition += " <VideoDisplay name='displayer' expand='true' fill='true'/>\n";
composition += "</sizer>\n";
composition += " <ListViewer name='ws-name-list-viewer' fill='true,true' expand='true,true'/>\n";
composition += " <sizer mode='vert' name='ws-name-player' fill='true,true' expand='true,true'>\n";
composition += " <sizer mode='hori' fill='true,true' expand='true,true'>\n";
composition += " <button name='bt-previous'>\n";
composition += " <label>\n";
composition += " previous\n";
composition += " </label>\n";
composition += " </button>\n";
composition += " <button name='bt-play' toggle='true'>\n";
composition += " <label>play</label>\n";
composition += " <label>pause</label>\n";
composition += " </button>\n";
composition += " <button name='bt-next'>\n";
composition += " <label>\n";
composition += " Next\n";
composition += " </label>\n";
composition += " </button>\n";
composition += " <label name='lb-fps'/>\n";
composition += " <label name='lb-time'/>\n";
composition += " <button name='bt-back'>\n";
composition += " <label>\n";
composition += " back\n";
composition += " </label>\n";
composition += " </button>\n";
composition += " </sizer>\n";
composition += " <slider name='progress-bar' expand='true,false' fill='true' step='0.01' min='0'/>\n";
composition += " <VideoDisplay name='displayer' expand='true' fill='true'/>\n";
composition += " </sizer>\n";
composition += "</wslider>\n";
m_composer = ewol::widget::Composer::create();
if (m_composer == nullptr) {
@ -54,9 +132,28 @@ void appl::Windows::init() {
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);
subBind(ewol::widget::Button, "bt-back", signalPressed, sharedFromThis(), &appl::Windows::onCallbackBack);
subBind(appl::widget::VideoDisplay, "displayer", signalFps, sharedFromThis(), &appl::Windows::onCallbackFPS);
subBind(appl::widget::VideoDisplay, "displayer", signalPosition, sharedFromThis(), &appl::Windows::onCallbackPosition);
subBind(ewol::widget::Slider, "progress-bar", signalChange, sharedFromThis(), &appl::Windows::onCallbackSeekRequest);
subBind(ewol::widget::Entry, "connect-login", signalModify, sharedFromThis(), &appl::Windows::onCallbackConnectLogin);
subBind(ewol::widget::Entry, "connect-password", signalModify, sharedFromThis(), &appl::Windows::onCallbackConnectPassword);
subBind(ewol::widget::Button, "connect-bt", signalPressed, sharedFromThis(), &appl::Windows::onCallbackConnectConnect);
subBind(ewol::widget::Button, "bt-film-picture", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectFilms);
subBind(ewol::widget::Button, "bt-film-draw", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectAnnimation);
subBind(ewol::widget::Button, "bt-tv-picture", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectTVShow);
subBind(ewol::widget::Button, "bt-tv-draw", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectTvAnnimation);
subBind(ewol::widget::Button, "bt-theater", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectTeather);
subBind(ewol::widget::Button, "bt-one-man-show", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectOneManShow);
subBind(ewol::widget::Button, "bt-courses", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectSourses);
propertySetOnWidgetNamed("connect-login", "value", m_login);
propertySetOnWidgetNamed("connect-password", "value", m_password);
}
@ -80,6 +177,10 @@ void appl::Windows::onCallbackPrevious() {
}
}
void appl::Windows::onCallbackBack() {
}
void appl::Windows::onCallbackPlay(const bool& _isPressed) {
ememory::SharedPtr<appl::widget::VideoDisplay> tmpDisp = ememory::dynamicPointerCast<appl::widget::VideoDisplay>(getSubObjectNamed("displayer"));
if (tmpDisp == nullptr) {
@ -147,3 +248,71 @@ void appl::Windows::onCallbackSeekRequest(const float& _value) {
}
void appl::Windows::onCallbackConnectLogin(const std::string& _value) {
m_login = _value;
store_db();
}
void appl::Windows::onCallbackConnectPassword(const std::string& _value) {
m_password = _value;
store_db();
}
void appl::Windows::onCallbackConnectConnect() {
APPL_INFO("Connect with : '" << m_login << "' ... '" << m_password << "'");
// check connection is correct:
zeus::Client client1;
// separate loggin and IP adress ...
std::string login;
std::vector<std::string> listElem = etk::split(m_login, '~');
login = listElem[0];
if (listElem.size() == 1) {
// connnect on local host ... nothing to do
} else {
std::vector<std::string> listElem2 = etk::split(listElem[0], ':');
client1.propertyIp.set(listElem2[0]);
if (listElem2.size() >= 1) {
client1.propertyPort.set(etk::string_to_uint32_t(listElem2[1]));
}
}
bool ret = client1.connect(login, m_password);
if (ret == false) {
APPL_ERROR(" ==> NOT Authentify to '" << login << "'");
ewol::tools::message::displayError("Can not connect the server with <br/>'" + login + "'");
} else {
APPL_INFO(" ==> Authentify with '" << login << "'");
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list");
}
}
void appl::Windows::onCallbackSelectFilms() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "film");
}
void appl::Windows::onCallbackSelectAnnimation() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "annimation");
}
void appl::Windows::onCallbackSelectTVShow() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "tv-show");
}
void appl::Windows::onCallbackSelectTvAnnimation() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "tv-annimation");
}
void appl::Windows::onCallbackSelectTeather() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "teather");
}
void appl::Windows::onCallbackSelectOneManShow() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "one-man");
}
void appl::Windows::onCallbackSelectSourses() {
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer");
ewol::propertySetOnObjectNamed("ws-name-list-viewer", "filter", "courses");
}

View File

@ -22,6 +22,7 @@ namespace appl {
public:
DECLARE_FACTORY(Windows);
public: // callback functions
void onCallbackBack();
void onCallbackPrevious();
void onCallbackPlay(const bool& _isPressed);
void onCallbackNext();
@ -29,6 +30,22 @@ namespace appl {
void onCallbackPosition(const echrono::Duration& _time);
void addFile(const std::string& _file);
void onCallbackSeekRequest(const float& _value);
protected:
std::string m_login;
std::string m_password;
void onCallbackConnectLogin(const std::string& _value);
void onCallbackConnectPassword(const std::string& _value);
void onCallbackConnectConnect();
void load_db();
void store_db();
void onCallbackSelectFilms();
void onCallbackSelectAnnimation();
void onCallbackSelectTVShow();
void onCallbackSelectTvAnnimation();
void onCallbackSelectTeather();
void onCallbackSelectOneManShow();
void onCallbackSelectSourses();
};
}

View File

@ -0,0 +1,130 @@
/** @file
* @author Edouard DUPIN
* @copyright 2016, Edouard DUPIN, all right reserved
* @license GPL v3 (see license file)
*/
#include <appl/debug.hpp>
#include <ewol/widget/Widget.hpp>
#include <appl/debug.hpp>
#include <appl/widget/ListViewer.hpp>
#include <ewol/object/Manager.hpp>
#include <etk/tool.hpp>
appl::widget::ListViewer::ListViewer() {
addObjectType("appl::widget::ListViewer");
}
void appl::widget::ListViewer::init() {
ewol::Widget::init();
markToRedraw();
m_compImageVideo.setSource("DATA:Video.svg", 128);
m_compImageAudio.setSource("DATA:MusicNote.svg", 128);
}
appl::widget::ListViewer::~ListViewer() {
}
void appl::widget::ListViewer::onDraw() {
m_draw.draw();
m_compImageVideo.draw();
m_compImageAudio.draw();
m_text.draw();
}
void appl::widget::ListViewer::onRegenerateDisplay() {
//!< Check if we really need to redraw the display, if not needed, we redraw the previous data ...
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);
}
*/
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);
}

View File

@ -0,0 +1,53 @@
/** @file
* @author Edouard DUPIN
* @copyright 2016, Edouard DUPIN, all right reserved
* @license GPL v3 (see license file)
*/
#pragma once
#include <ewol/widget/Widget.hpp>
#include <ewol/compositing/Image.hpp>
#include <ewol/compositing/Text.hpp>
#include <ewol/compositing/Drawing.hpp>
#include <ewol/widget/Manager.hpp>
#include <esignal/Signal.hpp>
namespace appl {
class ClientProperty {
public:
std::string login;
std::string pass;
std::string address;
uint16_t port;
};
namespace widget {
class ListViewer : public ewol::Widget {
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:
//! @brief constructor
ListViewer();
void init() override;
public:
DECLARE_WIDGET_FACTORY(ListViewer, "ListViewer");
//! @brief destructor
virtual ~ListViewer();
public:
void onDraw() override;
void onRegenerateDisplay() override;
public:
void setClientProperty(ememory::SharedPtr<ClientProperty> _prop) {
m_clientProp = _prop;
}
};
}
}

View File

@ -33,7 +33,7 @@ void appl::widget::VideoDisplay::init() {
// set call all time (sample ...).
getObjectManager().periodicCall.connect(sharedFromThis(), &appl::widget::VideoDisplay::periodicEvent);
// Create the VBO:
m_VBO = gale::resource::VirtualMessageObject::create(NB_VBO);
m_VBO = gale::resource::VirtualBufferObject::create(NB_VBO);
if (m_VBO == nullptr) {
APPL_ERROR("can not instanciate VBO ...");
return;
@ -181,41 +181,41 @@ void appl::widget::VideoDisplay::printPart(const vec2& _size,
//EWOL_ERROR("Debug image " << m_filename << " ==> " << m_position << " " << _size << " " << _sourcePosStart << " " << _sourcePosStop);
vec3 point = m_position;
vec2 tex(_sourcePosStart.x(),_sourcePosStop.y());
m_VBO->pushOnMessage(m_vboIdCoord, point);
m_VBO->pushOnMessage(m_vboIdCoordTex, tex);
m_VBO->pushOnMessage(m_vboIdColor, m_color);
m_VBO->pushOnBuffer(m_vboIdCoord, point);
m_VBO->pushOnBuffer(m_vboIdCoordTex, tex);
m_VBO->pushOnBuffer(m_vboIdColor, m_color);
tex.setValue(_sourcePosStop.x(),_sourcePosStop.y());
point.setX(m_position.x() + _size.x());
point.setY(m_position.y());
m_VBO->pushOnMessage(m_vboIdCoord, point);
m_VBO->pushOnMessage(m_vboIdCoordTex, tex);
m_VBO->pushOnMessage(m_vboIdColor, m_color);
m_VBO->pushOnBuffer(m_vboIdCoord, point);
m_VBO->pushOnBuffer(m_vboIdCoordTex, tex);
m_VBO->pushOnBuffer(m_vboIdColor, m_color);
tex.setValue(_sourcePosStop.x(),_sourcePosStart.y());
point.setX(m_position.x() + _size.x());
point.setY(m_position.y() + _size.y());
m_VBO->pushOnMessage(m_vboIdCoord, point);
m_VBO->pushOnMessage(m_vboIdCoordTex, tex);
m_VBO->pushOnMessage(m_vboIdColor, m_color);
m_VBO->pushOnBuffer(m_vboIdCoord, point);
m_VBO->pushOnBuffer(m_vboIdCoordTex, tex);
m_VBO->pushOnBuffer(m_vboIdColor, m_color);
m_VBO->pushOnMessage(m_vboIdCoord, point);
m_VBO->pushOnMessage(m_vboIdCoordTex, tex);
m_VBO->pushOnMessage(m_vboIdColor, m_color);
m_VBO->pushOnBuffer(m_vboIdCoord, point);
m_VBO->pushOnBuffer(m_vboIdCoordTex, tex);
m_VBO->pushOnBuffer(m_vboIdColor, m_color);
tex.setValue(_sourcePosStart.x(),_sourcePosStart.y());
point.setX(m_position.x());
point.setY(m_position.y() + _size.y());
m_VBO->pushOnMessage(m_vboIdCoord, point);
m_VBO->pushOnMessage(m_vboIdCoordTex, tex);
m_VBO->pushOnMessage(m_vboIdColor, m_color);
m_VBO->pushOnBuffer(m_vboIdCoord, point);
m_VBO->pushOnBuffer(m_vboIdCoordTex, tex);
m_VBO->pushOnBuffer(m_vboIdColor, m_color);
tex.setValue(_sourcePosStart.x(),_sourcePosStop.y());
point.setX(m_position.x());
point.setY(m_position.y());
m_VBO->pushOnMessage(m_vboIdCoord, point);
m_VBO->pushOnMessage(m_vboIdCoordTex, tex);
m_VBO->pushOnMessage(m_vboIdColor, m_color);
m_VBO->pushOnBuffer(m_vboIdCoord, point);
m_VBO->pushOnBuffer(m_vboIdCoordTex, tex);
m_VBO->pushOnBuffer(m_vboIdColor, m_color);
m_VBO->flush();
}
@ -242,7 +242,7 @@ void appl::widget::VideoDisplay::periodicEvent(const ewol::event::Time& _event)
m_currentTime = m_decoder->m_seekApply;
m_decoder->m_seekApply = echrono::Duration(-1);
if (m_audioInterface != nullptr) {
m_audioInterface->clearInternalMessage();
m_audioInterface->clearInternalBuffer();
}
}
// SET AUDIO:

View File

@ -45,7 +45,7 @@ namespace appl {
static const int32_t m_vboIdCoord;
static const int32_t m_vboIdCoordTex;
static const int32_t m_vboIdColor;
ememory::SharedPtr<gale::resource::VirtualMessageObject> m_VBO;
ememory::SharedPtr<gale::resource::VirtualBufferObject> m_VBO;
protected:
etk::Color<float,4> m_color;
vec3 m_position;

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="64" height="64">
<g transform="matrix(1.1999968,0,0,1.3606385,-147.9521,-648.3007)">
<path d="m 170.351,504.021 c -0.343,0.365 -0.922,0.385 -1.288,0.043 L 150.392,486.63 c -0.365,-0.342 -0.966,-0.342 -1.332,0 l -18.204,16.97 c -0.367,0.344 -0.945,0.322 -1.287,-0.045 l -1.865,-2 c -0.342,-0.365 -0.321,-0.945 0.045,-1.287 l 21.313,-19.869 c 0.367,-0.342 0.967,-0.342 1.334,0.002 l 21.777,20.334 c 0.365,0.342 0.386,0.922 0.043,1.289 l -1.865,1.997 z"
style="fill:#333333"/>
<path d="m 149.725,489.777 -15.345,14.305 v 14.83 c 0,0.504 0.414,0.918 0.919,0.918 h 10.085 v -12.857 c 0,-0.504 0.414,-0.918 0.919,-0.918 h 7.347 c 0.506,0 0.918,0.414 0.918,0.918 v 12.857 h 10.119 c 0.505,0 0.918,-0.414 0.918,-0.918 v -14.307 l -15.88,-14.828 z"
style="fill:#333333"/>
<path d="m 165.543,482.311 c 0,-0.506 -0.414,-0.92 -0.919,-0.92 h -5.51 c -0.505,0 -0.918,0.414 -0.918,0.92 v 1.604 l 7.347,6.918 v -8.522 z"
style="fill:#333333"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="64" height="64">
<g transform="matrix(1.1999733,0,0,1.1999733,-364.43055,-494.42419)">
<path d="m 352.572,429.142 c 0,0.494 -0.406,0.9 -0.9,0.9 h -43.201 c -0.494,0 -0.9,-0.406 -0.9,-0.9 v -8.099 c 0,-0.496 0.406,-0.9 0.9,-0.9 h 43.201 c 0.494,0 0.9,0.404 0.9,0.9 v 8.099 z"
style="fill:#333333" />
<path d="m 352.572,443.542 c 0,0.494 -0.406,0.9 -0.9,0.9 h -43.201 c -0.494,0 -0.9,-0.406 -0.9,-0.9 v -8.1 c 0,-0.496 0.406,-0.9 0.9,-0.9 h 43.201 c 0.494,0 0.9,0.404 0.9,0.9 v 8.1 z"
style="fill:#333333" />
<path d="m 352.572,457.942 c 0,0.494 -0.406,0.898 -0.9,0.898 h -43.201 c -0.494,0 -0.9,-0.404 -0.9,-0.898 v -8.102 c 0,-0.494 0.406,-0.898 0.9,-0.898 h 43.201 c 0.494,0 0.9,0.404 0.9,0.898 v 8.102 z"
style="fill:#333333" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 842 B

View File

@ -0,0 +1,10 @@
<?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>

After

Width:  |  Height:  |  Size: 930 B

View File

@ -0,0 +1,9 @@
<?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>

After

Width:  |  Height:  |  Size: 763 B

View File

@ -0,0 +1,60 @@
<?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>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,60 @@
<?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>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,61 @@
<?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>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,49 @@
<?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" />
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,12 @@
<?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>
<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" />
<path d="M359.168 289.229h38.902v105.523h-38.902v-105.523z" fill="#000000" />
<path d="M415.191 287.826v94.423l63.867 63.856v-208.24z" fill="#000000" />
</svg>

After

Width:  |  Height:  |  Size: 945 B

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="64" height="64">
<g transform="matrix(1.300523,0,0,1.300523,-4.3338536,-458.79144)">
<polygon points="16.142,372.236 26.103,362.274 26.103,394.151 16.142,384.189 7.177,384.189 7.177,372.236 "
style="fill:#333333" />
<path d="m 34.567,369.749 -2.816,2.816 c 1.447,1.446 2.344,3.444 2.344,5.647 0,2.203 -0.896,4.201 -2.344,5.646 l 2.816,2.816 c 2.168,-2.168 3.512,-5.161 3.512,-8.463 0,-3.302 -1.344,-6.293 -3.512,-8.462 z"
style="fill:#333333" />
<path d="m 39.704,365.025 -2.816,2.816 c 2.645,2.645 4.283,6.297 4.283,10.324 0,4.027 -1.639,7.68 -4.283,10.324 l 2.816,2.816 c 3.365,-3.367 5.451,-8.015 5.451,-13.141 0,-5.123 -2.086,-9.771 -5.451,-13.139 z"
style="fill:#333333" />
<path d="m 44.56,359.854 -2.816,2.816 c 3.982,3.982 6.449,9.48 6.449,15.543 0,6.063 -2.467,11.561 -6.447,15.543 l 2.814,2.816 c 4.705,-4.704 7.617,-11.197 7.617,-18.359 0,-7.162 -2.914,-13.655 -7.617,-18.359 z"
style="fill:#333333" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,59 @@
<?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>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="64" height="64">
<g transform="matrix(1.2249898,0,0,1.2249898,-3.7905268,-358.08412)">
<polygon points="16.82,325.684 7.176,325.684 7.176,312.827 16.82,312.827 27.534,302.112 27.534,336.398 "
style="fill:#333333" />
<path d="m 47.081,319.255 4.918,-4.917 c 0.238,-0.24 0.238,-0.631 0,-0.87 l -2.607,-2.606 c -0.237,-0.238 -0.629,-0.238 -0.866,0 l -4.919,4.918 -4.92,-4.918 c -0.236,-0.238 -0.629,-0.238 -0.867,0 l -2.605,2.606 c -0.239,0.239 -0.239,0.63 0,0.87 l 4.917,4.917 -4.917,4.917 c -0.239,0.24 -0.239,0.632 0,0.87 l 2.607,2.607 c 0.236,0.236 0.629,0.236 0.867,0 l 4.918,-4.919 4.916,4.919 c 0.24,0.236 0.632,0.236 0.869,0 l 2.607,-2.607 c 0.236,-0.237 0.236,-0.63 0,-0.87 l -4.918,-4.917 z"
style="fill:#333333" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 820 B

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="64" height="64">
<g transform="matrix(1.20002,0,0,1.20002,-651.97375,-639.15903)">
<path d="m 591.775,574.756 -10.129,-10.127 c -0.762,-0.762 -1.918,-0.887 -2.822,-0.393 l -2.16,-2.16 c 1.84,-2.613 2.932,-5.791 2.932,-9.223 0,-8.857 -7.207,-16.063 -16.064,-16.063 -8.857,0 -16.063,7.205 -16.063,16.063 0,8.858 7.205,16.064 16.063,16.064 3.418,0 6.582,-1.08 9.188,-2.906 l 2.174,2.176 c -0.467,0.896 -0.336,2.029 0.414,2.781 l 10.129,10.127 c 0.924,0.926 2.439,0.926 3.363,0 l 2.977,-2.975 c 0.922,-0.925 0.922,-2.438 -0.002,-3.364 z m -28.244,-11.787 c -5.584,0 -10.113,-4.529 -10.113,-10.115 0,-5.584 4.529,-10.113 10.113,-10.113 5.586,0 10.115,4.529 10.115,10.113 0,5.585 -4.529,10.115 -10.115,10.115 z"
style="fill:#333333" />
<path d="m 568.498,550.863 h -3 v -3 c 0,-1.104 -0.895,-2 -2,-2 -1.104,0 -2,0.896 -2,2 v 3 h -3 c -1.104,0 -2,0.896 -2,2 0,1.105 0.896,2 2,2 h 3 v 3 c 0,1.105 0.896,2 2,2 1.105,0 2,-0.895 2,-2 v -3 h 3 c 1.105,0 2,-0.895 2,-2 0,-1.103 -0.894,-2 -2,-2 z"
style="fill:#333333" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,60 @@
<?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>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -34,17 +34,22 @@ def configure(target, my_module):
'appl/Windows.cpp',
'appl/MediaDecoder.cpp',
'appl/widget/VideoPlayer.cpp',
'appl/widget/ListViewer.cpp',
])
my_module.add_depend([
'ffmpeg-libs',
'ewol',
'audio-river'
'audio-river',
'zeus',
'zeus-service-video',
'ejson',
])
my_module.add_flag('c++', [
"-DPROJECT_NAME=\"\\\""+my_module.get_name()+"\\\"\"",
"-DAPPL_VERSION=\"\\\"" + tools.version_to_string(get_version()) + "\\\"\"",
"-Wno-deprecated-declarations"
])
my_module.copy_path('data/*')
my_module.add_path(".")
return True

View File

@ -156,11 +156,15 @@ namespace appl {
//Check if the file exist:
bool find = false;
FileProperty property;
for (auto &it : m_listFile) {
if (it.m_id == _mediaId) {
for (auto it = m_listFile.begin();
it != m_listFile.end();
/* No increment */) {
if (it->m_id == _mediaId) {
it = m_listFile.erase(it);
find = true;
property = it;
break;
property = *it;
} else {
++it;
}
}
if (find == false) {

View File

@ -73,7 +73,7 @@ namespace appl {
return m_listFile.size();
}
std::vector<uint32_t> mediaIdGetName(uint32_t _start, uint32_t _stop) override {
std::vector<uint32_t> mediaIdGet(uint32_t _start, uint32_t _stop) override {
std::unique_lock<std::mutex> lock(g_mutex);
// TODO : Check right ...
std::vector<uint32_t> out;
@ -146,11 +146,15 @@ namespace appl {
//Check if the file exist:
bool find = false;
FileProperty property;
for (auto &it : m_listFile) {
if (it.m_id == _mediaId) {
for (auto it = m_listFile.begin();
it != m_listFile.end();
/* No increment */) {
if (it->m_id == _mediaId) {
it = m_listFile.erase(it);
find = true;
property = it;
break;
property = *it;
} else {
++it;
}
}
if (find == false) {

View File

@ -14,7 +14,7 @@ uint32 mediaIdCount()
#param:start:First Id of the media stream requested (range [0..+inf[)
#param:stop:Last Id of the media stream requested (excluded) (range [0..+inf[)
#return:List of the media Ids
vector:uint32 mediaIdGetName(uint32,uint32)
vector:uint32 mediaIdGet(uint32,uint32)
// ----------------- media Access -----------------------
#brief:Get a media