Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(657)

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 586493002: Fix media crash in layout test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 did_loading_progress_(false), 130 did_loading_progress_(false),
131 player_manager_(player_manager), 131 player_manager_(player_manager),
132 cdm_manager_(cdm_manager), 132 cdm_manager_(cdm_manager),
133 network_state_(WebMediaPlayer::NetworkStateEmpty), 133 network_state_(WebMediaPlayer::NetworkStateEmpty),
134 ready_state_(WebMediaPlayer::ReadyStateHaveNothing), 134 ready_state_(WebMediaPlayer::ReadyStateHaveNothing),
135 texture_id_(0), 135 texture_id_(0),
136 stream_id_(0), 136 stream_id_(0),
137 is_playing_(false), 137 is_playing_(false),
138 needs_establish_peer_(true), 138 needs_establish_peer_(true),
139 has_size_info_(false), 139 has_size_info_(false),
140 // Compositor thread does not exist in layout tests.
140 compositor_loop_( 141 compositor_loop_(
141 RenderThreadImpl::current()->compositor_message_loop_proxy()), 142 RenderThreadImpl::current()->compositor_message_loop_proxy()
143 ? RenderThreadImpl::current()->compositor_message_loop_proxy()
144 : base::MessageLoopProxy::current()),
142 stream_texture_factory_(factory), 145 stream_texture_factory_(factory),
143 needs_external_surface_(false), 146 needs_external_surface_(false),
144 video_frame_provider_client_(NULL), 147 video_frame_provider_client_(NULL),
145 pending_playback_(false), 148 pending_playback_(false),
146 player_type_(MEDIA_PLAYER_TYPE_URL), 149 player_type_(MEDIA_PLAYER_TYPE_URL),
147 is_remote_(false), 150 is_remote_(false),
148 media_log_(media_log), 151 media_log_(media_log),
149 web_cdm_(NULL), 152 web_cdm_(NULL),
150 allow_stored_credentials_(false), 153 allow_stored_credentials_(false),
151 is_local_resource_(false), 154 is_local_resource_(false),
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1827 1830
1828 bool WebMediaPlayerAndroid::IsHLSStream() const { 1831 bool WebMediaPlayerAndroid::IsHLSStream() const {
1829 std::string mime; 1832 std::string mime;
1830 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; 1833 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_;
1831 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) 1834 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime))
1832 return false; 1835 return false;
1833 return !mime.compare("application/x-mpegurl"); 1836 return !mime.compare("application/x-mpegurl");
1834 } 1837 }
1835 1838
1836 } // namespace content 1839 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698