UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
Coding_session Class Referenceabstract

Abstract class Coding_session. More...

#include <coding-session.h>

Inheritance diagram for Coding_session:
Inheritance graph
Collaboration diagram for Coding_session:
Collaboration graph

Public Member Functions

virtual char * decode_frame (char *received_data, int buf_size, int *frame_size, std::map< int, int > valid_data)=0
 
virtual char * encode_frame (char *source_data, int frame_size, int *buf_size)=0
 

Detailed Description

Abstract class Coding_session.

This abstract class represents a general coding session object. Every class implementing a particular coding method/algorithm must inherit from this class.

Definition at line 26 of file coding-session.h.

Member Function Documentation

◆ decode_frame()

virtual char * Coding_session::decode_frame ( char * received_data,
int buf_size,
int * frame_size,
std::map< int, int > valid_data )
pure virtual

Method decode should recover original source data

Parameters
received_dataReceived data (source and parity)
buf_sizeSize of the received buffer
frame_sizeOutput parameter for storing size of the decoded frame
valid_dataMap storing pairs <offset, number of bytes> of received data
Returns
Recovered source data

Implemented in LDGM_session, LDGM_session_cpu, and LDGM_session_gpu.

◆ encode_frame()

virtual char * Coding_session::encode_frame ( char * source_data,
int frame_size,
int * buf_size )
pure virtual

Method encode should compute parity data for the given source data and add suitable FEC parity header.

Parameters
source_dataData to encode
frame_sizeSize of the frame being encoded
buf_sizeOutput parameter for storing total size of the returned buffer
Returns
Computed parity data with appropriate FEC parity header

Implemented in LDGM_session.


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