mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
raspi: first implementation of PIG in AVDec
This commit is contained in:
@@ -99,6 +99,7 @@ class vDec: public Dec, public OpenThreads::Thread
|
||||
public:
|
||||
vDec();
|
||||
~vDec();
|
||||
int set_pig(int x, int y, int w, int h);
|
||||
private:
|
||||
void run();
|
||||
};
|
||||
@@ -253,6 +254,13 @@ int AVDec::set_volume(int vol)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int AVDec::pig(int x, int y, int w, int h)
|
||||
{
|
||||
if (vdec)
|
||||
return vdec->set_pig(x, y, w, h);
|
||||
return -1;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
Dec *d;
|
||||
bool audio;
|
||||
@@ -415,6 +423,17 @@ int aDec::set_volume(int vol)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int vDec::set_pig(int x, int y, int w, int h)
|
||||
{
|
||||
struct pig_params_t *pig = (pig_params_t *)malloc(sizeof(struct pig_params_t));
|
||||
pig->x = x;
|
||||
pig->y = y;
|
||||
pig->w = w;
|
||||
pig->h = h;
|
||||
codec_send_message(&codecs.vcodec, MSG_PIG, pig);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void vDec::run()
|
||||
{
|
||||
hal_set_threadname("hal:vdec");
|
||||
|
Reference in New Issue
Block a user