Bug 1377370. P3 - remove HLS related code from MediaResource.cpp. draft
authorJW Wang <jwwang@mozilla.com>
Fri, 30 Jun 2017 10:22:36 +0800
changeset 603211 898ac14860e27ccace5ee5dbe1a73eaa8587ff89
parent 603210 7814a37479c0c4a329fa519abff8a50caf34612d
child 603397 1e254ff8491084b66dfebbb2e1be03790c95ed11
push id66683
push userjwwang@mozilla.com
push dateMon, 03 Jul 2017 02:24:24 +0000
bugs1377370
milestone56.0a1
Bug 1377370. P3 - remove HLS related code from MediaResource.cpp. MozReview-Commit-ID: FnZEMNDjjmE
dom/media/MediaResource.cpp
--- a/dom/media/MediaResource.cpp
+++ b/dom/media/MediaResource.cpp
@@ -28,20 +28,16 @@
 #include "nsICachingChannel.h"
 #include "nsIAsyncVerifyRedirectCallback.h"
 #include "nsContentUtils.h"
 #include "nsHostObjectProtocolHandler.h"
 #include <algorithm>
 #include "nsProxyRelease.h"
 #include "nsIContentPolicy.h"
 
-#ifdef MOZ_ANDROID_HLS_SUPPORT
-#include "HLSResource.h"
-#endif
-
 using mozilla::media::TimeUnit;
 
 #undef LOG
 #undef ILOG
 
 mozilla::LazyLogModule gMediaResourceLog("MediaResource");
 // Debug logging macro with object pointer and class name.
 #define LOG(msg, ...) MOZ_LOG(gMediaResourceLog, mozilla::LogLevel::Debug, \
@@ -1434,23 +1430,16 @@ MediaResource::Create(MediaResourceCallb
   aChannel->GetContentType(contentTypeString);
   Maybe<MediaContainerType> containerType = MakeMediaContainerType(contentTypeString);
   if (!containerType) {
     return nullptr;
   }
 
   RefPtr<MediaResource> resource;
 
-#ifdef MOZ_ANDROID_HLS_SUPPORT
-  if (DecoderTraits::IsHttpLiveStreamingType(containerType.value())) {
-    resource = new HLSResource(aCallback, aChannel, uri);
-    return resource.forget();
-  }
-#endif
-
   // Let's try to create a FileMediaResource in case the channel is a nsIFile
   nsCOMPtr<nsIFileChannel> fc = do_QueryInterface(aChannel);
   if (fc) {
     resource = new FileMediaResource(aCallback, aChannel, uri);
   }
 
   // If the URL is blobURL with a seekable inputStream, we can still use a
   // FileMediaResource. This basically means that the blobURL and its Blob have