forked from aiko-chan-ai/Discord-video-experiment
-
Notifications
You must be signed in to change notification settings - Fork 43
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
New API #125
Merged
Merged
New API #125
+546
−83
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If streaming as a camera stream, we have to create the voice connection before creating the media stream. At that point, the streaming codec is unknown, so let's just announce all the supported codecs
It does not make sense to specify different IDs than the one we currently connect to anyway, so remove those
This will allow us to recall `setProtocols` to change encryption parameters if need be
I mean this can just be inlined as well, but whatever...
dank074
approved these changes
Nov 28, 2024
This was referenced Jan 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The new API that I promised
Functions added (names are changeable, feel free to suggest):
prepareStream
: Take the input (a file path or aReadable
stream) and use ffmpeg to create a Matroska media stream compatible with this librarystreamLivestreamVideo
, the ffmpeg instance is returned back to user code, and the user is free to do whatever they want with itplayStream
: Take the input stream and set up the muxer, packetizer and stream settingsTypical use case:
Due to the need to keep backwards compatibility with
streamLivestreamVideo
, there are a few places that I'm not completely happy with (updatePacketizer
being one of them). Once the old API is removed then we can do more cleanup. Please report if there are any breakage of the old API, since I might have missed something.