Add extra logging for dummy resample imp (#3863)
This commit is contained in:
parent
fc3b03c937
commit
7178ab01a8
|
@ -24,14 +24,12 @@
|
|||
#include <pj/log.h>
|
||||
#include <pj/pool.h>
|
||||
|
||||
#define THIS_FILE "resample.c"
|
||||
|
||||
#if PJMEDIA_RESAMPLE_IMP==PJMEDIA_RESAMPLE_LIBRESAMPLE
|
||||
|
||||
#include <third_party/resample/include/resamplesubs.h>
|
||||
|
||||
#define THIS_FILE "resample.c"
|
||||
|
||||
|
||||
|
||||
struct pjmedia_resample
|
||||
{
|
||||
|
@ -158,7 +156,7 @@ PJ_DEF(void) pjmedia_resample_run( pjmedia_resample *resample,
|
|||
* So here comes the trick.
|
||||
*
|
||||
* First of all, because of the history and lookahead requirement,
|
||||
* resample->buffer need to accomodate framesize+2*xoff samples in its
|
||||
* resample->buffer need to accommodate framesize+2*xoff samples in its
|
||||
* buffer. This is done when the buffer is created.
|
||||
*
|
||||
* On the first run, the input frame (supplied by application) is
|
||||
|
@ -176,8 +174,8 @@ PJ_DEF(void) pjmedia_resample_run( pjmedia_resample *resample,
|
|||
* | 0000 | 0000 | frame0... |
|
||||
* +------+------+--------------+
|
||||
* ^ ^ ^ ^
|
||||
* 0 xoff 2*xoff size+2*xoff
|
||||
*
|
||||
* 0 xoff 2*xoff size+2*xoff
|
||||
*
|
||||
* (Note again: resample algorithm is called at resample->buffer+xoff)
|
||||
*
|
||||
* At the end of the run, 2*xoff samples from the end of
|
||||
|
@ -204,7 +202,7 @@ PJ_DEF(void) pjmedia_resample_run( pjmedia_resample *resample,
|
|||
* | frm0 | frm0 | frame1... |
|
||||
* +------+------+--------------+
|
||||
* ^ ^ ^ ^
|
||||
* 0 xoff 2*xoff size+2*xoff
|
||||
* 0 xoff 2*xoff size+2*xoff
|
||||
*
|
||||
* As you can see from above diagram, the resampling algorithm is
|
||||
* actually called from the last xoff part of previous frame (frm0).
|
||||
|
@ -320,6 +318,8 @@ PJ_DEF(pj_status_t) pjmedia_resample_create( pj_pool_t *pool,
|
|||
PJ_UNUSED_ARG(samples_per_frame);
|
||||
PJ_UNUSED_ARG(p_resample);
|
||||
|
||||
PJ_LOG(3, (THIS_FILE, "No resampler created (sample rate conversion is "
|
||||
"disabled or no resample implementation selected)"));
|
||||
return PJ_EINVALIDOP;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue