gorka_sm
5th May 2011, 18:17
Hello , I am trying to represent a periodic Image in MythTV 0.22 background using the MythUIImage class.
I have the following Qt code :
MythScreenStack *mainStack = GetMythMainWindow -> GetMainStack;
const QString pila("/home/aido/foto.jpg");
MythScreenType *aux = new MythScreenType(mainStack,pila,true);
pthread_t foto_thread;
mainStack->AddScreen(aux);
int status = pthread_create(&foto_thread,NULL,run_foto_thread,aux)
static void *run_foto_thread(void *data)
{
pthread_t imagen_thread;
QString numero;
QString s1("/home/aido/foto.jpg");
MythScreenType *mnstack =(MyhtScreenType *)data;
MythUIImage *image = new MythUIImage(menstack,s1);
image->SetFilename(s1);
while(true)
{
sleep(1.1);
image->Load(true);
}
The image is represented but I obtained a segmentation fault .I have debugged the code and I obtain the problem is in image->Load(true).
Does anybody know Why can that be ?
Thanks
Gorka
}
I have the following Qt code :
MythScreenStack *mainStack = GetMythMainWindow -> GetMainStack;
const QString pila("/home/aido/foto.jpg");
MythScreenType *aux = new MythScreenType(mainStack,pila,true);
pthread_t foto_thread;
mainStack->AddScreen(aux);
int status = pthread_create(&foto_thread,NULL,run_foto_thread,aux)
static void *run_foto_thread(void *data)
{
pthread_t imagen_thread;
QString numero;
QString s1("/home/aido/foto.jpg");
MythScreenType *mnstack =(MyhtScreenType *)data;
MythUIImage *image = new MythUIImage(menstack,s1);
image->SetFilename(s1);
while(true)
{
sleep(1.1);
image->Load(true);
}
The image is represented but I obtained a segmentation fault .I have debugged the code and I obtain the problem is in image->Load(true).
Does anybody know Why can that be ?
Thanks
Gorka
}