[Live-devel] Matroska BANK_SIZE overflow
PROMONET Michel
michel.promonet at thalesgroup.com
Tue Nov 5 05:36:06 PST 2013
Hi Ross,
Surely I badly use the matroska parser...
What I was trying to do is to connect each matroska subsession to a sink. In fact I don't need ServerMediaSession, it is just to get the FramedSource corresponding to a subsession.
The following code seem to works with some mkv but produce an overflow of BANK_SIZE with the file I send previously
#include "liveMedia.hh"
#include "BasicUsageEnvironment.hh"
static char newMatroskaDemuxWatchVariable;
static MatroskaFileServerDemux* demux;
static void onMatroskaDemuxCreation(MatroskaFileServerDemux* newDemux, void* /*clientData*/) {
demux = newDemux;
newMatroskaDemuxWatchVariable = 1;
}
int main(int argc, char** argv) {
TaskScheduler* scheduler = BasicTaskScheduler::createNew();
UsageEnvironment* env = BasicUsageEnvironment::createNew(*scheduler);
// A Matroska ('.mkv') file, with video+audio+subtitle streams:
{
char const* inputFileName = "test.mkv";
ServerMediaSession* sms = ServerMediaSession::createNew(*env, inputFileName, inputFileName,inputFileName);
newMatroskaDemuxWatchVariable = 0;
MatroskaFileServerDemux::createNew(*env, inputFileName, onMatroskaDemuxCreation, NULL);
env->taskScheduler().doEventLoop(&newMatroskaDemuxWatchVariable);
ServerMediaSubsession* smss = NULL;
unsigned fileSinkBufferSize = 100000;
while ((smss = demux->newServerMediaSubsession()) != NULL) {
sms->addSubsession(smss);
MediaSource* source = demux->newDemuxedTrack(0,smss->trackNumber());
MediaSink* sink = FileSink::createNew(*env, smss->trackId(),fileSinkBufferSize, False);
sink->startPlaying(*source,NULL,NULL);
}
}
env->taskScheduler().doEventLoop();
return 0;
}
Thanks for your help.
Michel.
[@@ THALES GROUP INTERNAL @@]
De : live-devel-bounces at ns.live555.com [mailto:live-devel-bounces at ns.live555.com] De la part de Ross Finlayson
Envoyé : lundi 4 novembre 2013 18:26
À : LIVE555 Streaming Media - development & use
Objet : Re: [Live-devel] Matroska BANK_SIZE overflow
Adding a missing word to my previous answer:
How are you parsing/demultiplexing this Matroska file? Are you using your own application (that presumably uses the API in "liveMedia/include/MatroskaFile.hh")? If so, then please [provide] the code for a simple application (as simple as you can make it) that reproduces this problem when parsing/demultiplexing this Matroska file.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20131105/133fb053/attachment.html>
More information about the live-devel
mailing list