[Live-devel] MP3FileSource
Ross Finlayson
finlayson at live555.com
Wed Jul 15 05:16:12 PDT 2009
>My application creates a FramedSource from an MPEG-1, Layer 3 (.mp3)
>audio file and feeds it to an input of MPEG2TransportStreamFromESSource
>like this:
>
>>ByteStreamFileSource* audioFileSource =
>> ByteStreamFileSource::createNew(*env, filename);
>>FramedSource* audioES = audioFileSource;
>>
>>MPEG1or2AudioStreamFramer* inputSource =
>> MPEG1or2AudioStreamFramer::createNew(*env, audioES, False);
>>
>>MPEG2TransportStreamFromESSource* newTransportStream =
>> MPEG2TransportStreamFromESSource::createNew(*env);
>>
>>newTransportStream->addNewAudioSource(inputSource, 1);
>
>
>I just discovered the MP3FileSource object. Should I be using that instead?
"MP3FileSource" is a specialized source class for MPEG-1 or 2 audio,
that includes it's own 'framer'.
If you wish, you could use "MP3FileSource" instead of
"ByteStreamFileSource"+"MPEG1or2AudioStreamFramer".
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list