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