• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • Compute Graph Framework SDK Reference  5.10
    All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    CGF Camera Interprocess Sample

    Description

    This sample app demonstrates interop between Channel (nvsci) and dwSensorCamera modules so that camera frames can be shared cross process or cross chip to downstream consumer(s).

    The producer loads the configuration rig file, transmits images from live cameras to the consumer over Channel. The consumer compresses the incoming image data into h264 through the dwFrameCapture module.

    This sample app can be used as a reference for connecting together the various APIs to set up optimal memory allocation and hardware synchronization for low latency.

    Running the sample

    Producer:

    ./sample_cgf_camera_interprocess --role=producer --rig=path/to/camera.json  --prod-stream-names=[nvsciipc endpoint names] --prod-reaches=[reaches of each endpoint]
    

    Consumer:

    ./sample_cgf_camera_interprocess --role=consumer --rig=path/to/camera.json  --cons-stream-names=[nvsciipc endpoint names] --cons-reaches=[reaches of each endpoint]
    

    Shared Parameters:

    --role:
        consumer or producer [default: consumer]
    
    --sync-mode=[p2c|c2p|both|none]
        Must match between producer and all consumers
        Default value: p2c
    
    --frames:
        Must match between producer and all consumers
        Default value: 300
    

    Producer Parameters:

    --rig:
        rig path
    
    --prod-reaches=[STR]
        Colon-separated list of producer reaches (process|chip)
        For NVSCI mode only
        Default value: ""
    
    --prod-stream-names=[STR]
        colon-separated list of producer nvsciipc endpoints
        Default value: ""
    

    Consumer Parameters:

    --cons-reaches=[STR]
        Colon-separated list of consumer reaches (process|chip)
        Default value: ""
    
    --cons-stream-names=[STR]
        colon-separated list of consumer nvsciipc endpoints
        For NVSCI mode only
        Default value: ""
    
    --capture:
        compress file name [default:capture.h264] [Consumer only]
    
    --bitrate:
        bitrate value [default:8000000] [Consumer only]
    

    Known Restrictions

    Producer rig must contain only one camera.

    Sync mode c2p, both not supported.

    Examples

    Single producer single consumer cross-process

    ./sample_cgf_camera_interprocess --role=producer --rig=path/to/rig.json> --prod-stream-names=nvscisync_a_0 --prod-reaches=process
    ./sample_cgf_camera_interprocess --role=consumer --cons-stream-names=nvscisync_a_1 --cons-reaches=process
    

    Single producer single consumer cross-chip

    ./sample_cgf_camera_interprocess --role=producer --rig=path/to/rig.json> --prod-stream-names=nvscic2c_pcie_s0_c6_1 --prod-reaches=chip
    ./sample_cgf_camera_interprocess --role=consumer --cons-stream-names=nvscic2c_pcie_s0_c5_1 --cons-reaches=chip
    
    人人超碰97caoporen国产