我对MP3流媒体全新,并使用live555库启动项目。我已经能够使用VS 2010编译库并尝试了示例testMP3Streamer。我可以使用VLC监听流,并可以使用其他测试程序testMP3Receiver接收它。
我现在正试图在live555 MP3接收器(最终是一个音频播放器)中加入一个解码器,但无法弄清楚从哪里开始。我下载了libmad解码器,但不知道如何将它合并到live555中。
我正在寻找有关如何执行此操作的提示或示例
非常感谢任何帮助。
答案 0 :(得分:0)
一个起点可能是使用testRTSPClient.cpp中的DummySink重新安装testMP3Receiver.cpp的FileSink。
这样做,您将获得实现方法的数据
void DummySink::afterGettingFrame(unsigned frameSize, unsigned numTruncatedBytes,
struct timeval presentationTime, unsigned durationInMicroseconds);
答案 1 :(得分:0)
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.