Plugin: from_mp4 and UntaggedValue::duration fix (#3618)

* plugin: basic from_mp4 implementation

This patch introduces a very basic implementation of from_mp4, with only
a few bits of meta-data available. The rest of the available meta-data
(which is more than half left), will be included in a later patch

* Mp4: Almost all track metadata is implemented

Only meta-data that is not implemented is duration, facing some weird
issue I am going to check on later

* Mp4: All meta-data fields implemented

All meta-data fields that can be retrieved are now retrieved, with the
exception of duration for both tracks and the entire file itself because
there is still an issue. However, that will be fixed in the upcoming
patches

* fix: UntaggedValue::duration() serializes correctly now

Previous to this patch, there was an issue where when you would use
UntaggedValue::duration() it would result in an invalid JSONRPC
resulting string when using the protocol. This patch fixes this issue

* Mp4: Duration fixed for file and tracks

* plugins: Add plugin extra to src/plugins

* Mp4: Replace unwrap() with expect()

* Fix: Remove test mp4 file
This commit is contained in:
Reagan McFarland
2021-06-16 22:18:31 -04:00
committed by GitHub
parent a59414203f
commit 955a5ed8fb
9 changed files with 286 additions and 0 deletions

View File

@ -45,6 +45,7 @@ pub enum Primitive {
/// A date value
Date(DateTime<FixedOffset>),
/// A count in the number of nanoseconds
#[serde(with = "serde_bigint")]
Duration(BigInt),
/// A range of values
Range(Box<Range>),