From ac870fd3ee76de758b18561043abff8452f979fa Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 26 May 2016 13:53:26 -0400 Subject: [PATCH] Backed out changeset aa1d245e0af3 (bug 1275812) for mass win32 debug crashes. CLOSED TREE --- .../libstagefright/binding/include/mp4parse.h | 6 --- .../binding/mp4parse-codecs.patch | 42 ------------------- media/libstagefright/binding/mp4parse/capi.rs | 16 ------- media/libstagefright/binding/update-rust.sh | 1 - 4 files changed, 65 deletions(-) delete mode 100644 media/libstagefright/binding/mp4parse-codecs.patch diff --git a/media/libstagefright/binding/include/mp4parse.h b/media/libstagefright/binding/include/mp4parse.h index 441c028a0ef4..b838673bed6b 100644 --- a/media/libstagefright/binding/include/mp4parse.h +++ b/media/libstagefright/binding/include/mp4parse.h @@ -22,12 +22,6 @@ struct mp4parse_state; #define MP4PARSE_TRACK_TYPE_H264 0 // "video/avc" #define MP4PARSE_TRACK_TYPE_AAC 1 // "audio/mp4a-latm" -#define MP4PARSE_TRACK_CODEC_UNKNOWN 0 -#define MP4PARSE_TRACK_CODEC_AAC 1 -#define MP4PARSE_TRACK_CODEC_OPUS 2 -#define MP4PARSE_TRACK_CODEC_H264 3 -#define MP4PARSE_TRACK_CODEC_VP9 4 - struct mp4parse_track_audio_info { uint16_t channels; uint16_t bit_depth; diff --git a/media/libstagefright/binding/mp4parse-codecs.patch b/media/libstagefright/binding/mp4parse-codecs.patch deleted file mode 100644 index fd2a0b01ba80..000000000000 --- a/media/libstagefright/binding/mp4parse-codecs.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/media/libstagefright/binding/mp4parse/capi.rs b/media/libstagefright/binding/mp4parse/capi.rs -index ed7e566..2441d2a 100644 ---- a/media/libstagefright/binding/mp4parse/capi.rs -+++ b/media/libstagefright/binding/mp4parse/capi.rs -@@ -49,12 +49,20 @@ const MP4PARSE_ERROR_IO: i32 = 6; - const TRACK_TYPE_H264: u32 = 0; - const TRACK_TYPE_AAC: u32 = 1; - -+/// Map Track mime_type to uint32 constants. -+const TRACK_CODEC_UNKNOWN: u32 = 0; -+const TRACK_CODEC_AAC: u32 = 1; -+const TRACK_CODEC_OPUS: u32 = 2; -+const TRACK_CODEC_H264: u32 = 3; -+const TRACK_CODEC_VP9: u32 = 4; -+ - // These structs *must* match those declared in include/mp4parse.h. - - #[repr(C)] - pub struct TrackInfo { - track_type: u32, - track_id: u32, -+ codec: u32, - duration: u64, - media_time: i64, // wants to be u64? understand how elst adjustment works - // TODO(kinetik): include crypto guff -@@ -166,6 +174,16 @@ pub unsafe extern "C" fn mp4parse_get_track_info(context: *mut MediaContext, tra - TrackType::Unknown => return MP4PARSE_ERROR_UNSUPPORTED, - }; - -+ info.codec = match &*context.tracks[track_index].mime_type { -+ "audio/opus" => TRACK_CODEC_OPUS, -+ "audio/aac" | -+ "audio/mp4a-latm" => TRACK_CODEC_AAC, -+ "video/vp9" => TRACK_CODEC_VP9, -+ "video/h264" | -+ "video/avc" => TRACK_CODEC_H264, -+ _ => TRACK_CODEC_UNKNOWN, -+ }; -+ - // Maybe context & track should just have a single simple is_valid() instead? - if context.timescale.is_none() || - context.tracks[track_index].timescale.is_none() || diff --git a/media/libstagefright/binding/mp4parse/capi.rs b/media/libstagefright/binding/mp4parse/capi.rs index b61c5ae1df97..7c7ce741597d 100644 --- a/media/libstagefright/binding/mp4parse/capi.rs +++ b/media/libstagefright/binding/mp4parse/capi.rs @@ -49,20 +49,12 @@ const MP4PARSE_ERROR_IO: i32 = 6; const TRACK_TYPE_H264: u32 = 0; const TRACK_TYPE_AAC: u32 = 1; -/// Map Track mime_type to uint32 constants. -const TRACK_CODEC_UNKNOWN: u32 = 0; -const TRACK_CODEC_AAC: u32 = 1; -const TRACK_CODEC_OPUS: u32 = 2; -const TRACK_CODEC_H264: u32 = 3; -const TRACK_CODEC_VP9: u32 = 4; - // These structs *must* match those declared in include/mp4parse.h. #[repr(C)] pub struct TrackInfo { track_type: u32, track_id: u32, - codec: u32, duration: u64, media_time: i64, // wants to be u64? understand how elst adjustment works // TODO(kinetik): include crypto guff @@ -181,14 +173,6 @@ pub unsafe extern "C" fn mp4parse_get_track_info(context: *mut MediaContext, tra TrackType::Unknown => return MP4PARSE_ERROR_UNSUPPORTED, }; - info.codec = match &*context.tracks[track_index].mime_type { - "audio/opus" => TRACK_CODEC_OPUS, - "video/vp9" => TRACK_CODEC_VP9, - "video/h264" => TRACK_CODEC_H264, - "audio/aac" => TRACK_CODEC_AAC, - _ => TRACK_CODEC_UNKNOWN, - }; - // Maybe context & track should just have a single simple is_valid() instead? if context.timescale.is_none() || context.tracks[track_index].timescale.is_none() || diff --git a/media/libstagefright/binding/update-rust.sh b/media/libstagefright/binding/update-rust.sh index a47aa4705257..137f735f7376 100755 --- a/media/libstagefright/binding/update-rust.sh +++ b/media/libstagefright/binding/update-rust.sh @@ -35,7 +35,6 @@ echo "Applying patches..." patch -p4 < byteorder-mod.patch patch -p4 < mp4parse-mod.patch patch -p4 < mp4parse-thread.patch -patch -p4 < mp4parse-codecs.patch echo "Cleaning up..." rm -rf _upstream