Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for writing to a generic section stream #7

Merged
merged 1 commit into from
Jun 10, 2023

Conversation

jensenn
Copy link
Contributor

@jensenn jensenn commented Jun 7, 2023

Thanks for all your review of my pull requests!

I need a way to write SCTE-35 splice data into a TS stream. At this time, reading is not necessary.

SCTE-35 splice_info_section is a short format section stream that normally only spans a single TS packet, but could span multiple packets. The first packet needs the PUSI set and inserts a pointer_field byte. Subsequent packets do not set PUSI and do not have the pointer_field.

TsPayload::Raw will work for subsequent packets, but right now, there is not an appropriate TsPayload to use for the first payload. It really is a PSI table, but I have a pile of bytes that I don't want to have to parse into a PsiTable. Even then, there isn't a TsPayload to write a generic Psi.

Here is my proposal, but I don't know if it is the right thing to do. It is kind of a very low-level interface for generic section streams. I welcome your feedback.

Again, this is just writing. Reading would take a pretty large change to the reader as it assumes all elementary streams in the PMT are PES and doesn't handle section streams. Maybe we can think about that for another day.

@sile
Copy link
Owner

sile commented Jun 7, 2023

Thank you as always!
I'll review this PR within a week.

Copy link
Owner

@sile sile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with SCTE-35, but your approach looks reasonable 👍

@sile sile merged commit d91d3a6 into sile:master Jun 10, 2023
@sile
Copy link
Owner

sile commented Jun 10, 2023

About the reading part, let's discuss how to implement that when it becomes necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants