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

Don't add automatically ffmpeg audio transcoding #24

Merged
merged 3 commits into from
Nov 6, 2024
Merged

Conversation

edenhaus
Copy link
Collaborator

@edenhaus edenhaus commented Nov 6, 2024

Proposed Changes

Until now, we automatically added f"ffmpeg:{name}#audio=opus" as a second stream to have WebRTC audio support.
But there are cameras which don't have audio at all, and therefore the caller should decide, which sources should be added.

@edenhaus edenhaus added bugfix Inconsistencies or issues which will cause a problem for users or implementers. breaking-change A breaking change for existing users. labels Nov 6, 2024
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.98%. Comparing base (470ec70) to head (62e0de5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #24   +/-   ##
=======================================
  Coverage   97.98%   97.98%           
=======================================
  Files           7        7           
  Lines         298      298           
  Branches       50       50           
=======================================
  Hits          292      292           
  Misses          4        4           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


@handle_error
async def add(self, name: str, source: str) -> None:
async def add(self, name: str, sources: str | list[str]) -> None:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Needed to move the function add before list otherwise mypy get confused with the list[str] type

Copy link
Contributor

Choose a reason for hiding this comment

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

How is the string type handled for sources parameter? Is that a single source? Can that be passed as is?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See de00a76 (#24)

It will only add one src query param instead of multiple

Copy link
Contributor

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Looks good!

@edenhaus edenhaus merged commit cc03552 into main Nov 6, 2024
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change A breaking change for existing users. bugfix Inconsistencies or issues which will cause a problem for users or implementers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants