BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJMEDIA Reference

pjmedia_vid_dev_cb Struct Reference

Data Fields

pj_status_t(* capture_cb )(pjmedia_vid_dev_stream *stream, void *user_data, pjmedia_frame *frame)
 
pj_status_t(* render_cb )(pjmedia_vid_dev_stream *stream, void *user_data, pjmedia_frame *frame)
 

Field Documentation

◆ capture_cb

pj_status_t(* pjmedia_vid_dev_cb::capture_cb) (pjmedia_vid_dev_stream *stream, void *user_data, pjmedia_frame *frame)

This callback is called by capturer stream when it has captured the whole packet worth of video samples.

Parameters
streamThe video stream.
user_dataUser data associated with the stream.
frameCaptured frame.
Returns
Returning non-PJ_SUCCESS will cause the video stream to stop

◆ render_cb

pj_status_t(* pjmedia_vid_dev_cb::render_cb) (pjmedia_vid_dev_stream *stream, void *user_data, pjmedia_frame *frame)

This callback is called by renderer stream when it needs additional data to be rendered by the device. Application must fill in the whole of output buffer with video samples.

The frame argument contains the following values:

  • timestamp Rendering timestamp, in samples.
  • buf Buffer to be filled out by application.
  • size The size requested in bytes, which will be equal to the size of one whole packet.
Parameters
streamThe video stream.
user_dataUser data associated with the stream.
frameVideo frame, which buffer is to be filled in by the application.
Returns
Returning non-PJ_SUCCESS will cause the video stream to stop

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

 


PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.