Function rs2_allocate_synthetic_video_frame

Function Documentation

rs2_frame *rs2_allocate_synthetic_video_frame(rs2_source *source, const rs2_stream_profile *new_stream, rs2_frame *original, int new_bpp, int new_width, int new_height, int new_stride, rs2_extension frame_type, rs2_error **error)

Allocate new video frame using a frame-source provided form a processing block

Parameters:
  • source[in] Frame pool to allocate the frame from

  • new_stream[in] New stream profile to assign to newly created frame

  • original[in] A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable)

  • new_bpp[in] New value for bits per pixel for the allocated frame

  • new_width[in] New value for width for the allocated frame

  • new_height[in] New value for height for the allocated frame

  • new_stride[in] New value for stride in bytes for the allocated frame

  • frame_type[in] New value for frame type for the allocated frame

  • error[out] If non-null, receives any error that occurs during this call, otherwise, errors are ignored

Returns:

reference to a newly allocated frame, must be released with release_frame memory for the frame is likely to be re-used from previous frame, but in lack of available frames in the pool will be allocated from the free store