Question

I am completely new to MP3 streaming and starting a project with live555 library. I've been able to compile the library with VS 2010 and tried out the example testMP3Streamer. I can listen to the stream using VLC, and can receive it with the other test program testMP3Receiver.

I am now trying to incorporate a decoder in the live555 MP3 receiver (and eventually an audio player), but can't figure out where to start. I downloaded the libmad decoder, but am not sure how to incorporate it into live555.

I am looking for tips or examples on how to do this

Any help would be greatly appreciated.

No correct solution

OTHER TIPS

A starting point could be to remplace the FileSink of testMP3Receiver.cpp with the DummySink from testRTSPClient.cpp.

Doing this, you will get data implementing the method

void DummySink::afterGettingFrame(unsigned frameSize, unsigned numTruncatedBytes,
struct timeval presentationTime, unsigned durationInMicroseconds);

I have been using extensively live555 this year , starting from scratch.

I truly think that one of the best place to read some working code for several types of stream (video , Audio ) and several encoders is in the test programs folder that you can find here

Then it is really easy when you start understanding how this library works.

Typically , if you want to insert a decoder you are on a client. You must know that all the data received (actual data , not the RTSP commands) ends up in the "sink"

You can then subclass this sink (several example are presents in the link that i gave you) and implement your decoder here.

Take a look at the video decoders example in testRTSPClient for example , i know it is for video but it is some self explaining code , you should have a good starting point there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top