raspi: first implementation of PIG in AVDec

This commit is contained in:
Stefan Seyfried
2013-10-21 00:08:47 +02:00
parent 824c602fb6
commit e0f5184900
4 changed files with 44 additions and 8 deletions

View File

@@ -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");