On Linux, can a process render a different GUI for a process?

I am writing a video player in Linux and I would like to divide it into 2 processes:

a. B. GUI decoder

Thus, I could use different programming languages, and when a problem arises, it is easier to find out where the problem is.

The problem is, can it process decoded rendering images directly on surface B? I do not want to use some IPC to send B this decoded data, because it can be very inefficient.

+5
source share
3 answers

XEmbed, X11 , . , .

GTK Qt XEmbed.

+8

IPC ( Unix) , , , , .

, , IPC ( , ), :

fd = shm_open("/my_shmem", O_RDWR| O_CREAT, S_IWUSR);
if(fd == -1) abort(); 
ftruncate(fd, SHMEM_SIZE); 
p = mmap(NULL, SHMEM_SIZE, PROT_WRITE |  PROT_READ, MAP_SHARED, fd, 0); 
if(p == MAP_FAILED) abort()

p , ( ) .

! p ( ) , , , , .

Cheers, GBY

+4

See how mplayer and smplayer are implemented. mplayer decodes and displays the video, while smplayer decodes the (optional) graphical interface.

+1
source

All Articles