From fe4b5fb632bb8a6ec78d3c7f752bf19a26480126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Einarson?= Date: Sun, 5 Nov 2023 23:24:20 +0100 Subject: [PATCH 1/2] docs: long due update of mp4/docs.go --- mp4/doc.go | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/mp4/doc.go b/mp4/doc.go index 5720d076..d599ba20 100644 --- a/mp4/doc.go +++ b/mp4/doc.go @@ -5,11 +5,10 @@ Most boxes have their own file named after the box four-letter name in the ISO/I but in some cases, there may be multiple boxes that have the same content, and the code is then having a generic name like visualsampleentry.go. - The Box interface is specified in box.go. It decodes box size and type in the box header and dispatched decode for each individual box depending on its type. -Implement a new box +# Implement a new box To implement a new box "fooo", the following is needed: @@ -17,27 +16,29 @@ Create a file fooo.go and with struct type FoooBox. FoooBox should then implement the Box interface methods: - Type() - Size() - Encode() - Info() + Type() + Size() + Encode() + EncodeSW() + Info() -but also its own decode method `DecodeFooo`, and register that method in the `decoders` map in `box.go`. +but also its own decode method DecodeFooo and DecodeFoooSR, and register these +methods in the decoders map in box.go and decodersSR map in boxsr.go. For a simple example, look at the `prft` box in `prft.go`. -Container Boxes +# Container Boxes Container boxes like moof, have a list of all their children called Children, but also direct pointers to the children with appropriate names, like Mfhd and Traf. This makes it easy to chain box paths to reach an element like a TfhdBox as - file.Moof.Traf.Tfhd + file.Moof.Traf.Tfhd When there may be multiple children with the same name, there may be both a -pointer to a slice Trafs with all boxes and Traf that points to the first. +pointer to a slice like Trafs with all boxes and Traf that points to the first. -Media Sample Data Structures +# Media Sample Data Structures To handle media sample data there are two structures: @@ -45,12 +46,10 @@ To handle media sample data there are two structures: 2. `FullSample` also carries a slice with the samples binary data as well as decode time -Fragmenting segments +# Fragmenting segments A MediaSegment can be fragmented into multiple fragments by the method - func (s *MediaSegment) Fragmentify(timescale uint64, trex *TrexBox, duration uint32) ([]*Fragment, error) - - + func (s *MediaSegment) Fragmentify(timescale uint64, trex *TrexBox, duration uint32) ([]*Fragment, error) */ package mp4 From af0bbd0f4ef5eb2d25402fa53335772585fed79a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Einarson?= Date: Fri, 17 Nov 2023 14:46:26 +0100 Subject: [PATCH 2/2] docs: update to v0.40.2 --- CHANGELOG.md | 7 ++++++- mp4/version.go | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7321d0a8..b5955a25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Nothing yet + +## [0.40.2] - 2023-11-17 + ### Fixed - Test of AVC PicTiming SEI with cbpDbpDelay set @@ -508,7 +512,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - New unique repo name: `mp4ff` -[Unreleased]: https://github.com/Eyevinn/mp4ff/compare/v0.40.1...HEAD +[Unreleased]: https://github.com/Eyevinn/mp4ff/compare/v0.40.2...HEAD +[0.40.2]: https://github.com/Eyevinn/mp4ff/compare/v0.40.1...v0.40.2 [0.40.1]: https://github.com/Eyevinn/mp4ff/compare/v0.40.0...v0.40.1 [0.40.0]: https://github.com/Eyevinn/mp4ff/compare/v0.39.0...v0.40.0 [0.39.0]: https://github.com/Eyevinn/mp4ff/compare/v0.38.0...v0.39.0 diff --git a/mp4/version.go b/mp4/version.go index b6d788b1..a3388fdd 100644 --- a/mp4/version.go +++ b/mp4/version.go @@ -7,8 +7,8 @@ import ( ) var ( - commitVersion string = "v0.40.1" // May be updated using build flags - commitDate string = "1698825496" // commitDate in Epoch seconds (may be overridden using build flags) + commitVersion string = "v0.40.2" // May be updated using build flags + commitDate string = "1700228762" // commitDate in Epoch seconds (may be overridden using build flags) ) // GetVersion - get version and also commitHash and commitDate if inserted via Makefile