Граф коммитов

57 Коммитов

Автор SHA1 Сообщение Дата
Paul Adenot 77a8f8a6a1 Bug 1726534 - Add a way to sniff for mp3 in a RIFF container. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D124073
2021-09-01 10:03:26 +00:00
Paul Adenot 996a61af4d Bug 1727361 - Don't sniff for a FLAC stream, it's not deterministic enough and no spec exist. r=bryce
Besides, live streaming in FLAC is (always?) done in OGG container.

Differential Revision: https://phabricator.services.mozilla.com/D123639
2021-08-26 11:13:05 +00:00
Paul Adenot f65a933ba6 Bug 1704115 - Always sniff to determine the MIME type when attempting to play a media file. r=necko-reviewers,valentin
https://bugzilla.mozilla.org/show_bug.cgi?id=1704115#c9 and followings is a
discussion on the behaviour to adopt here.

Differential Revision: https://phabricator.services.mozilla.com/D112787
2021-08-09 10:25:56 +00:00
Petr Sumbera 21b83a1eae Bug 1701154 - Add missing #include for MakeScopeExit. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D109873
2021-04-06 07:33:03 +00:00
Tom Tung 053afd2976 Bug 1696111 - ORB core Implementation; r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D102448
2021-03-30 00:52:30 +00:00
Butkovits Atila ad9b1ed9d7 Backed out 12 changesets (bug 1683131, bug 1696111, bug 1695987) for causing crashes(Bug 1701151). a=backout
Backed out changeset 8ffef57e27d2 (bug 1683131)
Backed out changeset c02d5dc72abb (bug 1695987)
Backed out changeset 276f016ddc67 (bug 1683131)
Backed out changeset 2c7a45e20b50 (bug 1683131)
Backed out changeset 11fdb503d537 (bug 1696111)
Backed out changeset 2946eff1e9c8 (bug 1696111)
Backed out changeset e4d01b88e517 (bug 1696111)
Backed out changeset fab7f4cd445d (bug 1696111)
Backed out changeset d60c38f8939a (bug 1696111)
Backed out changeset 3fdc8089a46f (bug 1696111)
Backed out changeset 51a16dfabc98 (bug 1696111)
Backed out changeset 642bdd52fd57 (bug 1696111)
2021-03-26 11:30:28 +02:00
Tom Tung 1ff4caafd7 Bug 1696111 - ORB core Implementation; r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D102448
2021-03-25 12:09:39 +00:00
Jon Bauman 5f16fbcc7b Bug 1656099 - AVIF (AV1 Image File Format): sniff MIME type from content. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D85503
2020-08-01 02:15:17 +00:00
Paul Adenot b01a0b8363 Bug 1550248 - Sniff .m3u8 files as application/vnd.apple.mpegurl. r=jya
Depends on D85144

Differential Revision: https://phabricator.services.mozilla.com/D85286
2020-07-31 01:04:08 +00:00
Jean-Yves Avenard a326699756 Bug 1617362 - Sniff for ADTS content before flac. r=bryce
The flac decoder can produce false negative quite easily.

Differential Revision: https://phabricator.services.mozilla.com/D64281

--HG--
extra : moz-landing-system : lando
2020-02-26 17:34:03 +00:00
Sebastian Streich ac5daf49e7 Bug 1594766: Respect Nosniff header for empty content-types r=ckerschb
Backed out changeset 35436d4e7917

Differential Revision: https://phabricator.services.mozilla.com/D60156

--HG--
extra : moz-landing-system : lando
2020-02-12 16:20:46 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55444

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Sebastian Streich 0ccaa6de78 Bug 1591932 - Enable Sniffing on No Mime+ XCTO nosniff r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D50816

--HG--
extra : moz-landing-system : lando
2019-11-13 12:12:34 +00:00
Sebastian Streich 6658520ea2 Bug 1571742 - Move Nosniff-Check into Sniffers r=ckerschb,dragana
Differential Revision: https://phabricator.services.mozilla.com/D41504

--HG--
extra : moz-landing-system : lando
2019-08-14 13:59:06 +00:00
Jean-Yves Avenard 95f16e4170 Bug 1552194 - Consider ftyp 3gp4 as being mp4. r=padenot
3gp4 is based on mp4. Should the codecs not be supported we will simply error later.

Differential Revision: https://phabricator.services.mozilla.com/D31919

--HG--
extra : moz-landing-system : lando
2019-05-21 11:30:37 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jean-Yves Avenard 321df64731 Bug 1357484: [mp4] Add m4v major type support. r=jolin
MozReview-Commit-ID: LEJvov1ZfVA

--HG--
extra : rebase_source : 4f6137dfe73df8e8da65297be2bba0a4dbfafe9f
2017-04-25 12:52:56 +02:00
Jean-Yves Avenard fca0f47212 Bug 1355933: P6. Hook up ADTS sniffer. r=kamidphish
MozReview-Commit-ID: 3aYmCRRbRzg

--HG--
extra : rebase_source : bec12e1f81e90a4bc1ddbb46c57f81c2a968a9ca
2017-04-13 02:40:35 +02:00
Jean-Yves Avenard 73db8daa39 Bug 1355933: P5. Fix coding style. r=gerald
MozReview-Commit-ID: JcwOH7FkyMU

--HG--
extra : rebase_source : 8100a0115d75c6be8c89b3a10a8f31a06431a4a9
2017-04-13 00:40:01 +02:00
Jean-Yves Avenard 07e2fafa73 Bug 1195723: [flac] P12. Add sniffer for streaming flac. r=kamidphish
MozReview-Commit-ID: P62v6vsXzs

--HG--
extra : rebase_source : aec72ae19890e3c21f4557c4899cf1697e7e94cc
2016-08-18 13:07:11 +10:00
Jean-Yves Avenard ca3c25edb9 Bug 1195723: [flac] P10. Add media sniffer for flac file. r=kamidphish
This only supports flac with a STREAMINFO header.

MozReview-Commit-ID: FaT9N6xJDPY

--HG--
extra : rebase_source : ba4e1f78f3a3ca9b4062edfc84445d444c323d80
2016-08-17 15:47:39 +10:00
Wes Kocher 24cb21d4f6 Backed out 15 changesets (bug 1195723) for various media test failures/unexpected-passes a=backout
Backed out changeset 2a3b10281c9c (bug 1195723)
Backed out changeset c3775a6225d8 (bug 1195723)
Backed out changeset ba0aeb71c672 (bug 1195723)
Backed out changeset 894061e6037e (bug 1195723)
Backed out changeset 4637f8be98bb (bug 1195723)
Backed out changeset c2664064fa55 (bug 1195723)
Backed out changeset 39908ea4c390 (bug 1195723)
Backed out changeset 3fcb5682049a (bug 1195723)
Backed out changeset 867d6507a381 (bug 1195723)
Backed out changeset c938ad9dd11c (bug 1195723)
Backed out changeset 7bdb9540b60f (bug 1195723)
Backed out changeset a4f7a73c04fa (bug 1195723)
Backed out changeset 7f86beff4263 (bug 1195723)
Backed out changeset efb6bcf743e7 (bug 1195723)
Backed out changeset 04eceefa54c7 (bug 1195723)
2016-08-22 10:07:25 -07:00
Jean-Yves Avenard a637a5b7d5 Bug 1195723: [flac] P12. Add sniffer for streaming flac. r=kamidphish
MozReview-Commit-ID: P62v6vsXzs

--HG--
extra : rebase_source : 37c365efbff607b10ad41ce8290556ded07783e2
2016-08-18 13:07:11 +10:00
Jean-Yves Avenard 2d2fb06c87 Bug 1195723: [flac] P10. Add media sniffer for flac file. r=kamidphish
This only supports flac with a STREAMINFO header.

MozReview-Commit-ID: FaT9N6xJDPY

--HG--
extra : rebase_source : faf16192bf2ca57a9ca6ea6061f1436f7b032b00
2016-08-17 15:47:39 +10:00
John Lin 293160420d Bug 1272468 - Let sniffer support 'mmp4' ftyp brand. r=jya
MozReview-Commit-ID: IKHEILRmhKP

--HG--
extra : rebase_source : 3a3ca37ff000a82879287b2cfc39e1bdc336a93b
2016-05-13 16:54:05 +08:00
John Lin 5ea428adec Bug 1269260 - Treat 'iso?' file as MP4 video. r=jya
MozReview-Commit-ID: B4v8LNd479i

--HG--
extra : rebase_source : fed0c7620a1a310c4ec0bd38c48f2da165fb65c9
2016-05-03 13:52:37 +08:00
Jean-Yves Avenard 4d457a83ad Bug 1251184: [quicktime] P1. Report video/quicktime mimetype when sniffing. r=cpearce
MozReview-Commit-ID: 9EJQVYt76Mh

--HG--
extra : rebase_source : 22b6c39ac8f8321b35c7cd5671730ccf902520da
2016-03-11 22:32:30 +11:00
Jean-Yves Avenard 846eb884b0 Bug 1244523: [mp4] P2. Have sniffer recognise ftyp qt subtype. r=cpearce 2016-02-02 16:27:47 +11:00
Chris Peterson 88051371a9 Bug 1232223 - Part 1: Remove MOZ_WEBM #ifdefs because WebM is always supported, though not necessarily enabled. r=jya r=glandium 2015-12-12 13:49:07 -05:00
John Lin e5d023ca2c Bug 1211802 - Recognize 'avc?' as mp4 video. r=jya 2015-11-11 19:13:00 +01:00
John Lin c338afb947 Bug 868333 - Match more MP4 family file types in media sniffer. r=rillian 2015-06-25 14:44:00 +02:00
Matthew Gregan 6bb28537a8 Bug 1079747 - Follow WhatWG's MIMESniff spec for MP4 more closely. r=cpearce 2014-10-15 13:57:38 +13:00
Robert O'Callahan 43fa3946ce Bug 1048579. Always sniff for media loads. r=bzbarsky
--HG--
extra : rebase_source : 39b6d37dbbf138095856954bee583e84cfd971b5
2014-08-23 00:08:14 +12:00
Ryan VanderMeulen 0b6826aac5 Backed out changeset ecf04c6eb4dd (bug 1048579) for xpcshell failures. 2014-08-22 10:08:10 -04:00
Robert O'Callahan d82cede239 Bug 1048579. Always sniff for media loads. r=bzbarsky
--HG--
extra : rebase_source : 067e99eaad781dec78a772405870b02c195a42e2
2014-08-23 00:08:14 +12:00
Birunthan Mohanathas 5f1fde8824 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Paul Adenot cfb33ac697 Bug 967007 - Bump the sniffing limit for mp3. r=rillian 2014-02-03 16:55:34 +01:00
Birunthan Mohanathas 02d0812720 Bug 828300 - Replace NS_ARRAY_LENGTH with mozilla::ArrayLength/MOZ_ARRAY_LENGTH. r=ehsan 2014-01-30 13:26:54 -05:00
Ralph Giles f5e4f4e145 Bug 862088 - Add raw mp3 sniffing. r=padenot
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 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.
notags-scan.mp3 has garbage before the header, and verifies sniffing fails.
he_free.mp is a vbr test vector which isn't sniffable with this method.
fl10.mp2 is an mp2 file, and verifies sniffing fails.
ff-inst.exe verifies bug 875769 doesn't regress.
2013-06-04 12:12:00 -07:00
Ryan VanderMeulen 74321b023c Backed out changesets bde36c2eacc0 and 8dc40bbe844e (bug 862088) for causing bug 875769. 2013-05-25 09:21:29 -04:00
Ralph Giles 4846d91dca 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
Marco Chen 69906d5894 Bug 859711 - [A/V] Add mp4 sniffer to recognizing isom/iso2 comptiable_brand. r=padenot 2013-05-07 10:17:34 +08:00
Honza Bambas 09a694848f Bug 843376 - nsMediaSniffer.cpp(13) : fatal error C1083: Cannot open include file: 'nestegg/nestegg.h', r=padenot 2013-02-21 14:27:00 +01:00
Paul Adenot dfd0be7d58 Bug 835381 - Use the new libnestegg API to sniff for WebM. r=kinetik 2013-02-12 22:15:55 +01:00
Mats Palmgren b7ae90666d Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan 2013-01-15 13:22:03 +01:00
Ehsan Akhgari e55fd9da0a Bug 813433 - Make nsMediaSniffer accept null request arguments; r=bzbarsky
This patch will make the content sniffer useful to sniff the mimetype of
in-memory media buffers.
2012-11-20 00:01:30 -05:00
Paul Adenot 7683743c75 Bug 789741 - Fix a crash in nsMediaSniffer::GetMIMETypeFromContent. r=bz 2012-09-10 09:57:17 -04:00
Paul Adenot a84db6e368 Bug 789077 - Sniff for a media only if the Content-Type is unknown or octet-stream. r=bz 2012-09-07 16:18:59 -07:00
Paul Adenot 7ab1a757ed Bug 789077 - Remove sniffing for mp3 without ID3 because of false positives. r=cpearce 2012-09-07 16:14:05 -07:00
Ehsan Akhgari 4a8bc9fd25 Bug 579517 follow-up: Remove NSPR types that crept in
--HG--
extra : rebase_source : 3fc28d51fcb5c63e417b0fe2b90fb6e1eb0cac63
2012-09-06 10:11:28 -04:00