This function is displayed as a function pointer in rts_glue_funcs when a data frame is read from RTS SDK.

int (* read)(
    struct  **frame,
    void *handle


Parameter Description
frame The location where the returned audio and video frames are stored.
handle The handle that is returned when the open function is called.

Response parameters

  • If 1 is returned, one data frame is read.
  • If 0 is returned, the system tries again later.
  • If -1 is returned, end-of-file (EOF) occurs. That is, no more data can be read.
  • If negative numbers except -1 are returned, severe errors occur.

Subsequent operations

If 1 is returned, the returned frame must be released by the caller. Sample code:

struct rts_frame *f = NULL;
int r = __rts_funcs->read(&f, handle);
if(f ! = NULL)