I'm trying to build a DirectFB application that will fork() to run an
external media player that directly writes to the graphics device.
The code to execute the media player looks something like this:
void play(const char *file)
{
int status;
pid_t pid;
preplay();
if ((pid = fork()) == -1)
perror("couldn't fork");
else if (pid == 0)
execl("/bin/mediaplayer", "/bin/mediaplayer", file, NULL);
else if ((pid = wait(&status)) == -1)
perror("wait error");
postplay();
}
This works fine if my preplay() function destroys my DirectFB surface and
releases all resources, and my postplay() function creates a new surface.
However, I have lots of image surfaces loaded and I'd rather not have to
release them and then recreate them every time I play a file.
Is there a quicker way to let an external program write directly to the
graphics device and then resume regular DirectFB calls without having to
recreate the surface?
Thanks,
Vinay
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users