[Live-devel] live555 transcoding jpeg source file and allows other tasks to run
Armando Ko
armandopoulos at yahoo.fr
Thu Dec 7 01:13:46 PST 2006
Hi,
I am using the live555 to stream JPEG and MPEG2 files
and to run a second thread in my program, I use a function waitSmallTime for
the RTPServer Thread. But I have 2 problems.
This is how I configure my waiting function.
static char
watchVariable;
static void
checkFunc(void* /*clientData*/)
{
watchVariable = ~0;
}
waitSmallTime()
{
//*m_Env
<< "i am waiting 2000 ms ...\n";
int
uSecsToDelay = 2000000; // (1000 for 1ms)
//
Delay a short period of time before checking again.
m_Env->taskScheduler().scheduleDelayedTask(uSecsToDelay,
(TaskFunc*)checkFunc, NULL);
watchVariable = 0;
m_Env->taskScheduler().doEventLoop(&watchVariable); //return
//
This allows other tasks to run while we're waiting:
}
Question 1.
I stream a real jpeg image with PAL resolution
(768*576) but the quality of the image is not gut on client. I´ am using as
client the Mplayer and I can see that my PAL jpeg image is deform or distort. I
want to know if the live555 trans codes the source for example JPEG to MJPEG or
not. An other thesis is that the Mplayer do that.
Question 2.
I try to
stream the MPEG2 files so, one thread send the filename to the RTSPServer
(live555) thread, in FAQ I have a tip to use the watchvariable, I do that with
my function see at the top if I put the
uSecsToDelay = 2000000; I can stream one short video (6 sec) an the RTSPServer
crash (bug) if configure so uSecsToDelay = 9000000 the RTSPServer can play the
video for a long time and the bug are coming.
To stream the JPEG files, I needed to make
uSecsToDelay = 2000000; if the waiting time is smaller than 2ms the RTSPServer
crash.
I should know, where I do a mistake in the using of
the waitsmallTime or watchvariable.
Thanks!
Armand
___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
http://fr.mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20061207/ec4017a4/attachment-0001.html
More information about the live-devel
mailing list