[Live-devel] Query Related to GroupSock Library

Robert Clove cloverobert at gmail.com
Mon Feb 11 02:22:55 PST 2013


Hello All,

Sir as i am new to live 555 libraries i built your sample of
"testMPEG2TransportStreamer.cpp" which stream from the file and was able to
receive the stream.I saw that UDP packets are being streamed.
Then i went into your code :-

 Groupsock rtpGroupsock(*env, destinationAddress, rtpPort, ttl);
This function defined in GroupSock.cpp
*Groupsock::Groupsock(UsageEnvironment& env, struct in_addr const&
groupAddr,
             Port port, u_int8_t ttl)
  : OutputSocket(env, port),
    deleteIfNoMembers(False), isSlave(False),
    fIncomingGroupEId(groupAddr, port.num(), ttl), fDests(NULL), fTTL(ttl*)
{
  addDestination(groupAddr, port);

  if (!socketJoinGroup(env, socketNum(), groupAddr.s_addr)) {
    if (DebugLevel >= 1) {
      env << *this << ": failed to join group: "
      << env.getResultMsg() << "\n";
    }
  }

The *OutputSocket(env, port) function give call to function : Socket(env,
port),

*
*The socket function is defined like this:-
Socket::Socket(UsageEnvironment& env, Port port)
  : fEnv(DefaultUsageEnvironment != NULL ? *DefaultUsageEnvironment : env),
fPort(port) {

  fSocketNum = setupDatagramSocket(fEnv, port);//original
}


*
*so i changed the socket function like this:-
Socket::Socket(UsageEnvironment& env, Port port)
  : fEnv(DefaultUsageEnvironment != NULL ? *DefaultUsageEnvironment : env),
fPort(port) {
 fSocketNum = setupStreamSocket(fEnv, port);
  //fSocketNum = setupDatagramSocket(fEnv, port);//original
}

*
*To create TCP socket and recompile the library.Every thing works fine but
i didn't get the streaming?
*
*Can you explain why? and what to do to stream  TCP packets not UDP ?
*
*

Thanks
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130211/51b71674/attachment.html>


More information about the live-devel mailing list