Skip to main content

easy_ffprobe/
attachment_stream.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
4/// Tags specific for attachments
5pub struct AttachmentTags {
6    pub filename: String,
7    pub mimetype: String,
8    pub title: Option<String>,
9    #[serde(flatten)]
10    pub extra: std::collections::HashMap<String, serde_json::Value>,
11}
12#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
13#[cfg_attr(feature = "__internal_deny_unknown_fields", serde(deny_unknown_fields))]
14/// Stream of type attachment
15pub struct AttachmentStream {
16    /// Duration of the video stream in timestamp units.
17    pub duration_ts: u64,
18    /// Metadata tags associated with the video stream.
19    pub tags: AttachmentTags,
20    /// Long name of the codec used for the video stream.
21    pub codec_long_name: Option<String>,
22    /// Short name of the codec used for the video stream.
23    /// Example: h264
24    pub codec_name: Option<String>,
25    #[cfg(feature = "__internal_deny_unknown_fields")]
26    codec_type: serde_json::Value,
27    #[cfg(feature = "__internal_deny_unknown_fields")]
28    start_time: Option<serde_json::Value>,
29    #[cfg(feature = "__internal_deny_unknown_fields")]
30    duration: Option<serde_json::Value>,
31}