Bug 1417011 - move rust mp4 parser to media/mp4parse-rust. r=kinetik
authorAlfredo.Yang <ayang@mozilla.com>
Wed, 15 Nov 2017 09:51:38 +0800
changeset 392101 441d3a12c9ad5af995e2de27e523c4a6d7082454
parent 392100 e289efd230954707e4056b5a72b066254f9086ea
child 392102 d20919a219d305ba27acce8440bfacb200040031
push id32910
push userrgurzau@mozilla.com
push dateThu, 16 Nov 2017 10:02:59 +0000
treeherdermozilla-central@9941e68b5a53 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs1417011
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1417011 - move rust mp4 parser to media/mp4parse-rust. r=kinetik MozReview-Commit-ID: 4Rcuv3UBoJV
config/external/moz.build
media/libstagefright/binding/include/mp4parse.h
media/libstagefright/binding/mp4parse-cargo.patch
media/libstagefright/binding/mp4parse/Cargo.toml
media/libstagefright/binding/mp4parse/src/boxes.rs
media/libstagefright/binding/mp4parse/src/lib.rs
media/libstagefright/binding/mp4parse/src/tests.rs
media/libstagefright/binding/mp4parse/tests/afl.rs
media/libstagefright/binding/mp4parse/tests/bipbop-cenc-audioinit.mp4
media/libstagefright/binding/mp4parse/tests/bipbop_480wp_1001kbps-cenc-video-key1-init.mp4
media/libstagefright/binding/mp4parse/tests/minimal.mp4
media/libstagefright/binding/mp4parse/tests/public.rs
media/libstagefright/binding/mp4parse_capi/Cargo.toml
media/libstagefright/binding/mp4parse_capi/build.rs
media/libstagefright/binding/mp4parse_capi/src/lib.rs
media/libstagefright/binding/mp4parse_fallible/Cargo.toml
media/libstagefright/binding/mp4parse_fallible/README
media/libstagefright/binding/mp4parse_fallible/lib.rs
media/libstagefright/binding/update-rust.sh
media/libstagefright/moz.build
media/mp4parse-rust/moz.build
media/mp4parse-rust/mp4parse-cargo.patch
media/mp4parse-rust/mp4parse.h
media/mp4parse-rust/mp4parse/Cargo.toml
media/mp4parse-rust/mp4parse/src/boxes.rs
media/mp4parse-rust/mp4parse/src/lib.rs
media/mp4parse-rust/mp4parse/src/tests.rs
media/mp4parse-rust/mp4parse/tests/afl.rs
media/mp4parse-rust/mp4parse/tests/bipbop-cenc-audioinit.mp4
media/mp4parse-rust/mp4parse/tests/bipbop_480wp_1001kbps-cenc-video-key1-init.mp4
media/mp4parse-rust/mp4parse/tests/minimal.mp4
media/mp4parse-rust/mp4parse/tests/public.rs
media/mp4parse-rust/mp4parse_capi/Cargo.toml
media/mp4parse-rust/mp4parse_capi/build.rs
media/mp4parse-rust/mp4parse_capi/src/lib.rs
media/mp4parse-rust/mp4parse_fallible/Cargo.toml
media/mp4parse-rust/mp4parse_fallible/README
media/mp4parse-rust/mp4parse_fallible/lib.rs
media/mp4parse-rust/update-rust.sh
toolkit/library/rust/shared/Cargo.toml
--- a/config/external/moz.build
+++ b/config/external/moz.build
@@ -52,12 +52,13 @@ external_dirs += [
     'media/libcubeb',
     'media/libnestegg',
     'media/libogg',
     'media/libopus',
     'media/libtheora',
     'media/libspeex_resampler',
     'media/libstagefright',
     'media/libsoundtouch',
+    'media/mp4parse-rust',
     'media/psshparser'
 ]
 
 DIRS += ['../../' + i for i in external_dirs]
--- a/media/libstagefright/moz.build
+++ b/media/libstagefright/moz.build
@@ -26,20 +26,16 @@ EXPORTS.mp4_demuxer += [
     'binding/include/mp4_demuxer/SinfParser.h',
     'binding/include/mp4_demuxer/Stream.h',
 ]
 
 EXPORTS.demuxer += [
     'binding/include/demuxer/TrackDemuxer.h',
 ]
 
-EXPORTS += [
-    'binding/include/mp4parse.h',
-]
-
 UNIFIED_SOURCES += [
     'binding/Adts.cpp',
     'binding/AnnexB.cpp',
     'binding/BitReader.cpp',
     'binding/Box.cpp',
     'binding/BufferStream.cpp',
     'binding/DecoderData.cpp',
     'binding/H264.cpp',
new file mode 100644
--- /dev/null
+++ b/media/mp4parse-rust/moz.build
@@ -0,0 +1,11 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+
+EXPORTS += [
+    'mp4parse.h',
+]
+
+FINAL_LIBRARY = 'xul'
rename from media/libstagefright/binding/mp4parse-cargo.patch
rename to media/mp4parse-rust/mp4parse-cargo.patch
rename from media/libstagefright/binding/include/mp4parse.h
rename to media/mp4parse-rust/mp4parse.h
rename from media/libstagefright/binding/mp4parse/Cargo.toml
rename to media/mp4parse-rust/mp4parse/Cargo.toml
rename from media/libstagefright/binding/mp4parse/src/boxes.rs
rename to media/mp4parse-rust/mp4parse/src/boxes.rs
rename from media/libstagefright/binding/mp4parse/src/lib.rs
rename to media/mp4parse-rust/mp4parse/src/lib.rs
rename from media/libstagefright/binding/mp4parse/src/tests.rs
rename to media/mp4parse-rust/mp4parse/src/tests.rs
rename from media/libstagefright/binding/mp4parse/tests/afl.rs
rename to media/mp4parse-rust/mp4parse/tests/afl.rs
rename from media/libstagefright/binding/mp4parse/tests/bipbop-cenc-audioinit.mp4
rename to media/mp4parse-rust/mp4parse/tests/bipbop-cenc-audioinit.mp4
rename from media/libstagefright/binding/mp4parse/tests/bipbop_480wp_1001kbps-cenc-video-key1-init.mp4
rename to media/mp4parse-rust/mp4parse/tests/bipbop_480wp_1001kbps-cenc-video-key1-init.mp4
rename from media/libstagefright/binding/mp4parse/tests/minimal.mp4
rename to media/mp4parse-rust/mp4parse/tests/minimal.mp4
rename from media/libstagefright/binding/mp4parse/tests/public.rs
rename to media/mp4parse-rust/mp4parse/tests/public.rs
rename from media/libstagefright/binding/mp4parse_capi/Cargo.toml
rename to media/mp4parse-rust/mp4parse_capi/Cargo.toml
rename from media/libstagefright/binding/mp4parse_capi/build.rs
rename to media/mp4parse-rust/mp4parse_capi/build.rs
rename from media/libstagefright/binding/mp4parse_capi/src/lib.rs
rename to media/mp4parse-rust/mp4parse_capi/src/lib.rs
rename from media/libstagefright/binding/mp4parse_fallible/Cargo.toml
rename to media/mp4parse-rust/mp4parse_fallible/Cargo.toml
rename from media/libstagefright/binding/mp4parse_fallible/README
rename to media/mp4parse-rust/mp4parse_fallible/README
rename from media/libstagefright/binding/mp4parse_fallible/lib.rs
rename to media/mp4parse-rust/mp4parse_fallible/lib.rs
rename from media/libstagefright/binding/update-rust.sh
rename to media/mp4parse-rust/update-rust.sh
--- a/media/libstagefright/binding/update-rust.sh
+++ b/media/mp4parse-rust/update-rust.sh
@@ -32,29 +32,29 @@ cp _upstream/mp4parse/mp4parse/Cargo.tom
 cp _upstream/mp4parse/mp4parse/src/*.rs mp4parse/src/
 mkdir -p mp4parse/tests
 cp _upstream/mp4parse/mp4parse/tests/*.rs mp4parse/tests/
 cp _upstream/mp4parse/mp4parse/tests/*.mp4 mp4parse/tests/
 rm -rf mp4parse_capi
 mkdir -p mp4parse_capi/src
 cp _upstream/mp4parse/mp4parse_capi/Cargo.toml mp4parse_capi/
 cp _upstream/mp4parse/mp4parse_capi/build.rs mp4parse_capi/
-cp _upstream/mp4parse/mp4parse_capi/include/mp4parse.h include/
+cp _upstream/mp4parse/mp4parse_capi/include/mp4parse.h ../../dom/media/mp4/
 cp _upstream/mp4parse/mp4parse_capi/src/*.rs mp4parse_capi/src/
 rm -rf mp4parse_fallible
 mkdir -p mp4parse_fallible
 cp _upstream/mp4parse_fallible/* mp4parse_fallible/
 
 echo "Applying patches..."
 patch -p4 < mp4parse-cargo.patch
 
 echo "Cleaning up..."
 rm -rf _upstream
 
 echo "Updating gecko Cargo.lock..."
-pushd ../../../toolkit/library/rust/
+pushd ../../toolkit/library/rust/
 cargo update --package mp4parse_capi
 popd
-pushd ../../../toolkit/library/gtest/rust/
+pushd ../../toolkit/library/gtest/rust/
 cargo update --package mp4parse_capi
 popd
 
 echo "Updated to ${VER}."
--- a/toolkit/library/rust/shared/Cargo.toml
+++ b/toolkit/library/rust/shared/Cargo.toml
@@ -2,17 +2,17 @@
 name = "gkrust-shared"
 version = "0.1.0"
 authors = ["nobody@mozilla.org"]
 license = "MPL-2.0"
 description = "Shared Rust code for libxul"
 
 [dependencies]
 geckoservo = { path = "../../../../servo/ports/geckolib", optional = true }
-mp4parse_capi = { path = "../../../../media/libstagefright/binding/mp4parse_capi" }
+mp4parse_capi = { path = "../../../../media/mp4parse-rust/mp4parse_capi" }
 nsstring = { path = "../../../../servo/support/gecko/nsstring" }
 nserror = { path = "../../../../xpcom/rust/nserror" }
 netwerk_helper = { path = "../../../../netwerk/base/rust-helper" }
 rust_url_capi = { path = "../../../../netwerk/base/rust-url-capi" }
 webrender_bindings = { path = "../../../../gfx/webrender_bindings", optional = true }
 cubeb-pulse = { path = "../../../../media/libcubeb/cubeb-pulse-rs", optional = true, features=["pulse-dlopen"] }
 cubeb-core = { path = "../../../../media/cubeb-rs/cubeb-core", optional = true }
 cubeb = { path = "../../../../media/cubeb-rs/cubeb-api", optional = true }