1 #include <lib/gui/evideo.h>
3 eVideoWidget::eVideoWidget(eWidget *parent): eWidget(parent)
6 parent->setPositionNotifyChild(1);
9 int eVideoWidget::event(int event, void *data, void *data2)
13 case evtChangedPosition:
15 case evtParentChangedPosition:
16 case evtParentVisibilityChanged:
17 updatePosition(!isVisible());
20 return eWidget::event(event, data, data2);
23 eVideoWidget::~eVideoWidget()
28 void eVideoWidget::updatePosition(int disable)
30 eRect pos(0, 0, 0, 0);
32 pos = eRect(getAbsolutePosition(), size());
39 eDebug("position is %d %d -> %d %d", pos.left(), pos.top(), pos.width(), pos.height());
41 for (int i=0; i<4; ++i)
43 const char *targets[]={"left", "top", "width", "height"};
45 snprintf(filename, 128, "/proc/stb/vmpeg/%d/dst_%s", m_decoder, targets[i]);
46 FILE *f = fopen(filename, "w");
49 eDebug("failed to open %s - %m", filename);
55 case 0: val = pos.left(); break;
56 case 1: val = pos.top(); break;
57 case 2: val = pos.width(); break;
58 case 3: val = pos.height(); break;
60 fprintf(f, "%08x\n", val);
62 eDebug("%s %08x", filename, val);
66 void eVideoWidget::setDecoder(int decoder)