/*
 * Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */


NvGstIpcTestApp Usage (command: ./nvgstipctestapp --help)
=======
=> PREREQUISITES:

1. You must install GStreamer-1.0 on the target board using apt-get, as follows:

   sudo apt-get install gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad gstreamer1.0-libav

2. Execute the following commands on the target board's Ubuntu command line before starting the player:

   export DISPLAY=:0
   xinit &

NvGstIpcTestApp Usage
-----------------------------------------------
Run with the command line.

    $ nvgstipctestapp server <rtsp_url> <socket_path>
    $ nvgstipctestapp client <socket_path>
    e.g.
    $ nvgstipctestapp server rtsp://127.0.0.1/video1 /tmp/test1
    $ nvgstipctestapp client /tmp/test1

This sample act as either server or client based on command line arguments.

The server accepts H.264/H.265 video stream RTSP URL and IPC socket path
as input. It does the decoding of the stream and listens for the connection
on the IPC socket path. It sends decoded data over IPC to the connected client.

The client accepts IPC socket path as input. It sends connection request to the
server. Once server accepts the request, it starts receiving the decoded data
over IPC which is further pushed into the pipeline.
