[Live-devel] Is my way correct?

Dixon Siu dixonsiu at mediaglue.co.jp
Wed Jun 16 19:21:44 PDT 2004


Reza,

I am not sure if I am correct. I tried once using the normal test program to
send SimpleRTP source by unicast. I got no RTCP messaging at all. So the
program stream does not reach the receiver. Ross has said that the proper
way to implement unicasting is to use testOnDemandServer.

Another thing is that your destination address from the server is
192.168.2.11. But the sessionAddress from the client is 192.168.2.10. I
think that you have to set it to 192.168.2.11 or 0.0.0.0 (read this from the
code).

Not sure if I am correct. Hope that it helps.

By the way, I found that I can use FIFO in widows (CreateNamedPipe). I might
implement it in DeviceSource to avoid event signalling which kind of
affecting Live.com's main thread.

Regards,
Dixon

> -----Original Message-----
> From: live-devel-bounces at ns.live.com
> [mailto:live-devel-bounces at ns.live.com]On Behalf Of reza shah
> Sent: Wednesday, June 16, 2004 5:57 PM
> To: LIVE.COM Streaming Media - development & use
> Subject: [Live-devel] Is my way correct?
>
>
> Hi guys,
> I want to stream and receive speex data through RTP
> (withour RTSP)
> Assume we have two ips, 192.168.2.10 and 192.168.2.11
> both are listening
> to port 8000.
> I just want to make sure that my codes are ok, for
> sending and receiving
> data. I still have trouble when receiving data.
> Please if anyone has better way to send and receive
> directly with RTP.
>
> Here are my codes.
> 1. Server part send data to 192.168.2.11
>     -- need comments for this part
>     UsageEnvironment* mEnv;
>     TaskScheduler* mScheduler;
>
>     mScheduler = BasicTaskScheduler::createNew();
>     mEnv =
> BasicUsageEnvironment::createNew(*mScheduler);
>     const unsigned short rtpPortNum = 8000;
>     const unsigned short rtcpPortNum = rtpPortNum+1;
>     struct in_addr destinationAddress;
>     destinationAddress.s_addr =
> our_inet_addr("192.168.2.11");
>     const Port rtpPort(rtpPortNum);
>     const Port rtcpPort(rtcpPortNum);
>
>     audioRtpGroupsock = new Groupsock(*mEnv,
> destinationAddress,
> rtpPort, 255);
>     audioRtcpGroupsock = new Groupsock(*mEnv,
> destinationAddress,
> rtcpPort, 255);
>     audioRtcpInstance = RTCPInstance::createNew(*mEnv,
> audioRtcpGroupsock,
>                   160, CNAME,audioRtpSink,
> NULL,False);
>     audioRtpSink =
> SimpleRTPSink::createNew(*mEnv,audioRtpGroupsock,97,8000,"audio","
> speex",1,False,False);
>     --end need comment
>
>     then call audioRtpSink.
>
> 2. Client part receive data from 192.168.2.11
>     -- need comments for this part
>     UsageEnvironment* mEnv;
>     TaskScheduler* mScheduler;
>
>     unsigned short rtpPortNum = 8000;
>     unsigned short rtcpPortNum = rtpPortNum +1;
>
>     struct in_addr sessionAddress;
>     sessionAddress.s_addr =
> our_inet_addr("192.168.2.10");
>
>     audioRtpSocket=new Groupsock(*env, sessionAddress,
> rtpPortNum, ttl);
>     audioRtcpSocket=new Groupsock(*env,
> sessionAddress, rtcpPortNum, ttl);
>
> audioSource=audioRTPSource=SimpleRTPSource::createNew(*env,audioRt
> pSocket,97,8000,"audio/speex",0,false);
>     audioRtcpInstance = RTCPInstance::createNew(*env,
> audioRtcpSocket,
>             500, CNAME,NULL , audioRTPSource);
>     --end need comments
>     then call filesink method to write data to file.
>
>
> Best Regards,
> Reza
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live.com
> http://lists.live.com/mailman/listinfo/live-devel
>
>
> __________ NOD32 1.789 (20040614) Information __________
>
> This message was checked by NOD32 Antivirus System.
> http://www.nod32.com
>
>



More information about the live-devel mailing list