DEMO: C

Requirements

  • Operating System: Windows, macOS, or Linux

Compilation

  • Prepare the curl sdk for your Windows/macOS/Linux OS
  • Download DEMO: ultra-encode-api-demo-c.zip
  • Compile "ultra_encode_curl.c", and link it to "libcurl"
  • Build the ultra_encode_curl file

Example

  • Navigate into the bin directory and copy the firmware file here, and run ultra_encode_curl.
cd ultra-encode-api/demo/c/bin
cp ultra_encode_aio_rev_b_2_0_318.mwf linux
cd linux
./ultra_encode_curl <hostip:port>
  • Sample response

***** 1. login *****
login response data:
{
        "result": 0
}

***** 2. get info *****
get info response data:
{
        "result": 0,
        "mac-addr": {
                "eth": "d0:c8:57:81:02:2d",
                "wifi": "d0:c8:57:81:02:2e",
                "softap": "d0:c8:57:81:02:2f"
        },
        "snapshot": "/tmp/sbox-snapshot/sbox-quarter.jpg",
        "main-snapshot": "/tmp/sbox-snapshot/mainstream.jpg",
        "sub-snapshot": "/tmp/sbox-snapshot/substream.jpg",
        "product": {
                "sn": "B313220727002",
                "product-id": 787,
                "hardware-ver": "B",
                "firmware-id": 1,
                "firmware-ver-s": "2.0.312",
                "factory-firmware-ver-s": "2.0.283",
                "product-name": "Ultra Encode",
                "module-name": "Ultra Encode AIO",
                "manu-name": "MAGEWELL",
                "features": 1,
                "max-lock-count": 2,
                "live-support": 4095,
                "cloud-support": 1,
                "record-support": 1,
                "scheduler-support": 1,
                "nas-support": 1,
                "multi-audio-support": 1
        },
        "nosignal": {},
        "input-source": {},
        "audio-range": {},
        "codec-cap": {},
        "rec": {},
        "nas": {},
        "color-range": {},
        "video-format": {},
        "living": {},
        "surface": {}
}

***** 3. upload firmware *****
upload firmware response data:
{
        "result": 0,
        "up-to-date": true,
        "version": "2.0.123",
        "size": 12494463
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""