libgpac
Documentation of the core library of GPAC
+ Collaboration diagram for ISO Sample:

Data Structures

struct  GF_ISOSample
 

Enumerations

enum  GF_ISOSAPType {
  RAP_REDUNDANT = -1 , RAP_NO = 0 , RAP = 1 , SAP_TYPE_1 = 1 ,
  SAP_TYPE_2 = 2 , SAP_TYPE_3 = 3 , SAP_TYPE_4 = 4
}
 

Functions

GF_ISOSamplegf_isom_sample_new ()
 
void gf_isom_sample_del (GF_ISOSample **samp)
 

Detailed Description

Media sample for ISOBMFF API.


Data Structure Documentation

◆ GF_ISOSample

struct GF_ISOSample

media sample object

Data Fields
u32 dataLength

data size

u8 * data

data with padding if requested

u64 DTS

decoding time

s32 CTS_Offset

relative offset for composition if needed

GF_ISOSAPType IsRAP

SAP type

u32 alloc_size

allocated data size - used only when using static sample in gf_isom_get_sample_ex

u32 nb_pack

number of packed samples in this sample. If 0 or 1, only 1 sample is present only used for constant size and constant duration samples

u32 duration

read API only - sample duration (multiply by nb_pack to get full duration)

u32 corrupted

read API only - set to GF_TRUE if sample data is corrupted

Enumeration Type Documentation

◆ GF_ISOSAPType

Random Access Point flag

Enumerator
RAP_REDUNDANT 

redundant sync shadow - only set when reading sample

RAP_NO 

not rap

RAP 

sync point (IDR)

SAP_TYPE_1 

sync point (IDR)

SAP_TYPE_2 

sync point (IDR)

SAP_TYPE_3 

RAP, OpenGOP

SAP_TYPE_4 

RAP, roll info (GDR or audio preroll)

Function Documentation

◆ gf_isom_sample_new()

GF_ISOSample* gf_isom_sample_new ( )

creates a new empty sample

Returns
the newly allocated ISO sample

◆ gf_isom_sample_del()

void gf_isom_sample_del ( GF_ISOSample **  samp)

delete a sample.

Note
The buffer content will be destroyed by default. If you wish to keep the buffer, set dataLength to 0 in the sample before deleting it the pointer is set to NULL after deletion
Parameters
samppointer to the target ISO sample