[Live-devel] live audio source
Stas Desyatnlkov
stas at mer.co.il
Tue Mar 14 08:28:10 PST 2006
Hi All,
I build the sample that sends uncompressed voice (8kHz, 1 chan, 16bits)
over RTP (no RTCP and no RTSP). The sample runs on the local network.
The problem is the voice delay is rather big 70 - 100 msec.
Before sending the samples I tried my recording and playback classes and
they do not introduce the delay when working on a local machine without
live.
I currently use small chunks of audio (10ms = 160 bytes).
doGetNextFrame function of my source filer looks like:
void PhoneVoiceSource::doGetNextFrame()
{
fFrameSize = 0;
if (!m_initFlg)
return;
if (m_firstFrame)
{
m_rec.Record();
m_firstFrame = false;
}
m_rec.GetBuffer(fTo, (int*)&fFrameSize);
gettimeofday(&fPresentationTime, NULL);
#if defined(__WIN32__) || defined(_WIN32) || defined(UNDER_CE)
afterGetting(this);
#else
nextTask() = envir().taskScheduler().scheduleDelayedTask(0,
(TaskFunc*)FramedSource::afterGetting, this);
#endif
}
I'd like to reduce voice delay down to 30-50msec range. What can be done
?
Regards,
Stas.
-----Original Message-----
From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Thursday, March 02, 2006 2:37 PM
To: LIVE555 Streaming Media - development & use
Subject: RE: [Live-devel] live audio source
At 03:31 AM 3/2/2006, you wrote:
>Thanx, it worked as well.
>I begin to get an idea of how things work in the library. I wish there
>were a doc describing the classes and interactions between them.
See <http://www.live555.com/liveMedia/faq.html#doc>
>Now I'd like to add G.729 Encoder and Decoder as filters for my live
>source. What is the right way to do it ?
Define - for each - a new class that's a subclass of
"FramedFilter". Your new class should implement the virtual function
"doGetNextFrame()" by calling "getNextFrame" on "fInputSource", then
processing (encoding or decoding) the input frame, then delivering
the result to the reader. (You may also find
"liveMedia/DeviceSource.cpp" useful.)
Ross Finlayson
Live Networks, Inc. (LIVE555.COM)
<http://www.live555.com/>
_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
More information about the live-devel
mailing list