[Live-devel] problem streaming to vlc
xavier
nikoxan at mixmail.com
Mon Jul 19 16:52:36 PDT 2004
Thank you again for your response, Ross
I've updated the library to the latest version and now use the "testMPEG1or2VideoStreamer"
as a base code and now the StreamParser does not complain at all. Although vlc now
receives the sdp
descriptor with the correct rtp session parameters (before following Ross's advice, it
wouldn't even communicate with the server), its decoder outputs a <<TaskInterrupt>> all the
time.
I don't know if my server is not streaming the rtp session at all or if the
information from my AVFrame gets messed up in the parsing process. Maybe the
fPresentationTime that I acquire from the system lead to an error?
this is a little bunch of the code using liveMedia:
static struct timezone quin;
static AVFrame *picture;
static int size;//en bytes
void RPVRFramedSource::doGetNextFrame() {
fFrameSize = size;
if (fFrameSize > fMaxSize)
{
fNumTruncatedBytes = fFrameSize - fMaxSize;
fFrameSize = fMaxSize;
}
memmove(fTo, picture->data[0], fFrameSize);
gettimeofday(&fPresentationTime, &quin);
nextTask()
= envir().taskScheduler().scheduleDelayedTask(0, (TaskFunc*)afterGetting,
this);
}
this is the modified play() method of the main code (I've left the rest untouched).
RTPSink* videoSink;
FramedSource* videoSource;
RTPSink* videoSink;
void play() {
RPVRFramedSource* videoES=RPVRFramedSource::createNew(*env);
// Create a framer for the Elementary Stream:
videoSource
= MPEG1or2VideoStreamFramer::createNew(*env, videoES, iFramesOnly);
// Finally, start playing the sink.
*env << "Beginning to read ...\n";
videoSink->startPlaying(*videoES, afterPlaying, videoSink);
}
then, in the main loop, the session is added to the server:
sms->addSubsession(PassiveServerMediaSubsession::createNew(*videoSink, videoRTCP));
rtspServer->addServerMediaSession(sms);
Thanks for your patience,
xavier
---------------------------------------------------------
Este verano... ¡Aprovecha para enamorarte! Con el 2x1 de Muchagente http://www.muchagente.com
Ya.com ADSL Router Wi-Fi: Sólo 29,90 /mes + IVA*. Router + Antivirus y firewall ¡Gratis! http://acceso.ya.com/adsl/256router
More information about the live-devel
mailing list