tvkitchen / appliances

A one stop shop for official TV Kitchen Appliances
GNU Lesser General Public License v3.0
3 stars 0 forks source link

Video ingestion appliances emit duplicate payloads #95

Closed slifty closed 3 years ago

slifty commented 3 years ago

Bug

Current Behavior

The current logic defined in the AbstractVideoIngestionAppliance (in particular in processMpegtsStreamData) will emit a payload every time there is new mpegts data. The problem is that mpegts data does not have a 1:1 relationship with packets!

Suggested Behavior

I believe we should have it (1) emit a payload ONLY when there is a new packet to emit and (2) emit every un-emitted packet in the buffer.

This would mean that the transform stream occasionally returns null (whether that is literally the recommended approach is not clear to me)

slifty commented 3 years ago

While we're here -- instead of having processMpegtsStreamData generate empty packets in the beginning of a stream we can have it only start generating when getMostRecentDemuxedPacket actually returns a value.

slifty commented 3 years ago

Oh I'm silly -- the payloads being emitted contain the raw data, the mostRecentDemuxedPacket is only being used to extract timestamp.

We may want to change that some day for some reason but not right now.

Closing this issue.