Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Controlling the media sequence values of individual segments #125

Closed
kapvode opened this issue Feb 5, 2019 · 1 comment
Closed

Controlling the media sequence values of individual segments #125

kapvode opened this issue Feb 5, 2019 · 1 comment

Comments

@kapvode
Copy link

kapvode commented Feb 5, 2019

I have an application that records HLS streams and I often need to replicate the media sequence values of some source stream. One thing I encounter fairly frequently is that the media sequence is restarted or it could be that some media segments are dropped. In any case, I need more precise control of the media sequence values of individual segments. It is not simply a matter of incrementing the sequence by one.

I already have this working correctly. This is how it works.

I call MediaPlaylist.Remove() if I have to, then I create a segment, set its SeqId and call MediaPlaylist.AppendSegment().

Now I find the first segment in the playlist and set MediaPlaylist.SeqNo = firstSegment.SeqId.

I don't like how I find the first segment, and I was going to ask if you could expose a function that would return the head of the list.

I was also hoping that the changes in #116 would be helpful for my use case. In theory, the playlist could respect the sequence IDs that I set on the segments, and automatically set the media sequence of the playlist to the media sequence of the first segment (although this would break backwards compatibility).

But unfortunately, PR #124 breaks what I have right now. The SeqId values that I set on the segments before I append them to the playlist are lost.

So now I have two problems:

  1. I need the SeqId values that I set on the segments to be preserved.

  2. I would like a way of accessing the first segment in the playlist.

The second thing should be easy, but I'm worried about the first one.

Do you think you could support such a use case?

@kapvode
Copy link
Author

kapvode commented Apr 20, 2020

This is no longer relevant to me.

@kapvode kapvode closed this as completed Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant