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

Cleanup source.dynamic, fix append #4156

Merged
merged 4 commits into from
Oct 4, 2024
Merged

Cleanup source.dynamic, fix append #4156

merged 4 commits into from
Oct 4, 2024

Conversation

toots
Copy link
Member

@toots toots commented Oct 3, 2024

This PR does some cleanup of source.dynamic after debugging append:

In particular, it removes the set method and resurection_time parameter.

resurection_time was never used in the code base and creates weird issues when passing sources that are less long than the given time.

I believe that a good general rule is that source.dynamic is powerful and the user should be careful to control the kind of issues that resurection_time was supposed to automatically take care of.

The semantics for set is not clear: does it change the source immediately? Following the track_sensitive param?

Its effect can always be implemented using the next source callback, which is what that PR does.

It also fixes a bug: sources should be put to sleep after being used in source.dynamic as they can be re-used elsewhere or later in the operator.

A convenience methods is added that makes it possible to prepare a source before it is given to source.dynamic, for instance when creating it at the beginning of a track and returning it at its end.

This makes it possible to fetch request, etc. to have the maximum chance of being ready when the source is used.

merge is added as a getter, making it possible to selectively merge tracks when switching sources.

The operator is also no longer marked experimental. It supports all the single and more at this point so it makes sens to give it more visibility.

Lastly, append is rewritten and fixed using these new APIs.

@toots toots force-pushed the source.dynamic-improvements branch 3 times, most recently from 6430d45 to bdea894 Compare October 4, 2024 01:27
@toots toots changed the title source.dynamic improvements. Cleanup source.dynamic, fix append Oct 4, 2024
@toots toots marked this pull request as ready for review October 4, 2024 04:10
@toots toots requested a review from smimram October 4, 2024 04:10
@toots toots force-pushed the source.dynamic-improvements branch from bdea894 to fe17521 Compare October 4, 2024 04:14
@toots toots force-pushed the source.dynamic-improvements branch from fe17521 to 5bb63b2 Compare October 4, 2024 04:16
src/libs/request.liq Outdated Show resolved Hide resolved
@toots toots enabled auto-merge October 4, 2024 12:42
@toots toots added this pull request to the merge queue Oct 4, 2024
Merged via the queue into main with commit 1dc6fac Oct 4, 2024
25 checks passed
@toots toots deleted the source.dynamic-improvements branch October 4, 2024 13:18
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.

2 participants