gecko/toolkit/components/mediasniffer/mp3sniff.h
Ralph Giles e77742990d Bug 862088 - Add raw mp3 sniffing.
Attempt to sniff raw mp3 with no id3 tag by looking for a header
followed by a second header at the expected offset from the packet
length.

Adds mp3 sniffing with and without id3 tags to the mediasniffer
xpcshell tests. These files are copies of files in content/media/test
truncated to 512 bytes. Our method can require up to 1.5k of data,
but these have 208/209 byte packets so sniffing still works.

notags-bad.mp3 has a corrupt header, and verifies sniffing fails.

Attempt to sniff raw mp3 with no id3 tag by looking for a header
followed by a second header at the expected offset from the packet
length.

Adds mp3 sniffing with and without id3 tags to the mediasniffer
xpcshell tests. These files are copies of files in content/media/test
truncated to 512 bytes. Our method can require up to 1.5k of data,
but these have 208/209 byte packets so sniffing still works.

notags-bad.mp3 has a corrupt header, and verifies sniffing fails.
2013-05-23 01:07:00 +08:00

16 lines
344 B
C

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
int mp3_sniff(const uint8_t *buf, long length);
#ifdef __cplusplus
}
#endif