BS2RtspConfig config = { 0, }; config.enabled = true; string acc = "myAccount"; memset(config.id, 0x0, BS2_USER_ID_SIZE); memcpy(config.id, acc.c_str(), acc.size()); string pw = "myPassword"; memset(config.password, 0x0, BS2_USER_ID_SIZE); memcpy(config.password, pw.c_str(), pw.size()); string addr = "192.168.0.10"; // rtsp://192.168.0.10 memset(config.address, 0x0, BS2_URL_SIZE); memcpy(config.address, addr.c_str(), addr.size()); config.port = 554; int sdkResult = BS2_SetRtspConfig(context, deviceID, &config); if (BS_SDK_SUCCESS != sdkResult) printf("BS2_SetRtspConfig call failed: %d", sdkResult);