[Live-devel] General tips would be appreciated
Aleksandar Milenkovic
Aleksandar.Milenkovic at rt-rk.com
Mon Jan 23 06:01:18 PST 2012
After some more digging and looking through testApps (such as
testOndemandRTSPServer) i saw this
ServerMediaSession* sms = ServerMediaSession::createNew(*env,
streamName, streamName, descriptionString);
sms->addSubsession(H264VideoFileServerMediaSubsession::createNew(*env,
inputFileName, reuseFirstSource));
rtspServer->addServerMediaSession(sms);
So I figured that in order to stream anything, I need to pass it to
H264VideoFileServerMediaSubsession... then I looked into the
H264VideoFileServerMediaSubsession class to find that it references
ByteStreamFileSource... now, from previous message and looking thru docs
i realized that all I need to do is swap the ByteStreamFileSource with
ByteStreamMemoryBufferSource (since I don't have the file and the byte[]
containing video data is just sitting there waiting to be consumed)
So i should be able to write a
H264VideoMemoryBufferServerMediaSubsession that uses MemoryBuffer
instead of File and feed that to my ServerMediaSession and subsequently
rtspServer and it should work?
Alternatively (sorry for bad spelling btw) should I perhaps adapt
MPEG2TSFileSubsession to use the MemoryBufferSource since my byte[]
holds raw TS data? Thank you in advance for quick and precise answers.
Kind regards,
Aleksandar
P.S. I've read the FAQ last time, the part I think you were referring to
wasn't really referring to me :) esp the one about not reading the FAQ.
*Aleksandar Milenkovic*
Software Engineer
Phone: +381-(0)21-4801-139
Fax: +381-(0)21-450-721
Mobile: +381-(0)64-31-666-82
E-mail: Aleksandar.Milenkovic at rt-rk.com
<mailto:Aleksandar.Milenkovic at rt-rk.com>
RT-RK Computer Based Systems LLC
Fruskogorska 11
21000 Novi Sad, Serbia
www.rt-rk.com <http://www.rt-rk.com>
*RT-RK* invites you to visit us @ *IBC2011*, September 9-13 2011, stand
*5.A01*, Amsterdam RAI.
For more information please visit www.bbt.rs <http://www.bbt.rs/>
On 1/20/2012 6:05 PM, Aleksandar Milenkovic wrote:
> Hi all. I didn't really know how to name this, hope nobody minds....
>
> Anyway, i'm getting into live555 code. I compiled the whole thing as a
> library, ported the mediaServer to android and now comes the
> interesting part.
>
> A Java app sends a byte[] thru JNI to a C routine. The C part should
> have the mediaserver embedded into it, and in such a way that the
> mediaserver can be controlled just like a real object (i know this
> doesn't make sense yet, but it will). That means the server should
> behave like 'expected' upon calling the wrapper's Init(),
> Start/Stop(), Deinit()...
>
> So far I've got some slight understanding of the UsageEnvironment
> classes, but i'm having slight problems on how to break it up. I could
> use an explanation of what it does etc, a background story. So far,
> env->doEventLoop(shouldIQuit); will do the trick i hope.
>
> On top of that, i wanna use the passed-in byte[] for streaming, not
> files. I found this - ByteStreamMemoryBufferSource, so i'll try to
> dump the byte[] into that and feed that to the mediaServer;
>
> Basically, I'm not-so-politely asking how to break up the Media Server
> app into pieces; this approach sounds feasable but might be
> impractical or there might be better ways to accomplish this. That's
> why i'm asking you if you've got any tips for the new guy here :)
>
> I'd like to avoid reimplementing UsageEnvironments and TaskSchedulers
> if possible, and only delete/move the code around :)
>
> Kind regards,
> Aleksandar
> --
>
> *Aleksandar Milenkovic*
> Software Engineer
>
> Phone: +381-(0)21-4801-139
> Fax: +381-(0)21-450-721
> Mobile: +381-(0)64-31-666-82
> E-mail: Aleksandar.Milenkovic at rt-rk.com
> <mailto:Aleksandar.Milenkovic at rt-rk.com>
>
> RT-RK Computer Based Systems LLC
> Fruskogorska 11
> 21000 Novi Sad, Serbia
> www.rt-rk.com <http://www.rt-rk.com>
>
> *RT-RK* invites you to visit us @ *IBC2011*, September 9-13 2011,
> stand *5.A01*, Amsterdam RAI.
> For more information please visit www.bbt.rs <http://www.bbt.rs/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120123/aad51f43/attachment-0001.html>
More information about the live-devel
mailing list