Skip to content

let oryx support external srs service #228

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

suzp1984
Copy link
Contributor

@suzp1984 suzp1984 commented Oct 28, 2024

Let Oryx can config external Redis and SRS host.

  1. config external redis and srs host by env;
  2. improve HLS ts file download, for the external srs service, download the ts file by http request.

external Redis support already supported and commit by #196, the initial comments here was so wrong.


Background

The requirement of let oryx to support external SRS was came from a k8s deployment ideas, let oryx, srs, redis run in different containers.
@see ossrs/srs-helm#8

The impact for the oryx is the record HLS ts file related features, which need to change the HLS ts segment file recording from disk file copy to http request, because oryx and srs may not share same disk.

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Oct 28, 2024
@suzp1984 suzp1984 force-pushed the feature/support-external-redis-srs branch 2 times, most recently from bd1ade4 to d18fa2b Compare October 29, 2024 07:38
@suzp1984 suzp1984 force-pushed the feature/support-external-redis-srs branch from d18fa2b to a70f688 Compare October 29, 2024 12:55
@suzp1984 suzp1984 force-pushed the feature/support-external-redis-srs branch from a70f688 to 0da4e53 Compare October 29, 2024 13:34
@suzp1984 suzp1984 force-pushed the feature/support-external-redis-srs branch 2 times, most recently from 0d5748c to 6eae8fe Compare October 30, 2024 06:47
@suzp1984 suzp1984 marked this pull request as ready for review October 30, 2024 06:54
return errors.Wrapf(err, "create file %v error", tsfile)
} else {
defer file.Close()
io.Copy(file, bytes.NewReader(data))
Copy link
Member

Choose a reason for hiding this comment

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

Should revert this, because not related to external redis service.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The external Redis support already supported and commit by #196, this PR was all about external SRS.

res, err := http.DefaultClient.Get(api)
if err != nil {
return errors.Wrapf(err, "reload srs %v", api)
logger.Tf(ctx, "srs api reload error %v", err)
Copy link
Member

Choose a reason for hiding this comment

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

Should revert it, for not relevant to external redis.


// below stupied code is used to resolve the code scanning error:
// Uncontrolled data used in path expression
allowedDir, err := os.Getwd()
Copy link
Member

Choose a reason for hiding this comment

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

Should revert it for not relevant to external redis.

@winlinvip
Copy link
Member

One PR should only fix one issue or support one feature.

@suzp1984 suzp1984 force-pushed the feature/support-external-redis-srs branch from 6eae8fe to 734639a Compare May 25, 2025 02:12
@suzp1984 suzp1984 changed the title let oryx support external redis and srs service let oryx support external ~~redis and~~ srs service May 25, 2025
@suzp1984 suzp1984 changed the title let oryx support external ~~redis and~~ srs service let oryx support external srs service May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants