Description

Encapsulates the data types of audio and video frames.

struct rts_frame
{
    void buf;
    int size;
    int is_audio;
    unsigned long long pts;
    unsigned long long dts;
    int flag;
    int duration;
    void (free_ptr)(struct rts_frame *);
    unsigned int uid;
};                   

Parameters

Parameter Description
buf The buffer of the frame.
size The number of bytes of the buf parameter.
is_audio Specifies whether the frame is an audio frame. Valid values:
  • 1: audio frame
  • 0: video frame
pts The demonstration timestamp. Unit: milliseconds.
dts The decoding timestamp. Unit: milliseconds.
flag If is_audio is set to 0, valid values are:
  • 1: damage flag
  • 0: keyframe flag
duration The duration of the frame. Unit: milliseconds.
free_ptr The function pointer that is called to release the current rts_frame object, for example, frm-free_ptr(frm;.
uid The reserved parameter that specifies the stream to which data belongs.