feat(video): recover camera previews and reduce encoding and playout cost
Improve camera recovery, shared preview lifecycle and receiver playout diagnostics. Preserve qualified X4 runtime changes and restore async admission in loopback media tests.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Private ABI v1. One handle in each physically isolated camera worker. The
|
||||
// Private ABI v2. One handle in each physically isolated camera worker. The
|
||||
// caller must restrict USB access BEFORE loading this library or discovering.
|
||||
typedef struct mc_x4 mc_x4;
|
||||
enum mc_x4_action {
|
||||
@@ -28,6 +28,8 @@ typedef struct mc_x4_video {
|
||||
int32_t stream_index;
|
||||
int32_t codec; // 0 = H264, 1 = H265
|
||||
uint32_t bytes;
|
||||
int32_t stream_type; // original CameraSDK callback marker, NOT a codec enum
|
||||
uint64_t calibration_revision; // identifies this preview's exact metadata
|
||||
} mc_x4_video;
|
||||
|
||||
MC_X4_API int mc_x4_abi(void);
|
||||
@@ -35,6 +37,12 @@ MC_X4_API mc_x4* mc_x4_open(const char* expected_serial, const char* private_log
|
||||
// JSON result owned by the handle; copy before the next call. Calls are
|
||||
// serialized by the worker. No vendor exception or C++ object crosses the ABI.
|
||||
MC_X4_API const char* mc_x4_call(mc_x4*, int action, int mode, const char* key, double value);
|
||||
// Serialized with control calls. Only an exact current camera-list entry is
|
||||
// admitted. Destination is selected inside the private worker, never by a UI.
|
||||
typedef void (*mc_x4_download_progress)(int64_t downloaded, int64_t total);
|
||||
MC_X4_API int mc_x4_download(mc_x4*, const char* remote, const char* local, mc_x4_download_progress);
|
||||
// The SDK explicitly provides cancellation for an in-progress download.
|
||||
MC_X4_API void mc_x4_cancel_download(mc_x4*);
|
||||
MC_X4_API int mc_x4_read_video(mc_x4*, mc_x4_video*, uint8_t* buffer, size_t capacity);
|
||||
// Does not call StopRecording or change auto-stop-on-disconnect policy.
|
||||
MC_X4_API void mc_x4_close(mc_x4*);
|
||||
|
||||
Reference in New Issue
Block a user