-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support OPUS #24
base: master
Are you sure you want to change the base?
Support OPUS #24
Conversation
435679e
to
8b8c77e
Compare
75ceb17
to
fd0a686
Compare
c_src/membrane_agora_plugin/sink.cpp
Outdated
@@ -24,7 +24,7 @@ UNIFEX_TERM create(UnifexEnv *env, char *appId, char *token, char *channelId, | |||
scfg.enableVideo = true; | |||
scfg.useStringUid = false; | |||
if (state->service->initialize(scfg) != agora::ERR_OK) { | |||
AG_LOG(ERROR, "Failed to initialize service"); | |||
AG_LOG(ERROR, "Failed to initialize sink service"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AG_LOG(ERROR, "Failed to initialize sink service"); | |
AG_LOG(ERROR, "Failed to initialize Agora service in sink"); |
c_src/membrane_agora_plugin/sink.cpp
Outdated
if (codec == CODEC_AUDIO_AAC) { | ||
audioFrameInfo.codec = agora::rtc::AUDIO_CODEC_TYPE::AUDIO_CODEC_AACLC; | ||
} else if (codec == CODEC_AUDIO_OPUS) { | ||
audioFrameInfo.codec = agora::rtc::AUDIO_CODEC_TYPE::AUDIO_CODEC_OPUS; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[NIT] I would warn if other codec was passed here. I know that now the only options for CodecAudio are CODEC_AUDIO_AAC
and CODEC_AUDIO_OPUS
, but it might cause trouble in the future if we were to add some further codecs.
lib/agora/agora_sink.ex
Outdated
state.native_state | ||
) | ||
|
||
{[], %{state | native_state: native_state}} | ||
end | ||
|
||
@impl true | ||
def handle_stream_format(Pad.ref(:audio, _id), %Opus{}, _ctx, state) do | ||
# audio stream format will be updated in handle_buffer/4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[NIT] this comment is quite ambiguos for me
lib/agora/agora_sink.ex
Outdated
end | ||
|
||
state = | ||
if stream_format == :opus and buffer.metadata.duration != state.last_frame_duration do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metadata.duration
isn't available outside of our pipeline, we add it with DurationAddingFilter
No description provided.