<br>Hi,<br>I'm facing this problem, the app which get webcam screenshot and encode them in h263 works and feed live with an UDP socket (addr 127.0.0.1 port 1234). I don't know why the bytestream seems not arriving to the live server..<br>
<div class="gmail_quote">
Could anyone help me or give any hints?<br>I report my server code below<br><br>#include "liveMedia.hh"<br>#include "BasicUsageEnvironment.hh"<br>#include "GroupsockHelper.hh"<br><br>FramedSource* videoSource;<br>
<br>void afterPlaying(void*);<br><br>int main()<br>{<br> TaskScheduler* scheduler = BasicTaskScheduler::createNew();<br> UsageEnvironment*env = BasicUsageEnvironment::createNew(*scheduler);<br><br> //Create our sink variables...<br>
char const* destinationAddrStr = "192.168.55.102";<br> const unsigned char ttl = 1;<br> const Port rtpPort(8888);<br> struct in_addr destinationAddress;<br> destinationAddress.s_addr = our_inet_addr(destinationAddrStr);<br>
Groupsock rtpGroupsock(*env, destinationAddress, rtpPort, ttl);<br> <br> //Create our sink...<br> //RTPSink* videoSink = MPEG1or2VideoRTPSink::createNew(*env, &rtpGroupsock);<br> RTPSink* videoSink = H263plusVideoRTPSink::createNew(*env,&rtpGroupsock,56,0);<br>
if(videoSink == NULL){<br> *env << "Unable to create sink \n";<br> exit(1);<br> }<br> *env<<"RTPSink created\n";<br> //Create our source variables...<br>
char const* srcAddrStr = "127.0.0.1";<br> struct in_addr srcAddress;<br> srcAddress.s_addr = our_inet_addr(srcAddrStr);<br> const Port udpPort(1234);<br> Groupsock udpGroupsock(*env, srcAddress, udpPort, ttl);<br>
<br> //Create our source...<br> FramedSource* input = BasicUDPSource::createNew(*env, &udpGroupsock);<br> if (input == NULL) {<br> *env << "Unable to open source \n";<br>
exit(1);<br> }<br> *env<<"Input created\n";<br><br> //Create our framer...<br> videoSource = H263plusVideoStreamFramer::createNew(*env,input);<br><br> *env<<"framer created\n";<br>
//Start to stream the data....<br> videoSink->startPlaying(*videoSource, afterPlaying, NULL);<br> env->taskScheduler().doEventLoop();<br> *env<<"END";<br> return 0;<br>}<br>
<br>void afterPlaying(void*) {<br> Medium::close(videoSource);<br>}<br><br>Thanks a lot for the kind help!<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Thu, Jul 30, 2009 at 7:41 PM, Ross Finlayson <span dir="ltr"><<a href="mailto:finlayson@live555.com" target="_blank">finlayson@live555.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I've an application which gets images from a webcam, then live encode them. I need to live stream this to a mobile device via a live555server. How can i manage this input stream (based on socket comm between the two apps) in live555?could BasicUDPSource the class which reads from the buffer?<br>
</blockquote>
<br></div>
It could, if your input is UDP packets. However, it'd be far better to have your input source be just an unstructured byte stream (i.e., a device file, a pipe, or a TCP connection). Then you could use "H263plusVideoStreamFramer".<div>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
May I use H263plusVideoStreamFramer as framer for the H263 stream??<br>
</blockquote>
<br></div>
If (and only if) your input is a byte stream. If, instead, it's a sequence of discrete frames, then you would need a new class "H263plusVideoStreamDiscreteFramer" (which you would need to write) instead.<br>
-- <br><font color="#888888">
<br>
Ross Finlayson<br>
Live Networks, Inc.<br>
<a href="http://www.live555.com/" target="_blank">http://www.live555.com/</a><br>
_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com" target="_blank">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
</font></blockquote></div><br>
</div></div></div><br>