TypesettingTools / SubInspector

Low-level subtitle inspection library.
MIT License
5 stars 3 forks source link

Further steps to safety #5

Closed Youka closed 10 years ago

Youka commented 10 years ago

libass messages are stored in states now. A new error reporting model should come next, like a status function, this way checkLine could return the result instead of storing this in the input (urgh) and errors would be strings.

Furthermore, events should be stored as one string, makes the input more flexible and less errors possible.

torque commented 10 years ago

checkLine could return the result instead of storing this in the input (urgh) and errors would be strings.

If I'm not misinterpreting this, you're suggesting that checkLine would return uint8_t * instead of an integer status code.

I'm strongly opposed to this. Since changes of this type aren't contained in this pull request, this isn't the place to discuss this. But if it is your intent, I'd like to head you off before you've spent lots of time working on it.

Furthermore, events should be stored as one string, makes the input more flexible and less errors possible.

I disagree with this as well. Since events are inspected individually, their internal representation makes more sense as an array. Otherwise the start and end index of each event would need to be known in the big event string to easily extract a single event.

I am not opposed to an api function that allows adding several events at a time as a string that can be processed and turned into an array of individual events.