servo_media_player/
metadata.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5use std::time;
6
7#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
8pub struct Metadata {
9    pub duration: Option<time::Duration>,
10    pub width: u32,
11    pub height: u32,
12    pub format: String,
13    pub is_seekable: bool,
14    // TODO: Might be nice to move width and height along with each video track.
15    pub video_tracks: Vec<String>,
16    pub audio_tracks: Vec<String>,
17    // Whether the media comes from a live source or not.
18    pub is_live: bool,
19    pub title: Option<String>,
20}