diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-18 02:08:39 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-18 02:08:39 -0400 |
commit | 0f7b0f690028ba7e2f327377124ad7f6f8bfea3b (patch) | |
tree | 7cb9640624e3dc8f08169344116dff6a99aa0fdd | |
parent | b913c9ba83f0d00c812721c174dd52ef7143e029 (diff) | |
download | uxp-0f7b0f690028ba7e2f327377124ad7f6f8bfea3b.tar.gz |
Issue #80 - De-unify dom/media/flac
-rw-r--r-- | dom/media/flac/FlacDemuxer.cpp | 8 | ||||
-rw-r--r-- | dom/media/flac/FlacDemuxer.h | 9 | ||||
-rw-r--r-- | dom/media/flac/FlacFrameParser.cpp | 1 | ||||
-rw-r--r-- | dom/media/flac/moz.build | 2 |
4 files changed, 11 insertions, 9 deletions
diff --git a/dom/media/flac/FlacDemuxer.cpp b/dom/media/flac/FlacDemuxer.cpp index 7a98edbee6..6df09cc256 100644 --- a/dom/media/flac/FlacDemuxer.cpp +++ b/dom/media/flac/FlacDemuxer.cpp @@ -33,14 +33,6 @@ namespace flac { // flac::FrameHeader - Holds the flac frame header and its parsing // state. -#define FLAC_MAX_CHANNELS 8 -#define FLAC_MIN_BLOCKSIZE 16 -#define FLAC_MAX_BLOCKSIZE 65535 -#define FLAC_MIN_FRAME_SIZE 11 -#define FLAC_MAX_FRAME_HEADER_SIZE 16 -#define FLAC_MAX_FRAME_SIZE (FLAC_MAX_FRAME_HEADER_SIZE \ - +FLAC_MAX_BLOCKSIZE*FLAC_MAX_CHANNELS*3) - class FrameHeader { public: const AudioInfo& Info() const { return mInfo; } diff --git a/dom/media/flac/FlacDemuxer.h b/dom/media/flac/FlacDemuxer.h index fd0e35c94e..248ae861f8 100644 --- a/dom/media/flac/FlacDemuxer.h +++ b/dom/media/flac/FlacDemuxer.h @@ -13,6 +13,15 @@ namespace mozilla { namespace flac { + +#define FLAC_MAX_CHANNELS 8 +#define FLAC_MIN_BLOCKSIZE 16 +#define FLAC_MAX_BLOCKSIZE 65535 +#define FLAC_MIN_FRAME_SIZE 11 +#define FLAC_MAX_FRAME_HEADER_SIZE 16 +#define FLAC_MAX_FRAME_SIZE (FLAC_MAX_FRAME_HEADER_SIZE \ + +FLAC_MAX_BLOCKSIZE*FLAC_MAX_CHANNELS*3) + class Frame; class FrameParser; } diff --git a/dom/media/flac/FlacFrameParser.cpp b/dom/media/flac/FlacFrameParser.cpp index f2d6c1367e..c31161cbc0 100644 --- a/dom/media/flac/FlacFrameParser.cpp +++ b/dom/media/flac/FlacFrameParser.cpp @@ -7,6 +7,7 @@ #include "FlacFrameParser.h" #include "mp4_demuxer/ByteReader.h" #include "nsTArray.h" +#include "FlacDemuxer.h" #include "OggCodecState.h" #include "OpusParser.h" #include "VideoUtils.h" diff --git a/dom/media/flac/moz.build b/dom/media/flac/moz.build index 6933ded1f9..86427e0dd9 100644 --- a/dom/media/flac/moz.build +++ b/dom/media/flac/moz.build @@ -10,7 +10,7 @@ EXPORTS += [ 'FlacFrameParser.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'FlacDecoder.cpp', 'FlacDemuxer.cpp', 'FlacFrameParser.cpp', |