[Live-devel] SOCKLEN_T type / AC3AudioStreamParser try-catch / AC3 stream header
Markus Schumann
markuss at sonicfoundry.com
Tue Mar 19 09:47:52 PDT 2013
1.)
I compiled and ran live555 on Raspberry Pi but I changed the type of SOCKLEN_T:
Groupsock/include/NetCommon.h
#if defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_WCE)
#ifndef SOCKLEN_T
#define SOCKLEN_T int
#endif
#else
/* Unix */
#ifndef SOCKLEN_T
#define SOCKLEN_T unsigned int
#endif
#endif
Int works fine on windows but it's unsigned int on the PI.
2.)
I noticed a try/catch block in liveMedia\AC3AudioStreamFramer.cpp is this intentional?
3.)
Since my compiler stumbled over try/catch (exceptions turned off) I came across (liveMedia/AC3AudioStreamFramer.cpp)
// We expect an AC3 audio header (first 2 bytes == 0x0B77) at the start:
while (1) {
unsigned next4Bytes = test4Bytes();
if (next4Bytes>>16 == 0x0B77) break;
skipBytes(1);
saveParserState();
}
AC3 streams are WORD oriented and both endianness' are possible.
So your sync WORD can be 0x0b77 or 0x770b.
Depending on your host endianness you may have to swap the odd with the even bytes.
Markus.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130319/4d8c6eb0/attachment.html>
More information about the live-devel
mailing list