Bug 1039639 - Add support for Flac on Firefox OS. r=cajbir

This commit is contained in:
Jim Porter 2014-12-02 16:37:00 -05:00
parent 83cac55b46
commit cb2b55eec5
7 changed files with 6 additions and 1 deletions

View File

@ -221,6 +221,7 @@ static const char* const gOmxTypes[] = {
"audio/mp4",
"audio/amr",
"audio/3gpp",
"audio/flac",
"video/mp4",
"video/3gpp",
"video/3gpp2",

View File

@ -9,6 +9,7 @@ var gSmallTests = [
{ name:"small-shot.m4a", type:"audio/mp4", duration:0.29 },
{ name:"small-shot.mp3", type:"audio/mpeg", duration:0.27 },
{ name:"small-shot-mp3.mp4", type:"audio/mp4; codecs=mp3", duration:0.34 },
{ name:"small-shot.flac", type:"audio/flac", duration:0.197 },
{ name:"r11025_s16_c1.wav", type:"audio/x-wav", duration:1.0 },
{ name:"320x240.ogv", type:"video/ogg", width:320, height:240, duration:0.266 },
{ name:"seek.webm", type:"video/webm", width:320, height:240, duration:3.966 },

View File

@ -247,6 +247,7 @@ support-files =
small-shot.mp3^headers^
small-shot.ogg
small-shot.ogg^headers^
small-shot.flac
sound.ogg
sound.ogg^headers^
spacestorm-1000Hz-100ms.ogg

Binary file not shown.

View File

@ -79,6 +79,7 @@
#define AUDIO_MP3 "audio/mpeg"
#define AUDIO_MP4 "audio/mp4"
#define AUDIO_AMR "audio/amr"
#define AUDIO_FLAC "audio/flac"
#define AUDIO_3GPP "audio/3gpp"
#define AUDIO_MIDI "audio/x-midi"
#define AUDIO_MATROSKA "audio/x-matroska"

View File

@ -1,4 +1,4 @@
# Extensions we recognize for DeviceStorage storage areas
pictures=*.jpe; *.jpg; *.jpeg; *.gif; *.png; *.bmp;
music=*.mp3; *.oga; *.ogg; *.m4a; *.m4b; *.m4p; *.m4r; *.3gp; *.3gpp; *.mp4; *.m3u; *.pls; *.opus; *.amr; *.wav; *.lcka; *.mka;
music=*.mp3; *.oga; *.ogg; *.m4a; *.m4b; *.m4p; *.m4r; *.3gp; *.3gpp; *.mp4; *.m3u; *.pls; *.opus; *.amr; *.wav; *.lcka; *.mka; *.flac;
videos=*.mp4; *.mpeg; *.mpg; *.ogv; *.ogx; *.webm; *.3gp; *.3gpp; *.3g2; *.ogg; *.m4v; *.ts; *.m2ts; *.avi; *.divx; *.mkv;

View File

@ -542,6 +542,7 @@ static nsExtraMimeTypeEntry extraMimeEntries [] =
{ AUDIO_OGG, "opus", "Opus Audio" },
#ifdef MOZ_WIDGET_GONK
{ AUDIO_AMR, "amr", "Adaptive Multi-Rate Audio" },
{ AUDIO_FLAC, "flac", "FLAC Audio" },
{ VIDEO_AVI, "avi", "Audio Video Interleave" },
{ VIDEO_AVI, "divx", "Audio Video Interleave" },
{ VIDEO_MPEG_TS, "ts", "MPEG Transport Stream" },