C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 27th, 2003, 12:47 PM
pacopacopaco pacopacopaco is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 1 pacopacopaco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Can't send RTP data after accepting TCP connection

Hello, i'm a Telecomunication student with a question about using the Real Time Protocol implemented in Common Multimedia Library (URL).
First i'll try to explain our purpose on using this library.
We are sending video using several protocols. One of them is RTP. First, we create a TCP Stream to negotiate some parameters. After that, we want to use the TCP Client IP address to send it the video. The problem is where to write the code of the function "rtp_init". This one works but it's not useful for us:

....

session = rtp_init("192.168.0.99",8888,8888,16,64000,rtp_event_handle,NULL);

if ( (nsfd = accept (sfd, (struct sockaddr*)&cli_ad, &cli_ad_len) ) == -1 )
{
printf("Error en accept()\n");
exit(-1);
}
//CODE IMPLEMENTED TO SEND TCP INFORMATION



...

This one sends the video propertly, but we don't have the client address, we want the address given by TCP accept, so we could call rtp_init anywhere using a IP address provided by TCP. We would the code this way:

if ( (nsfd = accept (sfd, (struct sockaddr*)&cli_ad, &cli_ad_len) ) == -1 )
{
printf("Error en accept()\n");
exit(-1);
}
session = rtp_init(inet_ntoa(cli_ad.sin_addr),8888,8888,16,64000,rtp_event_handle,NULL);

The problem of this code is that session is fully filled but the video is not sent.The first implementation sends the video without any problem.

We would be grateful if you feedback this message.
Thanks.

PACO

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Can't send RTP data after accepting TCP connection

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap