<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">hi,<br><br>i try to stream jpeg image files as multicast to 239.255.42.42 but vlc can show the pictures in the report i can read this errors <br><br><span style="font-weight: bold;">ps warning: found sync code</span><br style="font-weight: bold;"><span style="font-weight: bold;">ps warning: garbage at input, trying to resync...</span><br><br>i don´t know what are missing in the streaming.<br><br>i think i don´t need "ByteStreamFileSource" to open the file as a byte stream but open the file also stream like this<br><br><span style="font-weight: bold;">m_ImageSource = ImageSource::createNew(*m_Env, pFileName, timeToDisplay);</span><br style="font-weight: bold;"><br style="font-weight: bold;"><span style="font-weight: bold;"> if
(m_ImageSource == NULL) {</span><br style="font-weight: bold;"><span style="font-weight: bold;"> *m_Env << "Unable to open file \"" << pFileName</span><br style="font-weight: bold;"><span style="font-weight: bold;"> << "\" as a byte-stream file source\n";</span><br style="font-weight: bold;"><span style="font-weight: bold;"> return FALSE;</span><br style="font-weight: bold;"><span style="font-weight: bold;"> }</span><br style="font-weight: bold;"><br style="font-weight: bold;"><span style="font-weight: bold;"> // Finally, start playing ---------------------------------</span><br style="font-weight: bold;"><span style="font-weight: bold;"> *m_Env << "Beginning streaming image...\n";</span><br style="font-weight: bold;"><span style="font-weight: bold;">
m_ImageSink->startPlaying(*m_ImageSource, OnEndShowImage, this);</span><br><br>thanks for a tips or ideas.<br>Armando<br><br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Message d'origine ----<br>De : Armando Ko <armandopoulos@yahoo.fr><br>À : live-devel@ns.live555.com<br>Envoyé le : Mardi, 13 Février 2007, 16h51mn 36s<br>Objet : [Live-devel] help -- Streaming RTP/JPEG Multicast<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>hi Ross,<br><br>i try to stream jpeg Files as RTP Multicast with the live555. But i can stream the jpegfiles but the vlc cannot see them and with wireshark i can see the jpeg frames they are sending, also here is my test program for do it.<br><br>i would be very happy, if you can give me some tips or what is wrong in my code.<br><br>The ImageSource is a subclass of JPEGVideoSource where i define this
methodes<br> <br><span style="font-weight: bold;">createNew(UsageEnvironment& env, char const* fileName, unsigned viewTime);</span><br style="font-weight: bold;"><span style="font-weight: bold;">// redefined virtual functions:</span><br style="font-weight: bold;"><span style="font-weight: bold;"> virtual void doGetNextFrame();</span><br style="font-weight: bold;"><span style="font-weight: bold;"> virtual u_int8_t type();</span><br style="font-weight: bold;"><span style="font-weight: bold;"> virtual u_int8_t qFactor();</span><br style="font-weight: bold;"><span style="font-weight: bold;"> virtual u_int8_t width();</span><br style="font-weight: bold;"><span style="font-weight: bold;"> virtual u_int8_t height();</span><br style="font-weight: bold;"><span style="font-weight: bold;"> virtual u_int8_t const* quantizationTables(u_int8_t& precision,
u_int16_t& length);</span><br><br>here is my testprogramm (see attachment)<br><br> thanks<br><br>Armando<br><br></div></div><br>
                <hr size="1">
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur <a rel="nofollow" target="_blank" href="http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com">Yahoo! Questions/Réponses</a>.<div><br>UsageEnvironment* env;<br>char const* inputFileName = "test.jpeg";<br>ImageSource* ImageSource;<br>JPEGVideoRTPSink* ImageSink;<br><br>void play(); // forward<br><br>int main(int argc, char** argv) {<br><br>// Begin by setting up our usage environment:<br> TaskScheduler* scheduler = BasicTaskScheduler::createNew();<br> m_Env = BasicUsageEnvironment::createNew(*scheduler);<br><br> // Create 'groupsocks' for RTP and RTCP:<br> char* destinationAddressStr = "239.255.42.42";<br> const unsigned short rtpPortNum = 1234;<br> const unsigned short rtcpPortNum = rtpPortNum+1;<br> const unsigned char ttl = 7; // low, in case routers don't
admin scope<br> <br> struct in_addr destinationAddress;<br> destinationAddress.s_addr = our_inet_addr(destinationAddressStr);<br> const Port rtpPort(rtpPortNum);<br> const Port rtcpPort(rtcpPortNum);<br> Groupsock rtpGroupsock(*env, destinationAddress, rtpPort, ttl);<br> Groupsock rtcpGroupsock(*env, destinationAddress, rtcpPort, ttl);<br> <br> ImageSink = JPEGVideoRTPSink::createNew(*m_Env, rtpGroupsock);<br><br> // Create (and start) a 'RTCP instance' for this RTP sink:<br> const unsigned estimatedSessionBandwidth = 5000; // in kbps; for RTCP b/w share<br> const unsigned maxCNAMElen = 100;<br> unsigned char CNAME[maxCNAMElen+1];<br> gethostname((char*)CNAME,
maxCNAMElen);<br> CNAME[maxCNAMElen] = '\0'; // just in case<br><br><br> RTCPInstance::createNew(*m_Env,m_rtcpGroupsock,<br> estimatedSessionBandwidth, CNAME,<br> ImageSink, NULL /* we're a server */,/*isSSM*/false);<br> <br>// Finally, start the streaming:<br> *env << "Beginning streaming...\n";<br><br> play();<br><br> env->taskScheduler().doEventLoop(); // does not return<br> return 0; //
only to prevent compiler warning<br>}<br><br><br><br>void afterPlaying(void* /*clientData*/) {<br><br> *env << "...done reading from file\n";<br> Medium::close(ImageSource);<br> // Note that this also closes the input file that this source read from.<br> play();<br>}<br><br>void play() {<br> //----------- Create a framer for the image elementary Stream---------<br> m_ImageSource = ImageSource::createNew(*m_Env, inputFileName, timeToDisplay); //timeToDisplay<br> if (m_ImageSource == NULL) {<br> *m_Env << "Unable to open file \"" << inputFileName<br> << "\" as a byte-stream file source\n";<br> return FALSE;<br> }<br> // Finally, start playing ---------------------------------<br>
*m_Env << "Beginning streaming image...\n";<br> m_ImageSink->startPlaying(*m_ImageSource, afterPlaying, ImageSink);<br><br>}</div><div>_______________________________________________<br>live-devel mailing list<br>live-devel@lists.live555.com<br><a target="_blank" href="http://lists.live555.com/mailman/listinfo/live-devel">http://lists.live555.com/mailman/listinfo/live-devel</a><br></div></div><br></div></div><br>
                <hr size="1">
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur <a href="http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com">Yahoo! Questions/Réponses</a>.</body></html>