pjmedia_port_put_frame frame size

MQ
Manuel Quinteiro
Fri, Nov 10, 2017 3:00 PM

Hello,
I'm trying to send a RTP stream.
I have negotiated and sdp then created an stream  and retrieved de port  with
pjmedia_stream_create
My internal audio is originaly defined as:baudrate = 44100samples per frame =
554bits per sample 16
So I've create a resample por with:
pjmedia_resample_port_create(  pool,  port,44100,
PJMEDIA_RESAMPLE_USE_LINEARPJMEDIA_RESAMPLE_USE_SMALL_FILTER|,&resample_port));
and sent the audio using
frame.size=554*2;frame.buf=bufPt;  (bufPt is my frame with 554 samples)rc
=pjmedia_port_put_frame(resample_port,&frame);
Everything lucks ok but in the other side the audio is received distorted.
I've started to make different test and I have detect that I can't send my frame
with 554 samples, that I have to send 20ms. (that is 882 samples)
What I'm doing wrong? I couldn't send the frame size that I want? If actually I
have to send a predefined frame size (or time size), how I get that size/time?
Thanks!!!
Best regards.

Manuel Quinteiro

Hello, I'm trying to send a RTP stream. I have negotiated and sdp then created an stream and retrieved de port  with pjmedia_stream_create My internal audio is originaly defined as:baudrate = 44100samples per frame = 554bits per sample 16 So I've create a resample por with: pjmedia_resample_port_create( pool, port,44100, PJMEDIA_RESAMPLE_USE_LINEARPJMEDIA_RESAMPLE_USE_SMALL_FILTER|,&resample_port)); and sent the audio using frame.size=554*2;frame.buf=bufPt;  (bufPt is my frame with 554 samples)rc =pjmedia_port_put_frame(resample_port,&frame); Everything lucks ok but in the other side the audio is received distorted. I've started to make different test and I have detect that I can't send my frame with 554 samples, that I have to send 20ms. (that is 882 samples) What I'm doing wrong? I couldn't send the frame size that I want? If actually I have to send a predefined frame size (or time size), how I get that size/time? Thanks!!! Best regards. Manuel Quinteiro