[Live-devel] RTP over TCP with iPhone
Dmitrij Velkin
d.velkin at ids-imaging.de
Wed Jun 29 07:23:44 PDT 2011
Hi Ross,
I followed your advice and start to implement with openRTSP. I need data in buffer and not in file and so i wrote little class to subclass MediaSink:
class MyMediaSink:public MediaSink
{
public:
MyMediaSink(UsageEnvironment &env):MediaSink(env){buffer = new uint8_t();}
virtual ~MyMediaSink(){}
protected:
Boolean continuePlaying(){/*CODE will come soon*/ return true;}
private:
uint8_t *buffer;
};
After that I invoke my Class in setupStreams()-funktion:
void setupStreams()
{
static MediaSubsessionIterator* setupIter = NULL;
if (setupIter == NULL) setupIter = new MediaSubsessionIterator(*session);
while ((subsession = setupIter->next()) != NULL)
{
// We have another subsession left to set up:
if (subsession->clientPortNum() == 0) continue; // port # was not set
setupSubsession(subsession, streamUsingTCP, continueAfterSETUP);
//---------------------
MyMediaSink *ms = new MyMediaSink(*env);
ms->startPlaying(*(subsession->readSource()), subsessionAfterPlaying, subsession);
//---------------------
return;
}
.
.
.
.
}
I know there are leaks and the implementation of MyMediaSink is not complete, but I can see that I have the same Problem as with my App.
Thank you in advance!
Dmitrij
Am 16.06.2011 um 16:27 schrieb Ross Finlayson:
>> > You already know that "openRTSP -t" - built from the supplied, unmodified source code - works OK on your system.
>> I have to correct my statement. Sorry!
>>
>> I get only first image with:
>>
>> ./openRTSP -t -F ______Video rtsp://193.158.57.66:8555/mjpeg
>
> You probably got a very large video file, which contains all JPEG frames, in sequence. A viewer application will likely show only the first JPEG frame - but you probably got all of them.
>
> You should also have gotten a MPEG audio file, which you should be able to play.
>
>
>> If I wont to write .avi, I find nothing in testProgs directory
>
>
> That's because the "-i" option outputs an AVI-format file to stdout. You'll need to redirect it to a file, i.e.
> ./openRTSP -i -t > test.avi
> But, I would not have high expectations about being able to play the resulting file. The "-i" option (AVI file writing) is very unreliable.
>
> In any case, if you get two large files - audio and video - when you run "openRTSP -t", then it's working OK.
> --
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20110629/aad74a7c/attachment-0001.html>
More information about the live-devel
mailing list