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

584 Коммитов

Автор SHA1 Сообщение Дата
Ralph Giles bbd48a5613 Bug 1338655 - Don't try to build mp4parse bindings. r=froydnj
We use the cheddar crate to generate a C header file
for our mp4parse_capi wrapper crate. Currently we
do this at code check-in time via update-rust.sh.

Cargo 0.18 and later will try to execute a build.rs
file in the crate source tree regardless of whether
it's specified in Cargo.toml so patching out that
line just results in 'crate cheddar not found'.

This change restores the old behaviour by substituting
a 'build = false' line instead.

We do have syntex vendored, but we don't currently build
it by default, so I prefer this solution to just vendoring
cheddar and generating the header at build time. The syntex
crate is quite large and adds significantly to our compile
time.

MozReview-Commit-ID: InJRRODWAdP

--HG--
extra : rebase_source : 29378fcbc86015ce6cc22dc66d38a43ddbac204e
2017-02-10 12:58:18 -08:00
Jean-Yves Avenard c51aa799df Bug 1334971: P1. Properly handle invalid PPS. r=gerald
A PPS contains an id that is used as index inside an array. We must ensure that there's enough space in that array.

Also fix H264::DecodePPS which incorrectly always returned an error when parsing a valid PPS.

MozReview-Commit-ID: L1HUAdxWdu0

--HG--
extra : rebase_source : 5e32981d60398d37775573ea17ce54a345401b21
2017-02-07 07:55:19 +01:00
Jay Harris efb83af7fa Bug 1318792 - Adds support for sbgp and sgpd boxes occuring in the sampletable r=jya
MozReview-Commit-ID: JaFGeZKFPRg

--HG--
extra : rebase_source : 07137a6923478b837794a1fa2cf617bfd08e41d6
2017-01-25 11:35:16 +13:00
Jay Harris 107910f23e Bug 1318792 - Adds support for sbgp and sgpd boxes in the traf box r=jya
MozReview-Commit-ID: 7aHEaCTJm22

--HG--
extra : rebase_source : d160d3d64f3848f697e648eae2dafa481800bedd
2017-01-25 12:10:35 +13:00
Gerald Squelart 72081ad0b6 Bug 1334445 - Abort AnnexB parsing on ByteWriter failure - r=jya
All writes through a ByteWriter are now checked for success.
Possible failures could be in three classes:
A. Attempt to write a single unreasonably-large block of data. In this case we
just don't allocate more memory, so Firefox should keep functioning but simply
refuse to play this media.
B. Accumulation of a lot of data into a single vector. In this case we return
from the function, which should immediately free the large vector, and
hopefully allow Firefox to continue unscathed; but there is the possibility
that other memory allocations elsewhere will fail in the meantime.
C. OOM across all of Firefox, and this write is just the final drop. Like
previously we will still try to return and deallocate some memory, but this
may not be enough to recover.

So even though this patch cannot fix all possible OOM causes, I think it is
worth adding, as it is simple enough, and will help in some cases where
corrupted data could sensibly be handled without making Firefox crash.

MozReview-Commit-ID: JPVC9hao4Uq

--HG--
extra : rebase_source : b4a8af61ec8f4129819d2e8d51a5b9adc449183c
2017-02-01 19:17:29 +11:00
Alfredo.Yang 568c90bf22 Bug 1302027 - enable rust log when MP4Metadata prlog is set. r=kinetik
MozReview-Commit-ID: 7avZ5T4XKDY

--HG--
extra : rebase_source : 779e66adbb8fbcf5800bf31f555ce2db00afdd45
2016-12-29 14:56:34 +08:00
Alastor Wu 4d3816d9e0 Bug 1332199 - remove always-true assertion. r=gerald
Because we read 8 bits from extradata, it won't exceed MAX_SPS/PPS_COUNT (256).

MozReview-Commit-ID: 5qr1pDLrmvt

--HG--
extra : rebase_source : 4a7269a7430ea913650298ad06a2132297dad85d
2017-01-19 17:37:29 +08:00
Alfredo.Yang 843677e75c Bug 1329061 - add gtest for QT ESDS parsing. r=jya
MozReview-Commit-ID: AfYIh0uHEVx

--HG--
extra : rebase_source : 68476fed96c4a2b58d68036dbde30f5d0b3bd754
2017-01-11 14:35:59 +08:00
Alfredo.Yang 87f9819147 Bug 1329061 - parse ESDS in wave atom container for QT format. r=jya
MozReview-Commit-ID: 4G15pqakse9

--HG--
extra : rebase_source : 41942393f0a36f3cfee462f1d8a27e853a89cc68
2017-01-06 15:30:42 +08:00
Alfredo.Yang a455e9f1e7 Bug 1328221 - Support GASpecificConfig audio channel in rust mp4 parser. r=rillian
MozReview-Commit-ID: IQKxtjatU9J

--HG--
extra : rebase_source : d710f6f639415e1ff7d99b39a6ef97dfd65868e3
2017-01-11 09:03:30 +08:00
James Cheng 58ea47742d Bug 1325189 - [CID 1221158] Assertion when OOM instead of indexing array with negative value. r=gerald
MozReview-Commit-ID: 4smaRJHamLA

--HG--
extra : rebase_source : 154a23ff815b13aa80b2a641ab94127750dd9134
2016-12-22 14:16:15 +08:00
Alfredo.Yang 7b19067da5 Bug 1323390 - Support audio profile in mp4 rust parser. r=kinetik
MozReview-Commit-ID: DLfLdgvc7B1

--HG--
extra : rebase_source : ac9b059759f73c92f7678ed137f0366e35fdc800
2016-12-14 16:01:43 +08:00
Wei-Cheng Pan 788b1dfa40 Bug 1324734 - Fix attribute of mp4_demuxer::BoxReader r=jya
MozReview-Commit-ID: 3lZPH3a9AXt

--HG--
extra : rebase_source : 92d7f17fc38cd03c98d7f2a63e57cc7e6d5ed516
2016-12-20 18:07:57 +08:00
Alfredo.Yang 78a33f04df Bug 1320026 - support crypto info in rust mp4 parser. r=kinetik
MozReview-Commit-ID: 1d8QKXJ1rnh

--HG--
extra : rebase_source : 6be207aa6ecdc689ee30430d00109466794d1cc5
2016-12-12 16:00:24 +08:00
Jean-Yves Avenard 6e751096f7 Bug 1324381: P3. Ignore duration sets to -1. r=gerald
MozReview-Commit-ID: 7RH5deLo0Pm

--HG--
extra : rebase_source : bcc36b2b03687d50242a8d324e88e63966442b1d
2016-12-19 21:04:46 +11:00
Jean-Yves Avenard 778399ee27 Bug 1324381: P2. Adjust existing gtest. r=gerald
The file did set a duration of -1, which is now considered as 0.

MozReview-Commit-ID: 6HMeRw4Q8uT

--HG--
extra : rebase_source : 2292e0e945f9ac0d3d18cd758ab75ed81f412345
2016-12-20 09:59:09 +11:00
Jean-Yves Avenard 8869241ac0 Bug 1323081: [H264] P2. Ignore NAL stop bit and trailing 0. r=gerald
MozReview-Commit-ID: EHoAFqXJFq5

--HG--
extra : rebase_source : 37e00a55ca6dc612862f9363b89b06a45e517019
2016-12-14 17:17:53 +11:00
Jean-Yves Avenard 44d3408838 Bug 1323081: P1. Add native BitReader class. r=gerald
This is a rewrite from Stagefright's ABitReader. The major difference is that you give the original size in bits rather than in bytes. ABitReader always read all bits available. While under some circumstances we want to bound the buffer to a set number of bits.

MozReview-Commit-ID: hdJ7CAwOea

--HG--
extra : rebase_source : 684f02540f46d053f2a12d7007a67f6e0f765057
2016-12-14 15:27:48 +11:00
Jean-Yves Avenard dc0394a1d9 Bug 1322961: Check SPS and PPS attributes value. r=gerald
MozReview-Commit-ID: LSngXbdQqdL

--HG--
extra : rebase_source : 14b1540c3324bf670031f86c45e6574c495cb26f
2016-12-12 21:51:03 +11:00
Alastor Wu 10799fa4e0 Bug 1321164 - part2 : use enum for NAL types. r=jya
In order to increase the readability, use enum value for the NAL types.

MozReview-Commit-ID: 8iwFbB7BEOM

--HG--
extra : rebase_source : 4bfecd012904942f6ad38be9b6b69786d2d732d1
2016-12-08 08:50:42 -10:00
Alastor Wu 1a51e913a5 Bug 1321164 - part1 : handle multiple SPS/PPS. r=jya
Implement the data structure for multuple SPS/PPS, and decode the multiple SPS/PPS from the extra data.

MozReview-Commit-ID: E90fdH1pvlA

--HG--
extra : rebase_source : 4b9c3229b92ec5d1d43ce14a72b8e96da516c59d
2016-12-02 14:52:48 +08:00
Jean-Yves Avenard 549b224ab6 Bug 1309163: P4. Add missing members to SPSData. r=rillian
Those members are required for DXVA2.

MozReview-Commit-ID: 4QRMVuUEJVD

--HG--
extra : rebase_source : a807486ca63810be3cc4157d9f77cae858797574
2016-10-24 23:37:31 +11:00
Jean-Yves Avenard c42150044f Bug 1309163: P3. Add PPS decoder. r=rillian
Currently, only decode the first PPS found.

MozReview-Commit-ID: APzyvUdeSXR

--HG--
extra : rebase_source : ad6b7cf4a16899800a996359a3b6b5e077632168
2016-10-24 23:04:09 +11:00
Jean-Yves Avenard a73c5ed9b6 Bug 1309163: P2. Add AnnexB::HasPPS methods. r=gerald
MozReview-Commit-ID: 7M58OXvCp5q

--HG--
extra : rebase_source : 09fb441ec4c3561f616bbb6dd12042e8a3af12e1
2016-10-24 17:23:02 +11:00
Jean-Yves Avenard 11d2736751 Bug 1309163: Add BitReader::BitsLeft method. r=gerald
MozReview-Commit-ID: 9HOunJRb1ht

--HG--
extra : rebase_source : 6d71fb2afd90fc061b53bbb7285e5eada3bfea4a
2016-10-24 17:22:05 +11:00
Alfredo.Yang 371c0e7711 Bug 1317609 - support avc extra data. r=kinetik
MozReview-Commit-ID: Kza7utcIpFP

--HG--
extra : rebase_source : 80ce1ed379ff764e4a72fba3d2efdaf682f71f7e
2016-11-24 16:36:08 +08:00
Alfredo.Yang f000f87291 Bug 1317609 - update rust mp4 parser to support avc extra data. r=kinetik
MozReview-Commit-ID: 7sWkDrXD8bs

--HG--
extra : rebase_source : cbee895e95f2c0f2ad3c06b03b65ab3c3ad6d34d
2016-11-25 09:08:37 +08:00
Alfredo.Yang c9c1355882 Bug 1313556 - update rust parser for pssh parsing. r=rillian
MozReview-Commit-ID: KH8K7mizUHl

--HG--
extra : rebase_source : 8e53260bbfcee797bbf05c2504810c7a1ad81a55
2016-11-10 14:50:30 +08:00
Alfredo.Yang e080effcaa Bug 1313556 - Implement Crypto() for mp4 rust parser. r=kinetik
MozReview-Commit-ID: LtJp2J46V19

--HG--
extra : rebase_source : e8e56560bd211bfee4baccd8eb3fe44117efa3e2
2016-11-08 15:08:10 +08:00
Ralph Giles b9e0fc97c3 Bug 1314460 - Update rust mp4parse to v0.6.0. r=kinetik
Result of running the update script.

MozReview-Commit-ID: 4rqFqaFJ028

--HG--
extra : rebase_source : 011cd38d524e2609e2656a084c2ac920d407488f
2016-11-01 16:07:32 -07:00
Ralph Giles 5c1056e5fa Bug 1314460 - Update mp4parse import script for v0.6.0. r=kinetik
Update the import script to reference the latest published release.

Add a cargo-update step to the script. Without this the gecko build
will fail if the declared crate versions change from what is recorded
in the in-tree Cargo.lock files.

Also make it fail on first error.

MozReview-Commit-ID: 6IDK6jdkSm1

--HG--
extra : rebase_source : 0e09eb311a8ba59ad4075f43ab0d9f8a07074e89
2016-11-01 15:54:48 -07:00
Alfredo.Yang 3ae304e16a Bug 1309079 - support mp3-in-mp4 in rust mp4 parser. r=kinetik
MozReview-Commit-ID: LieZ5O222LT

--HG--
extra : rebase_source : 5662d37ba5ec01ba55d518725b145a442e61c3e4
2016-10-13 10:12:28 +08:00
Ralph Giles 1f1a694612 Bug 1303888 - Fix a logging typo. r=kinetik
The error message refers to video, not audio tracks. Looks like
a cut-and-paste error.

MozReview-Commit-ID: J6ur36FMSRF

--HG--
extra : rebase_source : 626e4b3287ce268d9daee26610a599c721116148
2016-10-25 16:43:28 -07:00
Ralph Giles a45686ff52 Bug 1303888 - Accept flac from the rust mp4parse demuxer. r=kinetik
Recognize FLAC as an audio mimetype in MP4Metadata and prefer
the rust demuxer for it. Stagefright does not support this.

MozReview-Commit-ID: 7T4tCSCCNBk

--HG--
extra : rebase_source : b69c6e35d4e48c4d419856ee979eae893dbc72b1
2016-10-25 16:42:12 -07:00
Ralph Giles c0890a4a2c Bug 1303888 - Update rust mp4parse. r=kinetik
Update to the latest upstream master, including skipping padding
at the end of some boxes, esds parsing and flac support.

MozReview-Commit-ID: GdHEQIrtyLB

--HG--
extra : rebase_source : 97e1d09725d813e0f2b31bed6ce80e16b0701fbe
2016-10-25 19:25:18 -07:00
Gerald Squelart 8f130692e8 Bug 1307945 - ByteWriter asserts that all writes should succeed - r=jya
Writes should always be small, so if any fails, we are in big trouble anyway.
(Effectively ByteWriter is infallible.)

MozReview-Commit-ID: CJVsrTx0PFh

--HG--
extra : rebase_source : fa4dd3230382620a393c8555338e8956df83f748
2016-10-16 19:10:42 +11:00
Gerald Squelart 6b07d57631 Bug 1307945 - Minor style fix - r=jya
MozReview-Commit-ID: 6kTDaJoM9hG

--HG--
extra : rebase_source : 58576b7d4239b03e76ad37b28a8bbed43f5849c3
2016-10-13 15:33:53 +11:00
Sebastian Hengst cdcc9e20da Bug 1304829 - rename RELEASE_BUILD to RELEASE_OR_BETA: main part. r=ted,Mossop
MozReview-Commit-ID: 1lCt0xTMV5O
2016-10-08 11:14:49 +02:00
Jean-Yves Avenard 4a7fd611df Bug 1301869: P1. Only add SPS/PPS on the first keyframe. r=cpearce
When we add SPS/PPS NAL in front of each keyframe data, this somehow makes the WMF decoder to misbehave and to always return an invalid timestamp.

MozReview-Commit-ID: 2SzTiwP0ii1

--HG--
extra : rebase_source : b499c83d504df772e6d722053630ff4d92306d4f
2016-10-06 11:38:52 +11:00
Ralph Giles 17ec242a0b Bug 1306755 - Copy rust mp4parse tests into the tree. r=kinetik
Having these files in-tree makes it possible to run
`cargo test` to verify changes.

MozReview-Commit-ID: 6x4XZaw4UtD

--HG--
extra : rebase_source : 293572cbbc21929b43a735bf53ddb5521503bcd2
2016-09-30 14:37:54 -07:00
Alfredo.Yang 880bc1789a Bug 1304254 - Use fragment_duration as track duration. r=rillian
MozReview-Commit-ID: 6Y8kFiDmE1y

--HG--
extra : rebase_source : dcce69cfee361edd92fdcb3d41d198a915bc3a48
2016-09-22 19:30:11 +08:00
Ralph Giles ac89e3a7ca Bug 1306164 - Drop byteorder from mp4parse update script. r=kinetik
The byteorder dependency was moved to $topsrcdir/third_party/rust/
in bug 1298422 but this import script wasn't updated.

MozReview-Commit-ID: CzoxsFPYpIm

--HG--
extra : rebase_source : 18bcc2e3351887f0593e2167acc59c6c4f6003e8
2016-09-29 15:28:31 -07:00
Alfredo.Yang a5e375a095 Bug 1306164 - Update rust parser for fragmented file. r=rillian
MozReview-Commit-ID: BzRxyH9tYZL

--HG--
extra : rebase_source : c217dab83d6646c37e74985cee5ce743c9f880b5
2016-09-29 08:56:48 +08:00
Matthew Gregan 318e608e57 Bug 1305596 - Convert debug-only asserts added in bug 1303247 to release asserts. r=rillian 2016-09-27 13:09:21 +13:00
Alfredo.Yang 849aca37da Bug 1304820 - use stagefright instead of rust parser when rust parser fails to parse a file. r=kinetik
MozReview-Commit-ID: 8tjl9MICvWo

--HG--
extra : rebase_source : 7bb71369eb969fd762d99079dbc7f174e1f0d75e
2016-09-23 14:37:07 +08:00
Matthew Gregan 269fe42c7e Bug 1304303 - Speed up default initialization of SampleInfoSize table. r=gerald
MozReview-Commit-ID: 9dValMxqVkh
2016-09-22 17:40:48 +12:00
Phil Ringnalda c9972b98e7 Backed out changeset 9b7d9479690e (bug 1304303) for gtest and mda failures
CLOSED TREE
2016-09-21 19:56:58 -07:00
Matthew Gregan db1ebdc0cf Bug 1304303 - Speed up default initialization of SampleInfoSize table. r=gerald
MozReview-Commit-ID: 9dValMxqVkh
2016-09-22 12:59:27 +12:00
Matthew Gregan 8a99e587f7 Bug 1303247 - Add a dev-only pref to treat mismatches between Rust and Stagefright as a fatal error. r=rillian
MozReview-Commit-ID: Jl69N9VQTXR
2016-09-21 17:45:47 +12:00
Matthew Gregan e98062c24c Bug 1303247 - Fix track indexing and AudioInfo initialization in Rust metadata parser. r=rillian 2016-09-21 17:45:46 +12:00