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

Add extra logging for dummy resample imp #3863

Merged
merged 4 commits into from
Feb 21, 2024
Merged

Conversation

deeagle001
Copy link
Contributor

@deeagle001 deeagle001 commented Feb 17, 2024

When I first started to use pjproject, I disabled everything I assumed I did not need. This mistakenly included --disable-resample. I thought it would disable the resampling functionality as is, but I got a mysterious error about the channel can not be created and raised PJ_EINVALIDOP. After a day of setting up the debug environment and debugging the issue, it turned out that the resampling functionality is mandatory for SIP audio calls, but applying --disable-resample will switch to a dummy resample implementation, which just returns the error code mentioned above. The first channel creation was just a victim of this fact, and the real problem (What operation was invalid?) was already lost at this high level.

This PR tries to help future users not to fall into the same trap I did, by making an error log in the exact place with the proper message.

The PR also contains some minor, non-functional fixes like a typo fix and comment alignment fixes.

@CLAassistant
Copy link

CLAassistant commented Feb 17, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@nanangizz nanangizz left a comment

Choose a reason for hiding this comment

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

Honestly trailing whitespace removal is quite annoying for code reviewing (I know some IDEs have this feature enabled by default). Hopefully the commit can be separated from the bug fix/enhancement patch.

@sauwming sauwming merged commit 7178ab0 into pjsip:master Feb 21, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants