L4T Multimedia API Reference28.1 Release |
This sample demonstrates how to render video stream or UI with the NVIDIA® Tegra® Direct Rendering Manager (DRM). This sample provides rendering support on non-X11 and lightweight display systems. The DRM is implemented in user-space and is compatible with DRM 2.0.
A DRM is a subsystem of the Linux kernel that interfaces with GPUs.
The sample supports two running modes, depending on the --disable-video
option:
The sample demonstrates the supported DRM buffer allocation policies:
The sample supports these video formats:
$ cd $HOME/tegra_multimedia_api/samples/08_video_dec_drm $ make
$ ./video_dec_drm <in-file> <in-format> [options]
$ ./video_dec_drm --help
./video_decode_drm --disable-video
./video_decode_drm ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 --disable-ui
./video_decode_drm ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264
The following diagram shows the flow of data through the sample.
The following diagram shows the interactions between the separate threads in the sample.
If the options include --disable-video
, the sample does the following:
Otherwise:
The following tables shows the key classes and functions that this sample uses.
Class | Description |
---|---|
class NvDrmRenderer | Contains elements and functions to render frames with tegra DRM. |
class NvVideoDecoder | Contains all video decoding-related elements and functions. |
class NvVideoConverter | Contains elements and functions for video format conversion. |
Function | Description |
---|---|
ui_render_loop_fcn | Thread function to render the UI image. |
renderer_dequeue_loop_fcn | Thread function to dequeue the flipped frame from NvDrmRenderer(). |
conv0_capture_dqbuf_thread_callback | Callback function to enqueue a new frame into NvDrmRenderer. |
conv0_output_dqbuf_thread_callback | Callback function to receive a frame from decoder and process format conversion. |