Backed out changeset 9fd0316dcd1b (bug 1016413) for crashes during e10s test_metadata.html
authorEd Morley <emorley@mozilla.com>
Thu, 19 Jun 2014 16:35:00 +0100
changeset 189617 aa52cfb29acbcfb650d8642a244487d19bc2419c
parent 189616 11c7ff019582deefe823b1eb892355c83f04cdb5
child 189618 3e7098e4cc46ca5a5976fd8b9af65a9e5a057566
push id26992
push userkwierso@gmail.com
push dateFri, 20 Jun 2014 01:07:53 +0000
treeherdermozilla-central@bdac18bd6c74 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1016413
milestone33.0a1
backs out9fd0316dcd1bd4e7fb8d1aa5fe1a08f5d3a0a2e3
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
Backed out changeset 9fd0316dcd1b (bug 1016413) for crashes during e10s test_metadata.html
content/media/fmp4/MP4Reader.cpp
media/libstagefright/binding/include/mp4_demuxer/mp4_demuxer.h
media/libstagefright/binding/mp4_demuxer.cpp
--- a/content/media/fmp4/MP4Reader.cpp
+++ b/content/media/fmp4/MP4Reader.cpp
@@ -245,17 +245,17 @@ MP4Reader::ReadMetadata(MediaInfo* aInfo
   }
   // We can seek if we get a duration *and* the reader reports that it's
   // seekable.
   if (!mDecoder->GetResource()->IsTransportSeekable() || !mDemuxer->CanSeek()) {
     mDecoder->SetMediaSeekable(false);
   }
 
   *aInfo = mInfo;
-  *aTags = mDemuxer->GetTags();
+  *aTags = nullptr;
 
   return NS_OK;
 }
 
 bool
 MP4Reader::HasAudio()
 {
   return mAudio.mActive;
--- a/media/libstagefright/binding/include/mp4_demuxer/mp4_demuxer.h
+++ b/media/libstagefright/binding/include/mp4_demuxer/mp4_demuxer.h
@@ -3,17 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef MP4_DEMUXER_H_
 #define MP4_DEMUXER_H_
 
 #include "nsAutoPtr.h"
 #include "mozilla/gfx/Rect.h"
 #include "mp4_demuxer/DecoderData.h"
-#include "AbstractMediaDecoder.h"
 
 namespace mp4_demuxer
 {
 
 struct StageFrightPrivate;
 typedef int64_t Microseconds;
 
 class Stream
@@ -34,17 +33,16 @@ class MP4Demuxer
 public:
   MP4Demuxer(Stream* aSource);
   ~MP4Demuxer();
 
   bool Init();
   Microseconds Duration();
   bool CanSeek();
 
-  mozilla::MetadataTags* GetTags();
   bool HasValidAudio();
   bool HasValidVideo();
 
   void SeekAudio(Microseconds aTime);
   void SeekVideo(Microseconds aTime);
 
   // DemuxAudioSample and DemuxVideoSample functions return nullptr on end of
   // stream or error.
--- a/media/libstagefright/binding/mp4_demuxer.cpp
+++ b/media/libstagefright/binding/mp4_demuxer.cpp
@@ -3,48 +3,24 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "include/MPEG4Extractor.h"
 #include "media/stagefright/DataSource.h"
 #include "media/stagefright/MediaSource.h"
 #include "media/stagefright/MetaData.h"
 #include "mp4_demuxer/Adts.h"
 #include "mp4_demuxer/mp4_demuxer.h"
-#include "mozilla/ArrayUtils.h"
+
 #include <stdint.h>
 
 using namespace stagefright;
 
 namespace mp4_demuxer
 {
 
-struct tagmap {
-  const uint32_t key;
-  const char* name;
-};
-
-const struct tagmap keys[] = {
-  { kKeyAlbum, "album" },
-  { kKeyArtist, "artist" },
-  { kKeyAlbumArtist, "albumArtist" },
-  { kKeyComposer, "composer" },
-  { kKeyGenre, "genre" },
-  { kKeyTitle, "title" },
-  { kKeyYear, "year" },
-  { kKeyAlbumArt, "albumArt" },
-  { kKeyAlbumArtMIME, "albumArtMIME" },
-  { kKeyAuthor, "author" },
-  { kKeyCDTrackNumber, "cdTrackNumber" },
-  { kKeyDiscNumber, "discNumber" },
-  { kKeyDate, "date" },
-  { kKeyWriter, "writer" },
-  { kKeyCompilation, "compilation" },
-  { kKeyLocation, "location" },
-};
-
 struct StageFrightPrivate
 {
   sp<MPEG4Extractor> mExtractor;
 
   sp<MediaSource> mAudio;
   MediaSource::ReadOptions mAudioOptions;
 
   sp<MediaSource> mVideo;
@@ -99,38 +75,16 @@ MP4Demuxer::~MP4Demuxer()
   if (mPrivate->mAudio.get()) {
     mPrivate->mAudio->stop();
   }
   if (mPrivate->mVideo.get()) {
     mPrivate->mVideo->stop();
   }
 }
 
-mozilla::MetadataTags*
-MP4Demuxer::GetTags()
-{
-  mozilla::MetadataTags* tags = new mozilla::MetadataTags;
-  sp<MetaData> metaData = mPrivate->mExtractor->getMetaData();
-  const char* value = nullptr;
-  nsCString cstringValue;
-  size_t key_count = mozilla::ArrayLength(keys);
-
-  for (size_t i = 0; i < key_count; i++) {
-    if (metaData->findCString(keys[i].key, &value)) {
-      MOZ_ASSERT(value);
-      cstringValue = nsCString(value);
-      if (IsUTF8(cstringValue)) {
-        tags->Put(nsCString(keys[i].name), cstringValue);
-      }
-    }
-  }
-
-  return tags;
-}
-
 bool
 MP4Demuxer::Init()
 {
   sp<MediaExtractor> e = mPrivate->mExtractor;
   for (size_t i = 0; i < e->countTracks(); i++) {
     sp<MetaData> metaData = e->getTrackMetaData(i);
 
     const char* mimeType;