Add extra logging for dummy resample imp #3863
Merged
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.
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 raisedPJ_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.