Commit graph

22 commits

Author SHA1 Message Date
f0f60ebdfc
Roadblock on Deku usage
Here we hit a road block on using Deku for the SCTE35 spec. The Upid
type is more complex in terms of serialization which makes it very
complicated to use Deku.

Besides the problem above. It seems like using Deku will make
maintainance more complicated due to the externsive use of magic macros.
Which also does impact development. I still believe Deku is a great
project to be used in more straight forward binary formats.
2022-05-12 09:08:28 +02:00
56bc156be4
Define Splice Descriptor using Deku
Implements the generic Splice Descriptor definition using the Deku
declarative library macros.

I've implemented only the generic variant of the Splice Descriptors to
check how it would look like using Deku.
2022-05-11 23:17:43 +02:00
6b13875150
Use Deku crate for serialization
Using the Deku library we can implement a `no_std` compatible read and
write structs/enums. We don't need to write manually encoding code and
rely completely on the Deku derive macros to do the right job.

I've implemented the SpliceTime part of the spec as a proof of concept
of the use of Deku. It worked great for this small structure.
2022-05-10 23:05:48 +02:00
501e060979
Serialize TimeSignal with additional fields
Move all code related to the "serde" feature to a separated module. Add
missing getter methods to some structs. Add missing derive to public
structs. Makes all tests pass.

Signed-off-by: Rafael Caricio <rafael@caricio.com>
2022-05-06 23:56:17 +02:00
5d72027943
Use generic trait for SpliceTime creation
Add support for creating `SpliceTime` instances from anything that
implements the trait `ClockTimeExt`. This makes redundant to implement
the `From` trait for the `std::time::Duration` struct, since it
implements the `ClockTimeExt` trait.

Signed-off-by: Rafael Caricio <rafael@caricio.com>
2022-05-06 22:26:57 +02:00
1770c5ca9d
Add license file
Add MIT license file to the repository.

Signed-off-by: Rafael Caricio <rafael@caricio.com>
2022-05-06 22:16:56 +02:00
abc1d82912
Show human readable time to serde repr
Adds a new field to the serde struct that represents a human readable
duration of time. This makes easier to debug the SCTE markers.

This commit also simplifies a bit the code using Default trait and other
simplifications.

Fixed the calculation of the sizes of sections in the final SCTE struct.
We were not calculating correctly the amount of bytes of the sections.
Now we use the Recorder pattern which returns the exact amount of bytes
written.
2022-05-06 00:29:10 +02:00
8b5287938d
Update readme 2022-05-03 16:54:39 +02:00
00a28859c7
Support descriptors serialization 2022-05-03 16:53:28 +02:00
fa917dafce
Segmentation descriptor with upid types 2022-05-03 13:40:39 +02:00
1f1ee312c0
Initial segmentation descriptor implementation 2022-05-02 19:45:05 +02:00
3ffcca82c0
Use standard naming 2022-05-02 11:04:45 +02:00
407f88c69d
Fix link in README 2022-05-02 09:42:14 +02:00
6fd2babc11
Initial support for TimeSignal 2022-05-02 00:08:28 +02:00
cc43ed8994
Alert it's a work in progress 2022-05-01 17:42:48 +02:00
6b54b5456a
Encode as hex 2022-05-01 16:01:39 +02:00
f13606d851
Allow modification before encoding 2022-05-01 15:49:28 +02:00
02843e70f1
Serialization support using serde 2022-05-01 15:22:26 +02:00
e4ccc470a6
Can encode SpliceNull, first test pass 2022-05-01 11:45:26 +02:00
5e9522b845
Possibility to write splice info section 2022-05-01 00:49:45 +02:00
f3936e2e78
Add crate description 2022-04-24 00:10:14 +02:00
b7f280d753
Initial version 2022-04-24 00:05:28 +02:00