[Live-devel] Parser/MP3 audio question

Brian Ciemian ciemian at comcast.net
Mon Jan 17 14:32:26 PST 2005


I have created a MP3 audio source that uses DirectX under the covers.

I am trying to use it with the RTSPServer example. So I have a
mediasubsession that does the following in its createNewStramSource
function.

FramedSource* source = MicMP3SoundSource::createNew(envir(),
m_pSoundDevice);

MPEG1or2AudioStreamFramer *framer =
MPEG1or2AudioStreamFramer::createNew(envir(), source, true);

return framer;

Here is my problem. I originally wrote my source to always be buffering some
mp3 data off the mic. In this mode everything seems to work ok. I later
changed my source to not bother buffering data until someone had called my
"FrameReady" function. Now I use this function in my Mp3 sound source
classes doGetNextFrame() function. So the first call to FrameReady always
returns false, after which it starts buffering data from the Microphone and
if there is data it will return true.

Now what i see is if the first call to my sound source doesn't grab data the
live.com library crashes down in StreamParser.   Since I never called my
"delieverFrame" I'm not sure what the framer is passing down to be parsed.

Any Ideas? Posted my stack below in case it might help.

Thanks Brian Ciemian

  VideoSource.dll!StreamParser::test4Bytes()  Line 54 + 0x24 C++
  VideoSource.dll!MPEG1or2AudioStreamParser::parse(unsigned int &
numTruncatedBytes=0)  Line 175 + 0x8 C++
  VideoSource.dll!MPEG1or2AudioStreamFramer::continueReadProcessing()  Line
125 + 0x12 C++
> VideoSource.dll!MPEG1or2AudioStreamFramer::doGetNextFrame()  Line 92 C++
  VideoSource.dll!FramedSource::getNextFrame(unsigned char * to=0x021ba908,
unsigned int maxSize=60696, void (void *, unsigned int, unsigned int,
timeval, unsigned int)* afterGettingFunc=0x1007411c, void *
afterGettingClientData=0x008ecee0, void (void *)* onCloseFunc=0x10074379,
void * onCloseClientData=0x008ecee0)  Line 78 + 0xd C++
  VideoSource.dll!MultiFramedRTPSink::packFrame()  Line 168 C++
  VideoSource.dll!MultiFramedRTPSink::afterGettingFrame1(unsigned int
frameSize=104, unsigned int numTruncatedBytes=0, timeval
presentationTime={...}, unsigned int durationInMicroseconds=26122)  Line 293
C++
  VideoSource.dll!MultiFramedRTPSink::afterGettingFrame(void *
clientData=0x008ecee0, unsigned int numBytesRead=104, unsigned int
numTruncatedBytes=0, timeval presentationTime={...}, unsigned int
durationInMicroseconds=26122)  Line 178 C++
  VideoSource.dll!FramedSource::afterGetting(FramedSource *
source=0x021b9028)  Line 118 + 0x2f C++
  VideoSource.dll!MPEG1or2AudioStreamFramer::continueReadProcessing()  Line
143 + 0x9 C++
  VideoSource.dll!MPEG1or2AudioStreamFramer::continueReadProcessing(void *
clientData=0x021b9028, unsigned char * __formal=0x02170068, unsigned char *
__formal=0x02170068, timeval presentationTime={...})  Line 122 C++
  VideoSource.dll!StreamParser::afterGettingBytes(void *
clientData=0x008ec1e8, unsigned int numBytesRead=3452816845, unsigned int
__formal=0, timeval presentationTime={...}, unsigned int __formal=0)  Line
117 + 0x1f C++
  VideoSource.dll!FramedSource::afterGetting(FramedSource *
source=0x021ba688)  Line 118 + 0x2f C++
  VideoSource.dll!AlarmHandler::handleTimeout()  Line 34 + 0xf C++
  VideoSource.dll!DelayQueue::handleAlarm()  Line 176 + 0xc C++
  VideoSource.dll!BasicTaskScheduler::SingleStep(unsigned int
maxDelayTime=0)  Line 98 C++
  VideoSource.dll!BasicTaskScheduler0::doEventLoop(char *
watchVariable=0x00000000)  Line 74 + 0xf C++




More information about the live-devel mailing list