Backed out changeset 4832e93e168e (bug 1086198) for bustage
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 24 Oct 2014 14:10:21 +0200
changeset 212197 f5f34e4b24c17dd0e8ba47b6a5da39d70115c552
parent 212196 19c38453850fcdb0eadd935aa8ba89d286f1162c
child 212198 5dea1dac3cbb1d827caf6d6a3de8133b720e621d
push id9560
push userkwierso@gmail.com
push dateFri, 24 Oct 2014 22:09:23 +0000
treeherderfx-team@c70f62375f7d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1086198
milestone36.0a1
backs out4832e93e168ecea1618f8a6d496cc52080610a34
Backed out changeset 4832e93e168e (bug 1086198) for bustage
content/media/RtspMediaResource.cpp
netwerk/base/public/nsIStreamingProtocolController.idl
--- a/content/media/RtspMediaResource.cpp
+++ b/content/media/RtspMediaResource.cpp
@@ -683,24 +683,24 @@ RtspMediaResource::OnConnected(uint8_t a
   // video, we give up moving forward.
   if (!IsVideoEnabled() && IsVideo(tracks, meta)) {
     // Give up, report error to media element.
     nsCOMPtr<nsIRunnable> event =
       NS_NewRunnableMethod(mDecoder, &MediaDecoder::DecodeError);
     NS_DispatchToMainThread(event);
     return NS_ERROR_FAILURE;
   }
-  uint64_t durationUs = 0;
+  uint64_t duration = 0;
   for (int i = 0; i < tracks; ++i) {
     nsCString rtspTrackId("RtspTrack");
     rtspTrackId.AppendInt(i);
     nsCOMPtr<nsIStreamingProtocolMetaData> trackMeta;
     mMediaStreamController->GetTrackMetaData(i, getter_AddRefs(trackMeta));
     MOZ_ASSERT(trackMeta);
-    trackMeta->GetDuration(&durationUs);
+    trackMeta->GetDuration(&duration);
 
     // Here is a heuristic to estimate the slot size.
     // For video track, calculate the width*height.
     // For audio track, use the BUFFER_SLOT_DEFAULT_SIZE because the w*h is 0.
     // Finally clamp them into (BUFFER_SLOT_DEFAULT_SIZE,BUFFER_SLOT_MAX_SIZE)
     uint32_t w, h;
     uint32_t slotSize;
     trackMeta->GetWidth(&w);
@@ -711,22 +711,22 @@ RtspMediaResource::OnConnected(uint8_t a
                                                    i, slotSize));
     mTrackBuffer[i]->Start();
   }
 
   if (!mDecoder) {
     return NS_ERROR_FAILURE;
   }
 
-  // If the durationUs is 0, imply the stream is live stream.
-  if (durationUs) {
+  // If the duration is 0, imply the stream is live stream.
+  if (duration) {
     // Not live stream.
     mRealTime = false;
     mDecoder->SetInfinite(false);
-    mDecoder->SetDuration((double)(durationUs) / USECS_PER_S);
+    mDecoder->SetDuration(duration);
   } else {
     // Live stream.
     // Check the preference "media.realtime_decoder.enabled".
     if (!Preferences::GetBool("media.realtime_decoder.enabled", false)) {
       // Give up, report error to media element.
       nsCOMPtr<nsIRunnable> event =
         NS_NewRunnableMethod(mDecoder, &MediaDecoder::DecodeError);
       NS_DispatchToMainThread(event);
--- a/netwerk/base/public/nsIStreamingProtocolController.idl
+++ b/netwerk/base/public/nsIStreamingProtocolController.idl
@@ -40,17 +40,17 @@ interface nsIStreamingProtocolMetaData :
     attribute unsigned long width;
 
     /**
      * The height of the resolution.
      */
     attribute unsigned long height;
 
     /**
-     * The duration of the media stream in units of microseconds.
+     * The duration of the media stream.
      */
     attribute unsigned long long duration;
 
     /**
      * The sample rate of the media stream.
      */
     attribute unsigned long sampleRate;