ADTS header is typically used in stand alone aac,mpeg-ts file.(streaming scenario) ADIF is used mainly in MP4 file
adts file header starts with 12bits "sync work" which is always (111111111111) next 1 bits is ID - next 2 bits (always 0)
http://developer.longtailvideo.com/trac/browser/providers/adaptive/doc/adts.pdf?rev=1460 (provide the full header)
so your algo to detect would be -
- search for 12 bits sync work
- validate that next fields contain valid values