*****************************************************************************
* Copyright (c) 2019 NVIDIA Corporation.  All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
* and any modifications thereto.  Any use, reproduction, disclosure or
* distribution of this software and related documentation without an express
* license agreement from NVIDIA Corporation is strictly prohibited.
*****************************************************************************

Prequisites:

Please follow instructions in the apps/sample_apps/deepstream-app/README on how
to install the prequisites for Deepstream SDK, the DeepStream SDK itself and the
apps.

Compilation Steps:
  $ cd apps/deepstream-user-metadata-test/
  $ make
  $ ./deepstream-user-metadata-test <h264_elementary_stream>

This document shall describe about the sample deepstream-user-metadata-test application.

It is meant for simple demonstration of how to set, access user metadata for DeepStream SDK
elements in the pipeline and extract meaningful insights from a video stream.

This sample creates instance of "nvinfer" element. Instance of
the "nvinfer" uses TensorRT API to execute inferencing on a model. Using a
correct configuration for a nvinfer element instance is therefore very
important as considerable behaviors of the instance are parameterized
through these configs.

For reference, here are the config files used for this sample :
1. The 4-class detector (referred to as pgie in this sample) uses
    dstest1_pgie_config.txt

In this sample, we first create one instance of "nvinfer", referred as the pgie.
This is our 4 class detector and it detects for "Vehicle , RoadSign, TwoWheeler,
Person".

nvinfer element attaches 16 random integers as user metadata to frame metadata.
Refer "nvinfer_src_pad_buffer_probe" function in the sample code.
By attaching the probe function at the end of the pipeline, one can extract
all the 16 integers which are attached as user metadata.
Refer the "osd_sink_pad_buffer_probe" function in the sample code.
For details on the Metadata format, refer to the file "nvdsmeta.h"

Expected output:
Metadata attached on nvinfer source pad probe function should match with
metadata received on nvosd sink pad.
