Bartlomiej Wolowiec wrote:
2008/3/26, Michael Niedermayer <michaelni@gmx.at>:
I do not like generic code full of If(codecA) else
The sync function should return if it has a complete frame or if (maybe) not. That is
flags= FRAME_START | FRAME_END;
You do this in stream_type but this name is totally wrong this is not a stream_type. It is not even constant for a stream. NEVER even think of using a name from the a52* spec, the people who wrote it are idiots. Its a flag indicating the start/end of a frame. And IMHO it should be returned more directly than as a context variable but thats rather minor the name is a major issue. It totally confused me until looked it up in the spec.
Code should be understandable without looking things up in the specs.
Also the "stream_type" has the wrong type (should be enum) and the types used in AAC-AC3 code must be generic types not *AC3 specific types in headers which arent #included.
Ok, what do you think about such a plan:
Also keep in mind (in case you are not already aware) that a normal AC3 frame can be followed by a dependent E-AC3 frame, usually containing the 7th and 8th channels of a 7.1 stream. This is supposedly the only way to carry a Dolby Digital 7.1 stream on Blu-ray. I have not found any samples though. -Justin