To enable the write sub-thread in dm365 to pass NALU to dogetnextframe () of live555.
Encode in dm365ProgramIt is based on multiple threads, while live555 is based on the SELECT query mechanism. In order to implement the encode data transfer to live555, it is sent through the live555 encapsulation RTP package. Data interaction has become a problem that you need to think about.
In the paper "Implementation of Embedded Real-Time Streaming Media Server", I saw the unix_domain_socket. The author used it to transmit data between two processes, which is similar to what I have encountered.
**************************************** ************* **************************************** ********
Http://en.wikipedia.org/wiki/Unix_domain_socket
A Unix domain socket or IPC socket (inter-process communication socket) is a data communications endpoint for
exchanging data between processes executing within the same host operating system. while similar in functionality tonamed pipes, Unix domain sockets may be created asbyte
streams or asdatemedisequences, while pipes are byte streams only. processes Using Unix domain sockets do not need to share a common ancestry. theapi
for Unix domain sockets is similar to that of aninternet socket, but does not use an underlying network protocol for communication. the Unix domain socket
facility is a standard component ofposixoperating systems.
UNIX domain sockets use the file system as address
Name Space. They are referenced by processes
Inodes in the file system. This allows two processes to open the same socket in order to communicate. However, communication occurs entirely within the operating system kernel.
In addition to sending data, processes may send
File descriptors into ss a Unix domain socket connection usingSendmsg ()
AndRecvmsg ()
System CILS.
**************************************** ************* **************************************** ********
(The current time is on Sunday)
For Unix domain socket, I understand that it uses sockets to implement communication between processes in UNIX.Similar to pipe CommunicationHowever, this communication method can be implementedBidirectional full-duplex communicationAnd does not involve underlying things such as the network protocol stack, so I think itNo package splittingThis is annoying.
currently, my method is to create a Unix domain Socket socket in dogetnextframe () of live555, add the socket to the SELECT query mechanism of live555 (when the socket is readable, determine whether it is the NALU data sent back by dm365), and then send the NALU request message to the write thread of dm365. In the write thread of the dm365 Development Board, the Select + nonblocking mechanism is used to listen on whether there is NALU from live555
request information. If yes, then wait for a complete NALU in the write thread and send it to live555.