You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it is cool and nice approach for resilient timecode picker, yet proved to not cover corner-cases (nonDropFrame encoding, etc.)
it ignores ttp:timeBase parameter's value (which is not a best practice)
timecode parser does not consider SMPTE cases with dropFrame encoding
it ignores attribute ttp:dropMode - not necessary to pass each Regex test
it does not cover Drop-Frame encoded timecodes (like library smpte-timecode does)
Few solutions I might think of (that would not affect the library itself too much):
allow passing custom timecode parser to imsc.fromXML function. Implementing Dependency Injection here is a nice way to get rid of multiple edge cases you would not want to cover and maintain by yourselves
implement standard-compliant parser that will cover all cases (Drop/Non-Drop Frame encoding, 2:3 pull-down on 23.976, etc.) - includes lot of effort implementing and preparing proper tests
make fromXML something more like a declarative pipeline ( where you can provide callbacks that can override parsing process steps - see: https://rxjs.dev/guide/higher-order-observables ) that processes the sax stream
become dependent on smpte-timecode library - worst solution IMHO. I like how you rely on sax parser, yet personally I prefer to have more control over dependencies I include into my codebase
The text was updated successfully, but these errors were encountered:
The only permitted ttp:timeBase value in IMSC is media. As a reference IMSC player, it makes sense that it ignores ttp:dropMode since that only applies when ttp:timeBase="smpte".
Having said that, it's an interesting idea to refactor to allow injection of additional out-of-spec functionality.
Function in
doc.js
calledextractTimeAndTickRate
might contain a bug that seems like an impediment in development of one of our tools. The lineimscJS/src/main/js/doc.js
Line 1649 in 7716bcc
The issues we currently face are:
parsing
begin
andend
timecodes are regexp-basedttp:timeBase
parameter's value (which is not a best practice)timecode parser does not consider SMPTE cases with dropFrame encoding
ttp:dropMode
- not necessary to pass each Regex testsmpte-timecode
does)Few solutions I might think of (that would not affect the library itself too much):
allow passing custom timecode parser to
imsc.fromXML
function. Implementing Dependency Injection here is a nice way to get rid of multiple edge cases you would not want to cover and maintain by yourselvesimplement standard-compliant parser that will cover all cases (Drop/Non-Drop Frame encoding, 2:3 pull-down on 23.976, etc.) - includes lot of effort implementing and preparing proper tests
make
fromXML
something more like a declarative pipeline ( where you can provide callbacks that can override parsing process steps - see: https://rxjs.dev/guide/higher-order-observables ) that processes the sax streambecome dependent on
smpte-timecode
library - worst solution IMHO. I like how you rely onsax
parser, yet personally I prefer to have more control over dependencies I include into my codebaseThe text was updated successfully, but these errors were encountered: