[DEV] continue integration of the media player with zeus
This commit is contained in:
parent
24e7c0efc8
commit
84c9ca1cdc
@ -304,3 +304,25 @@ void appl::GateWay::onPropertyChangeServicePort() {
|
|||||||
void appl::GateWay::onPropertyChangeServiceMax() {
|
void appl::GateWay::onPropertyChangeServiceMax() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if it take a long time without activity to kill itself ...
|
||||||
|
bool appl::GateWay::checkIsAlive(const echrono::Duration& _timeout) {
|
||||||
|
// if no roueter, no delay to check
|
||||||
|
if (*propertyRouterNo == true) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// If no router ==> dead
|
||||||
|
if (m_routerClient == nullptr) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// check only for smallest time-out : 1 second.
|
||||||
|
if (_timeout > echrono::seconds(1)) {
|
||||||
|
echrono::Steady now = echrono::Steady::now();
|
||||||
|
echrono::Steady lastTransmission = m_routerClient->getLastTransmission();
|
||||||
|
if ((now - lastTransmission) >= _timeout) {
|
||||||
|
APPL_INFO("Detect timeout ... last transmission=" << lastTransmission);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
@ -54,6 +54,8 @@ namespace appl {
|
|||||||
uint16_t getId();
|
uint16_t getId();
|
||||||
bool serviceExist(const std::string& _service);
|
bool serviceExist(const std::string& _service);
|
||||||
uint16_t serviceClientIdGet(const std::string& _service);
|
uint16_t serviceClientIdGet(const std::string& _service);
|
||||||
|
// Check if it take a long time without activity to kill itself ...
|
||||||
|
bool checkIsAlive(const echrono::Duration& _timeout);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -403,4 +403,20 @@ void appl::RouterInterface::clean() {
|
|||||||
}
|
}
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echrono::Steady appl::RouterInterface::getLastTransmission() {
|
||||||
|
auto receive = m_interfaceWeb.getLastTimeReceive();
|
||||||
|
auto send = m_interfaceWeb.getLastTimeSend();
|
||||||
|
if (receive >= send) {
|
||||||
|
if (receive == 0) {
|
||||||
|
return echrono::Steady::now();
|
||||||
|
}
|
||||||
|
return receive;
|
||||||
|
}
|
||||||
|
if (send == 0) {
|
||||||
|
return echrono::Steady::now();
|
||||||
|
}
|
||||||
|
return send;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ namespace appl {
|
|||||||
bool isAlive();
|
bool isAlive();
|
||||||
void send(const ememory::SharedPtr<zeus::Message>& _data);
|
void send(const ememory::SharedPtr<zeus::Message>& _data);
|
||||||
void clean();
|
void clean();
|
||||||
|
echrono::Steady getLastTransmission();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,6 +136,7 @@ int main(int _argc, const char *_argv[]) {
|
|||||||
// The default service port is 1985
|
// The default service port is 1985
|
||||||
m_client.propertyPort.set(1985);
|
m_client.propertyPort.set(1985);
|
||||||
#endif
|
#endif
|
||||||
|
uint32_t routerDisconnectionDelay = 30;
|
||||||
for (int32_t iii=0; iii<_argc ; ++iii) {
|
for (int32_t iii=0; iii<_argc ; ++iii) {
|
||||||
std::string data = _argv[iii];
|
std::string data = _argv[iii];
|
||||||
if (etk::start_with(data, "--user=") == true) {
|
if (etk::start_with(data, "--user=") == true) {
|
||||||
@ -146,6 +147,8 @@ int main(int _argc, const char *_argv[]) {
|
|||||||
basicGateway.propertyRouterIp.set(std::string(&data[12]));
|
basicGateway.propertyRouterIp.set(std::string(&data[12]));
|
||||||
} else if (etk::start_with(data, "--router-port=") == true) {
|
} else if (etk::start_with(data, "--router-port=") == true) {
|
||||||
basicGateway.propertyRouterPort.set(etk::string_to_uint16_t(std::string(&data[14])));
|
basicGateway.propertyRouterPort.set(etk::string_to_uint16_t(std::string(&data[14])));
|
||||||
|
} else if (etk::start_with(data, "--router-delay=") == true) {
|
||||||
|
routerDisconnectionDelay = etk::string_to_uint32_t(std::string(&data[15]));
|
||||||
} else if (etk::start_with(data, "--service-ip=") == true) {
|
} else if (etk::start_with(data, "--service-ip=") == true) {
|
||||||
basicGateway.propertyServiceIp.set(std::string(&data[13]));
|
basicGateway.propertyServiceIp.set(std::string(&data[13]));
|
||||||
#ifdef GATEWAY_ENABLE_LAUNCHER
|
#ifdef GATEWAY_ENABLE_LAUNCHER
|
||||||
@ -174,11 +177,12 @@ int main(int _argc, const char *_argv[]) {
|
|||||||
APPL_PRINT(" " << _argv[0] << " [options]");
|
APPL_PRINT(" " << _argv[0] << " [options]");
|
||||||
APPL_PRINT(" --user=XXX Name of the user that we are connected.");
|
APPL_PRINT(" --user=XXX Name of the user that we are connected.");
|
||||||
APPL_PRINT(" --no-router Router connection disable ==> this enable the direct donnection of external client like on the router");
|
APPL_PRINT(" --no-router Router connection disable ==> this enable the direct donnection of external client like on the router");
|
||||||
APPL_PRINT(" --router-ip=XXX Router connection IP (default: 1.7.0.0.1)");
|
APPL_PRINT(" --router-ip=XXX Router connection IP (default: " << basicGateway.propertyRouterIp.get() << ")");
|
||||||
APPL_PRINT(" --router-port=XXX Router connection PORT (default: 1984)");
|
APPL_PRINT(" --router-port=XXX Router connection PORT (default: " << basicGateway.propertyRouterPort.get() << ")");
|
||||||
APPL_PRINT(" --service-ip=XXX Service connection IP (default: 1.7.0.0.1)");
|
APPL_PRINT(" --service-ip=XXX Service connection IP (default: " << basicGateway.propertyServiceIp.get() << ")");
|
||||||
APPL_PRINT(" --service-port=XXX Service connection PORT (default: 1985)");
|
APPL_PRINT(" --service-port=XXX Service connection PORT (default: " << basicGateway.propertyServicePort.get() << ")");
|
||||||
APPL_PRINT(" --service-max=XXX Service Maximum IO (default: 15)");
|
APPL_PRINT(" --service-max=XXX Service Maximum IO (default: " << basicGateway.propertyServiceMax.get() << ")");
|
||||||
|
APPL_PRINT(" --router-delay=XXX Delay before disconnect from the router (default: " << routerDisconnectionDelay << ")");
|
||||||
#ifdef GATEWAY_ENABLE_LAUNCHER
|
#ifdef GATEWAY_ENABLE_LAUNCHER
|
||||||
APPL_PRINT(" specific for internal launcher:");
|
APPL_PRINT(" specific for internal launcher:");
|
||||||
APPL_PRINT(" --base-path=XXX base path to search data (default: 'USERDATA:')");
|
APPL_PRINT(" --base-path=XXX base path to search data (default: 'USERDATA:')");
|
||||||
@ -193,13 +197,19 @@ int main(int _argc, const char *_argv[]) {
|
|||||||
basicGateway.start();
|
basicGateway.start();
|
||||||
#ifdef GATEWAY_ENABLE_LAUNCHER
|
#ifdef GATEWAY_ENABLE_LAUNCHER
|
||||||
if (services.size() == 0) {
|
if (services.size() == 0) {
|
||||||
|
bool routerAlive = true;
|
||||||
#endif
|
#endif
|
||||||
while (true) {
|
while (routerAlive == true) {
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||||
basicGateway.cleanIO();
|
basicGateway.cleanIO();
|
||||||
|
routerAlive = basicGateway.checkIsAlive(echrono::seconds(routerDisconnectionDelay));
|
||||||
|
if (routerAlive == false) {
|
||||||
|
APPL_WARNING("Router is Dead or Timeout");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#ifdef GATEWAY_ENABLE_LAUNCHER
|
#ifdef GATEWAY_ENABLE_LAUNCHER
|
||||||
} else {
|
} else {
|
||||||
|
bool routerAlive = true;
|
||||||
std::vector<ememory::SharedPtr<PlugginAccess>> listElements;
|
std::vector<ememory::SharedPtr<PlugginAccess>> listElements;
|
||||||
for (auto &it: services) {
|
for (auto &it: services) {
|
||||||
ememory::SharedPtr<PlugginAccess> tmp = ememory::makeShared<PlugginAccess>(it);
|
ememory::SharedPtr<PlugginAccess> tmp = ememory::makeShared<PlugginAccess>(it);
|
||||||
@ -215,7 +225,8 @@ int main(int _argc, const char *_argv[]) {
|
|||||||
it->publish(m_client);
|
it->publish(m_client);
|
||||||
}
|
}
|
||||||
uint32_t iii = 0;
|
uint32_t iii = 0;
|
||||||
while(m_client.isAlive() == true) {
|
while ( m_client.isAlive() == true
|
||||||
|
&& routerAlive == true) {
|
||||||
m_client.pingIsAlive();
|
m_client.pingIsAlive();
|
||||||
m_client.displayConnectedObject();
|
m_client.displayConnectedObject();
|
||||||
m_client.cleanDeadObject();
|
m_client.cleanDeadObject();
|
||||||
@ -223,8 +234,14 @@ int main(int _argc, const char *_argv[]) {
|
|||||||
it->peridic_call();
|
it->peridic_call();
|
||||||
}
|
}
|
||||||
basicGateway.cleanIO();
|
basicGateway.cleanIO();
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
routerAlive = basicGateway.checkIsAlive(echrono::seconds(routerDisconnectionDelay));
|
||||||
APPL_INFO("service in waiting ... " << iii << "/inf");
|
if (routerAlive == false) {
|
||||||
|
APPL_WARNING("Router is Dead or Timeout");
|
||||||
|
} else {
|
||||||
|
elog::flush();
|
||||||
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||||
|
APPL_INFO("service in waiting ... " << iii << "/inf");
|
||||||
|
}
|
||||||
iii++;
|
iii++;
|
||||||
}
|
}
|
||||||
for (auto &it: listElements) {
|
for (auto &it: listElements) {
|
||||||
@ -241,5 +258,6 @@ int main(int _argc, const char *_argv[]) {
|
|||||||
APPL_INFO("==================================");
|
APPL_INFO("==================================");
|
||||||
APPL_INFO("== ZEUS gateway stop ==");
|
APPL_INFO("== ZEUS gateway stop ==");
|
||||||
APPL_INFO("==================================");
|
APPL_INFO("==================================");
|
||||||
|
elog::flush();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -191,6 +191,7 @@ int main(int _argc, const char *_argv[]) {
|
|||||||
for (auto &it: listElements) {
|
for (auto &it: listElements) {
|
||||||
it->uninit();
|
it->uninit();
|
||||||
}
|
}
|
||||||
|
elog::flush();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,82 +55,16 @@ appl::Windows::Windows():
|
|||||||
void appl::Windows::init() {
|
void appl::Windows::init() {
|
||||||
ewol::widget::Windows::init();
|
ewol::widget::Windows::init();
|
||||||
load_db();
|
load_db();
|
||||||
std::string composition = std::string("");
|
|
||||||
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-film-draw' expand='true,false' fill='true,true'>\n";
|
|
||||||
composition += " <label>Annimated films</label>\n";
|
|
||||||
composition += " </button>\n";
|
|
||||||
composition += " <button name='bt-tv-picture' expand='true,false' fill='true,true'>\n";
|
|
||||||
composition += " <label>TV Show</label>\n";
|
|
||||||
composition += " </button>\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 += " <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();
|
m_composer = ewol::widget::Composer::create();
|
||||||
if (m_composer == nullptr) {
|
if (m_composer == nullptr) {
|
||||||
APPL_CRITICAL(" An error occured ... in the windows creatrion ...");
|
APPL_CRITICAL(" An error occured ... in the windows creatrion ...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_composer->loadFromString(composition);
|
m_composer->loadFromFile("DATA:gui.xml");
|
||||||
setSubWidget(m_composer);
|
setSubWidget(m_composer);
|
||||||
|
|
||||||
m_listViewer = ememory::dynamicPointerCast<appl::widget::ListViewer>(m_composer->getSubObjectNamed("ws-name-list-viewer"));
|
m_listViewer = ememory::dynamicPointerCast<appl::widget::ListViewer>(m_composer->getSubObjectNamed("ws-name-list-viewer"));
|
||||||
|
m_listViewer->signalSelect.connect(sharedFromThis(), &appl::Windows::onCallbackSelectMedia);
|
||||||
|
|
||||||
subBind(ewol::widget::Button, "bt-previous", signalPressed, sharedFromThis(), &appl::Windows::onCallbackPrevious);
|
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-play", signalValue, sharedFromThis(), &appl::Windows::onCallbackPlay);
|
||||||
@ -337,3 +271,19 @@ void appl::Windows::onCallbackSelectSourses() {
|
|||||||
m_listViewer->searchElements("courses");
|
m_listViewer->searchElements("courses");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void appl::Windows::onCallbackSelectMedia(const uint32_t& _value) {
|
||||||
|
ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-player");
|
||||||
|
ememory::SharedPtr<appl::widget::VideoDisplay> tmpDisp = ememory::dynamicPointerCast<appl::widget::VideoDisplay>(getSubObjectNamed("displayer"));
|
||||||
|
if (tmpDisp != nullptr) {
|
||||||
|
// stop previous (if needed)
|
||||||
|
tmpDisp->stop();
|
||||||
|
// Set new file:
|
||||||
|
tmpDisp->setZeusMedia(m_clientProp, _value);
|
||||||
|
tmpDisp->play();
|
||||||
|
echrono::Duration time = tmpDisp->getDuration();
|
||||||
|
APPL_DEBUG("duration = " << time << " " << etk::to_string(time.toSeconds()));
|
||||||
|
propertySetOnWidgetNamed("progress-bar", "value", "0");
|
||||||
|
propertySetOnWidgetNamed("progress-bar", "max", etk::to_string(time.toSeconds()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ namespace appl {
|
|||||||
void onCallbackSelectTeather();
|
void onCallbackSelectTeather();
|
||||||
void onCallbackSelectOneManShow();
|
void onCallbackSelectOneManShow();
|
||||||
void onCallbackSelectSourses();
|
void onCallbackSelectSourses();
|
||||||
|
void onCallbackSelectMedia(const uint32_t& _value);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,12 @@
|
|||||||
#include <etk/stdTools.hpp>
|
#include <etk/stdTools.hpp>
|
||||||
#include <ejson/ejson.hpp>
|
#include <ejson/ejson.hpp>
|
||||||
|
|
||||||
appl::widget::ListViewer::ListViewer() {
|
appl::widget::ListViewer::ListViewer() :
|
||||||
|
signalSelect(this, "select", "Select a media to view") {
|
||||||
addObjectType("appl::widget::ListViewer");
|
addObjectType("appl::widget::ListViewer");
|
||||||
|
propertyCanFocus.setDirectCheck(true);
|
||||||
|
// Limit event at 1:
|
||||||
|
setMouseLimit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void appl::widget::ListViewer::init() {
|
void appl::widget::ListViewer::init() {
|
||||||
@ -319,6 +322,8 @@ void appl::ElementDisplayed::generateDisplay(vec2 _startPos, vec2 _size) {
|
|||||||
m_draw.setColor(m_bgColor);
|
m_draw.setColor(m_bgColor);
|
||||||
m_draw.rectangleWidth(_size);
|
m_draw.rectangleWidth(_size);
|
||||||
|
|
||||||
|
m_pos = _startPos;
|
||||||
|
m_size = _size;
|
||||||
// --------------------------------------------
|
// --------------------------------------------
|
||||||
// -- Display text...
|
// -- Display text...
|
||||||
// --------------------------------------------
|
// --------------------------------------------
|
||||||
@ -364,3 +369,48 @@ void appl::ElementDisplayed::generateDisplay(vec2 _startPos, vec2 _size) {
|
|||||||
m_image.print(vec2(_size.y(), _size.y())-vec2(20,20));
|
m_image.print(vec2(_size.y(), _size.y())-vec2(20,20));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool appl::widget::ListViewer::onEventInput(const ewol::event::Input& _event) {
|
||||||
|
APPL_VERBOSE("Event on BT : " << _event);
|
||||||
|
vec2 relativePos = relativePosition(_event.getPos());
|
||||||
|
int32_t findId = -1;
|
||||||
|
for (size_t iii=0; iii<m_listDisplay.size(); ++iii) {
|
||||||
|
if (m_listDisplay[iii] == nullptr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if( relativePos.x() < m_listDisplay[iii]->m_pos.x()
|
||||||
|
|| relativePos.y() < m_listDisplay[iii]->m_pos.y()
|
||||||
|
|| relativePos.x() > m_listDisplay[iii]->m_pos.x() + m_listDisplay[iii]->m_size.x()
|
||||||
|
|| relativePos.y() > m_listDisplay[iii]->m_pos.y() + m_listDisplay[iii]->m_size.y() ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
findId = iii;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (findId == -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (_event.getId() == 1) {
|
||||||
|
if(_event.getStatus() == gale::key::status::pressSingle) {
|
||||||
|
APPL_WARNING("Select element : " << findId << " " << m_listDisplay[findId]->m_idCurentElement);
|
||||||
|
ememory::SharedPtr<appl::ElementProperty> prop = m_listDisplay[findId]->m_property;
|
||||||
|
if (prop != nullptr) {
|
||||||
|
std::string fullTitle;
|
||||||
|
if (prop->m_serie != "") {
|
||||||
|
fullTitle += prop->m_serie + "-";
|
||||||
|
}
|
||||||
|
if (prop->m_saison != "") {
|
||||||
|
fullTitle += "s" + prop->m_saison + "-";
|
||||||
|
}
|
||||||
|
if (prop->m_episode != "") {
|
||||||
|
fullTitle += "e" + prop->m_episode + "-";
|
||||||
|
}
|
||||||
|
fullTitle += prop->m_title;
|
||||||
|
APPL_WARNING("info element : " << prop->m_id << " title: " << fullTitle);
|
||||||
|
signalSelect.emit(prop->m_id);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
@ -42,6 +42,8 @@ namespace appl {
|
|||||||
ememory::SharedPtr<appl::ElementProperty> m_property;
|
ememory::SharedPtr<appl::ElementProperty> m_property;
|
||||||
int32_t m_idCurentElement;
|
int32_t m_idCurentElement;
|
||||||
etk::Color<float> m_bgColor;
|
etk::Color<float> m_bgColor;
|
||||||
|
vec2 m_pos;
|
||||||
|
vec2 m_size;
|
||||||
protected:
|
protected:
|
||||||
ewol::compositing::Image m_image;
|
ewol::compositing::Image m_image;
|
||||||
ewol::compositing::Text m_text;
|
ewol::compositing::Text m_text;
|
||||||
@ -63,6 +65,8 @@ namespace appl {
|
|||||||
class ListViewer : public ewol::widget::WidgetScrolled {
|
class ListViewer : public ewol::widget::WidgetScrolled {
|
||||||
protected:
|
protected:
|
||||||
ewol::compositing::Text m_text;
|
ewol::compositing::Text m_text;
|
||||||
|
public:
|
||||||
|
esignal::Signal<uint32_t> signalSelect; //!< when select a media to view
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ememory::SharedPtr<ClientProperty> m_clientProp; //!< Generic entrypoint on the Client
|
ememory::SharedPtr<ClientProperty> m_clientProp; //!< Generic entrypoint on the Client
|
||||||
@ -85,6 +89,7 @@ namespace appl {
|
|||||||
m_clientProp = _prop;
|
m_clientProp = _prop;
|
||||||
}
|
}
|
||||||
void searchElements(std::string _filter);
|
void searchElements(std::string _filter);
|
||||||
|
bool onEventInput(const ewol::event::Input& _event) override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,7 @@ namespace appl {
|
|||||||
void onRegenerateDisplay() override;
|
void onRegenerateDisplay() override;
|
||||||
public:
|
public:
|
||||||
void setFile(const std::string& _fileName);
|
void setFile(const std::string& _fileName);
|
||||||
|
void setZeusMedia(ememory::SharedPtr<ClientProperty> _property, uint32_t _mediaId) { };
|
||||||
protected:
|
protected:
|
||||||
bool m_isPalying;
|
bool m_isPalying;
|
||||||
public:
|
public:
|
||||||
|
66
tools/player-video/data/gui.xml
Normal file
66
tools/player-video/data/gui.xml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<wslider name="view-selection" fill="true,true" expand="true,true">
|
||||||
|
<PopUp name="ws-name-connect" >
|
||||||
|
<sizer mode="vert" fill="true,true" expand="false,false" lock="true,true" addmode="invert" min-size="45,10%">
|
||||||
|
<label>login</label>
|
||||||
|
<entry name="connect-login" fill="true,false" expand="true,false"/>
|
||||||
|
<label>password</label>
|
||||||
|
<entry name="connect-password" fill="true,false" expand="true,false"/>
|
||||||
|
<button name="connect-bt" toggle="false" fill="false,false" expand="true,false" gravity="right">
|
||||||
|
<label>Connect</label>
|
||||||
|
</button>
|
||||||
|
</sizer>
|
||||||
|
</PopUp>
|
||||||
|
<sizer mode="vert" name="ws-name-list" fill="true,true" expand="true,true" addmode="invert">
|
||||||
|
<button name="bt-film-picture" expand="true,false" fill="true,true">
|
||||||
|
<label>Films</label>
|
||||||
|
</button>
|
||||||
|
<button name="bt-film-draw" expand="true,false" fill="true,true">
|
||||||
|
<label>Annimated films</label>
|
||||||
|
</button>
|
||||||
|
<button name="bt-tv-picture" expand="true,false" fill="true,true">
|
||||||
|
<label>TV Show</label>
|
||||||
|
</button>
|
||||||
|
<button name="bt-tv-draw" expand="true,false" fill="true,true">
|
||||||
|
<label>Annimated TV Show</label>
|
||||||
|
</button>
|
||||||
|
<button name="bt-theater" expand="true,false" fill="true,true">
|
||||||
|
<label>Teather</label>
|
||||||
|
</button>
|
||||||
|
<button name="bt-one-man-show" expand="true,false" fill="true,true">
|
||||||
|
<label>One-man show</label>
|
||||||
|
</button>
|
||||||
|
<button name="bt-courses" expand="true,false" fill="true,true">
|
||||||
|
<label>Courses</label>
|
||||||
|
</button>
|
||||||
|
<spacer fill="true,true" expand="true,true"/>
|
||||||
|
</sizer>
|
||||||
|
<ListViewer name="ws-name-list-viewer" fill="true,true" expand="true,true"/>
|
||||||
|
<sizer mode="vert" name="ws-name-player" fill="true,true" expand="true,true">
|
||||||
|
<sizer mode="hori" fill="true,true" expand="true,true">
|
||||||
|
<button name="bt-previous">
|
||||||
|
<label>
|
||||||
|
previous
|
||||||
|
</label>
|
||||||
|
</button>
|
||||||
|
<button name="bt-play" toggle="true">
|
||||||
|
<label>play</label>
|
||||||
|
<label>pause</label>
|
||||||
|
</button>
|
||||||
|
<button name="bt-next">
|
||||||
|
<label>
|
||||||
|
Next
|
||||||
|
</label>
|
||||||
|
</button>
|
||||||
|
<label name="lb-fps"/>
|
||||||
|
<label name="lb-time"/>
|
||||||
|
<button name="bt-back">
|
||||||
|
<label>
|
||||||
|
back
|
||||||
|
</label>
|
||||||
|
</button>
|
||||||
|
</sizer>
|
||||||
|
<slider name="progress-bar" expand="true,false" fill="true" step="0.01" min="0"/>
|
||||||
|
<VideoDisplay name="displayer" expand="true" fill="true"/>
|
||||||
|
</sizer>
|
||||||
|
</wslider>
|
@ -59,5 +59,6 @@ int main(int _argc, const char *_argv[]) {
|
|||||||
APPL_INFO("==================================");
|
APPL_INFO("==================================");
|
||||||
APPL_INFO("== ZEUS router stop ==");
|
APPL_INFO("== ZEUS router stop ==");
|
||||||
APPL_INFO("==================================");
|
APPL_INFO("==================================");
|
||||||
|
elog::flush();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -324,7 +324,7 @@ bool zeus::Client::isAlive() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void zeus::Client::pingIsAlive() {
|
void zeus::Client::pingIsAlive() {
|
||||||
if (std::chrono::steady_clock::now() - m_interfaceWeb->getLastTimeSend() >= std::chrono::seconds(30)) {
|
if (echrono::Steady::now() - m_interfaceWeb->getLastTimeSend() >= echrono::seconds(30)) {
|
||||||
m_interfaceWeb->ping();
|
m_interfaceWeb->ping();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ namespace zeus {
|
|||||||
* @param[in]
|
* @param[in]
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
const std::chrono::steady_clock::time_point& getLastTimeReceive() {
|
const echrono::Steady& getLastTimeReceive() {
|
||||||
return m_connection.getLastTimeReceive();
|
return m_connection.getLastTimeReceive();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -262,7 +262,7 @@ namespace zeus {
|
|||||||
* @param[in]
|
* @param[in]
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
const std::chrono::steady_clock::time_point& getLastTimeSend() {
|
const echrono::Steady& getLastTimeSend() {
|
||||||
return m_connection.getLastTimeSend();
|
return m_connection.getLastTimeSend();
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user