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
7use serde::{Deserialize, Serialize};
8
9#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
10pub struct Metadata {
11 pub duration: Option<time::Duration>,
12 pub width: u32,
13 pub height: u32,
14 pub format: String,
15 pub is_seekable: bool,
16 // TODO: Might be nice to move width and height along with each video track.
17 pub video_tracks: Vec<String>,
18 pub audio_tracks: Vec<String>,
19 // Whether the media comes from a live source or not.
20 pub is_live: bool,
21 pub title: Option<String>,
22}