Valkka  1.6.1
OpenSource Video Management
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
FragMP4SharedMemSegment Class Reference
Inheritance diagram for FragMP4SharedMemSegment:
Inheritance graph
[legend]
Collaboration diagram for FragMP4SharedMemSegment:
Collaboration graph
[legend]

Public Member Functions

 FragMP4SharedMemSegment (const char *name, std::size_t n_bytes, bool is_server=false)
 
virtual std::size_t getSize ()
 Client: return metadata = the size of the payload (not the maximum size). Uses SharedMemSegment::getMeta.
 
virtual void put (std::vector< uint8_t > &inp_payload, void *meta_)
 typecast void to std::size_t
 
virtual void put (uint8_t *buf_, void *meta_)
 
virtual void copyMetaFrom (void *meta_)
 Dereference metadata pointer correctly and copy the contents into this memory segment's metadata.
 
virtual void copyMetaTo (void *meta_)
 Dereference metadata pointer correctly and copy the contents from this memory segment's metadata.
 
void putMuxFrame (MuxFrame *f)
 
- Public Member Functions inherited from SharedMemSegment
 SharedMemSegment (const char *name, std::size_t n_bytes, bool is_server=false)
 Default constructor. More...
 
virtual ~SharedMemSegment ()
 Default destructor.
 
void init ()
 Must be called after construction. Reserves shmem payload and correct metadata (depending on the subclass)
 
void close_ ()
 Must be called before destruction. Releases correct amount of metadata bytes (depending on the subclass)
 
bool getClientState ()
 Was the shmem acquisition succesfull?
 

Public Attributes

FragMP4Metameta
 
- Public Attributes inherited from SharedMemSegment
uint8_t * payload
 Pointer to payload.
 
std::size_t n_bytes
 Maximum size of the payload (this much is reserved)
 

Protected Member Functions

virtual void serverInit ()
 Uses shmem_open with write rights. used by the constructor if is_server=true. Init with correct metadata serialization.
 
virtual bool clientInit ()
 Uses shmem_open with read-only rights. Init with correct metadata serialization.
 
virtual void serverClose ()
 Erases the shmem segment. used by the constructor if is_server=true.
 
virtual void clientClose ()
 

Additional Inherited Members

- Protected Attributes inherited from SharedMemSegment
std::string name
 Name to identify the posix objects.
 
std::string payload_name
 Name to identify the posix memory mapped file.
 
std::string meta_name
 Name to identify the posix memory mapped file for the metadata.
 
bool is_server
 Client or server process?
 
void * ptr
 
void * ptr_
 Raw pointers to shared memory.
 
bool client_state
 Was the shmem acquisition succesfull?
 

The documentation for this class was generated from the following files: