tapo/responses/smart_cam/recording_download_result.rs
1use serde::{Deserialize, Serialize};
2
3/// The result of downloading a recording stored on a camera hub with
4/// [`CameraHubHandler::download_recording`](crate::CameraHubHandler::download_recording).
5#[derive(Debug, Clone, Serialize, Deserialize)]
6#[cfg_attr(feature = "python", pyo3::prelude::pyclass(from_py_object, get_all))]
7pub struct RecordingDownloadResult {
8 /// The number of media bytes written, after decryption.
9 pub byte_count: u64,
10 /// The playback time the media covers, in seconds, measured between the
11 /// first and the last MPEG-TS clock reference. The H200 sends one about
12 /// every 2 s, so media after the last one is not counted and this can
13 /// fall short of what was written by up to that much. `None` when the
14 /// hub sent a stream without a usable clock, in which case the length of
15 /// the download is unknown.
16 pub duration_s: Option<f64>,
17}
18
19#[cfg(feature = "python")]
20crate::impl_to_dict!(RecordingDownloadResult);