-
Notifications
You must be signed in to change notification settings - Fork 18
Allow to switch audio codec, when audio is re-attached #448
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -59,6 +59,10 @@ void AttachSource::execute() const | |||||||
| { | ||||||||
| addSource(); | ||||||||
| } | ||||||||
| else if (m_attachedSource->getType() == MediaSourceType::AUDIO) | ||||||||
| { | ||||||||
| reattachAudioSource(); | ||||||||
| } | ||||||||
| else | ||||||||
| { | ||||||||
| RIALTO_SERVER_LOG_ERROR("cannot update caps"); | ||||||||
|
|
@@ -106,4 +110,14 @@ void AttachSource::addSource() const | |||||||
| if (caps) | ||||||||
| m_gstWrapper->gstCapsUnref(caps); | ||||||||
| } | ||||||||
|
|
||||||||
| void AttachSource::reattachAudioSource() const | ||||||||
| { | ||||||||
| if (!m_player.reattachSource(m_attachedSource)) | ||||||||
| { | ||||||||
| RIALTO_SERVER_LOG_ERROR("Reattaching source failed!"); | ||||||||
| return; | ||||||||
| } | ||||||||
| RIALTO_SERVER_LOG_MIL("Audio source reattached"); | ||||||||
|
||||||||
| RIALTO_SERVER_LOG_MIL("Audio source reattached"); | |
| RIALTO_SERVER_LOG_MIL("%s source reattached", | |
| common::convertMediaSourceType(m_attachedSource->getType())); |
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.
The error logging level is inconsistent with SwitchSource task. The SwitchSource task uses RIALTO_SERVER_LOG_WARN for the same reattachSource failure scenario (see SwitchSource.cpp line 43). Consider using RIALTO_SERVER_LOG_WARN instead of RIALTO_SERVER_LOG_ERROR for consistency.