I appreciate the quick response. I am still having problems though. I made the 
change and I am not getting errors. I have tried with multiple mpeg 2 files. 
Here is the command-line output:

.......
4700441B, but we're not a fragment
Warning: MPEG1or2VideoRTPSink::doSpecialFrameHandling saw strange first 4 bytes
47404412, but we're not a fragment
Warning: MPEG1or2VideoRTPSink::doSpecialFrameHandling saw strange first 4 bytes
47004419, but we're not a fragment



I do not get any video output except for an initial frame. This is the code:

#include "liveMedia.hh"
#include "BasicUsageEnvironment.hh"
#include "GroupsockHelper.hh"

FramedSource* videoSource;

void afterPlaying(void*);

int main()
{
        TaskScheduler* scheduler = BasicTaskScheduler::createNew();
        UsageEnvironment*env = BasicUsageEnvironment::createNew(*scheduler);

        //Create our sink variables...
        char const* destinationAddrStr = "147.159.167.150";
        const unsigned char ttl = 1;
        const Port rtpPort(8888);
        struct in_addr destinationAddress;
        destinationAddress.s_addr = our_inet_addr(destinationAddrStr);
        Groupsock rtpGroupsock(*env, destinationAddress, rtpPort, ttl);
        
        //Create our sink...
        RTPSink* videoSink = MPEG1or2VideoRTPSink::createNew(*env, 
&rtpGroupsock);
        if(videoSink == NULL){
                *env << "Unable to create sink \n";
                exit(1);
        }

        //Create our source variables...
        char const* srcAddrStr = "10.0.0.10";
        struct in_addr srcAddress;
        srcAddress.s_addr = our_inet_addr(srcAddrStr);
        const Port udpPort(1234);
        Groupsock udpGroupsock(*env, srcAddress, udpPort, ttl);
        
        //Create our source...
        FramedSource* input = BasicUDPSource::createNew(*env, &udpGroupsock);
        if (input == NULL) {
                *env << "Unable to open source \n";
                exit(1);
        }

        //Create our framer...
        //videoSource = MPEG1or2VideoStreamFramer::createNew(*env, input);
        videoSource = MPEG1or2VideoStreamDiscreteFramer::createNew(*env, input);


        //Start to stream the data....
        videoSink->startPlaying(*videoSource, afterPlaying, NULL);
        env->taskScheduler().doEventLoop();

        return 0;
}

void afterPlaying(void*) {
  Medium::close(videoSource);
}


-Andrew

P.S. I ment to say UDP not UTP in subject heading :- )

--- On Thu, 7/30/09, Ross Finlayson <finlay...@live555.com> wrote:

> From: Ross Finlayson <finlay...@live555.com>
> Subject: Re: [Live-devel] UTP to RTP
> To: "LIVE555 Streaming Media - development & use" <live-de...@ns.live555.com>
> Date: Thursday, July 30, 2009, 11:02 AM
> > I am trying to configure an app
> to take a UDP source and stream it via RTP. However, I
> cannot get it to work. When I trace through the code, I find
> that on line 155 of MPEGVideoStreamFramer.cpp,
> aquiredFrameSize is never greater than 0.
> 
> Because your input source is a sequence of discrete frames,
> rather than a byte stream, you should use
> "MPEG1or2VideoStreamDiscreteFramer", instead of
> "MPEG1or2VideoStreamFramer".
> -- 
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
> _______________________________________________
> live-devel mailing list
> live-devel@lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
> 


      
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to