Ross,
Thanks for your initial answer!
I am still trying to save an incoming RTP AVC/AAC stream inside a MPEG-2
transport stream.
I followed the flow of your testRTSPClient.cpp example which worked perfectly
for my first application.
I created a MPEG2TransportStreamFromESSource, FileSink and MediaSession.
pRTSPClient->m_pMPEG2TransportStreamFromESSource =
MPEG2TransportStreamFromESSource::createNew(env);
pRTSPClient->m_pFileSink =
FileSink::createNew(env,pRTSPClient->m_sOutputFilename.c_str());
scs.m_pMediaSession = MediaSession::createNew(env, sdpDescription);
For each MediaSubsession
I am always getting AVC/AAC - hence 5 & 4 as MPEG type
for each sub session I do:
if( strcmp(scs.m_pMediaSubsession->mediumName(),"video") == 0)
{
pRTSPClient->m_pMPEG2TransportStreamFromESSource->addNewVideoSource(scs.m_pMediaSubsession->readSource(),5);
}
if( strcmp(scs.m_pMediaSubsession->mediumName(),"audio") == 0)
{
pRTSPClient->m_pMPEG2TransportStreamFromESSource->addNewAudioSource(scs.m_pMediaSubsession->readSource(),4);
}
else
{
// error
}
Do I set scs.m_pMediaSubsession->sink?
Do I call scs.m_pMediaSubsession->sink->startPlaying(
*(scs.m_pMediaSubsession->readSource()),
RecordingSubsessionAfterPlaying,
scs.m_pMediaSubsession);
How Do I feed a MPEG2TransportStreamFromESSource into the file sink?
I only found pRTSPClient->m_pFileSink->startPlaying(
*pRTSPClient->m_pMPEG2TransportStreamFromESSource,
NULL,
NULL);
Thanks
Markus
From: [email protected]
[mailto:[email protected]] On Behalf Of Ross Finlayson
Sent: Saturday, April 13, 2013 2:08 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] saving or rebroadcasting incoming RTP A/V stream as
MPEG-2 transport stream
I saw various source files (e.g. MPEG2TransportStreamMultiplexor.cpp) muxing
into MPEG-2 TS.
Is there a way a save and/or rebroadcast incoming RTP streams as MPEG-2 TS with
the given code.
Yes, provided, of course, that the codec(s) used by the incoming RTP stream(s)
are ones that can be carried within MPEG Transport Streams.
You can do this by creating a "MPEG2TransportStreamFromESSource" object. Then,
on this object, call "addNewVideoSource()" and/or "addNewAudioSource()", from
the corresponding "MediaSubsession::readSource()". You can then feed the
"MPEG2TransportStreamFromESSource" object into a "FileSink".
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel