/** * Overlays clock and given text at given location on a buffer. * * To overlay the clock, you must set clock params using * nvosd_set_clock_params(). * You must ensure that the length of @a text_params_list is at least * @a num_strings. * * @note Currently only #MODE_CPU is supported. Specifying other modes wil have * no effect. * * @param[in] nvosd_ctx A pointer to NvOSD context. * @param[in] mode Mode selection to draw the text. * @param[in] fd DMABUF FD of buffer on which text is to be overlayed. * @param[in] num_strings Number of strings to be overlayed. * @param[in] text_params_list A pointer to an array of NvOSD_TextParams * structure for the clock and text to be overlayed. * * @returns 0 for success, -1 for failure. */ int nvosd_put_text(void *nvosd_ctx, NvOSD_Mode mode, int fd, int num_strings, NvOSD_TextParams *text_params_list);
The meaning of only MODE_CPU support in the nvosd_put_text(.) function seems to use pitch linear memory.
I can’t see the part that calls the NvBufferMemSyncForCpu function.
Shouldn’t the NvBufferMemSyncForCpu() function be used?