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

Side by Side Diff: media/base/android/media_source_player.cc

Issue 2338223003: Unassociating MediaSession from media players (in blink & content) (Closed)
Patch Set: fixed tests Created 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "media/base/android/media_source_player.h" 5 #include "media/base/android/media_source_player.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <limits> 9 #include <limits>
10 #include <utility> 10 #include <utility>
(...skipping 17 matching lines...) Expand all
28 #include "media/base/bind_to_current_loop.h" 28 #include "media/base/bind_to_current_loop.h"
29 #include "media/base/timestamp_constants.h" 29 #include "media/base/timestamp_constants.h"
30 30
31 namespace media { 31 namespace media {
32 32
33 MediaSourcePlayer::MediaSourcePlayer( 33 MediaSourcePlayer::MediaSourcePlayer(
34 int player_id, 34 int player_id,
35 MediaPlayerManager* manager, 35 MediaPlayerManager* manager,
36 const OnDecoderResourcesReleasedCB& on_decoder_resources_released_cb, 36 const OnDecoderResourcesReleasedCB& on_decoder_resources_released_cb,
37 std::unique_ptr<DemuxerAndroid> demuxer, 37 std::unique_ptr<DemuxerAndroid> demuxer,
38 const GURL& frame_url, 38 const GURL& frame_url)
39 int media_session_id)
40 : MediaPlayerAndroid(player_id, 39 : MediaPlayerAndroid(player_id,
41 manager, 40 manager,
42 on_decoder_resources_released_cb, 41 on_decoder_resources_released_cb,
43 frame_url, 42 frame_url),
44 media_session_id),
45 demuxer_(std::move(demuxer)), 43 demuxer_(std::move(demuxer)),
46 pending_event_(NO_EVENT_PENDING), 44 pending_event_(NO_EVENT_PENDING),
47 playing_(false), 45 playing_(false),
48 interpolator_(&default_tick_clock_), 46 interpolator_(&default_tick_clock_),
49 doing_browser_seek_(false), 47 doing_browser_seek_(false),
50 pending_seek_(false), 48 pending_seek_(false),
51 cdm_registration_id_(0), 49 cdm_registration_id_(0),
52 is_waiting_for_key_(false), 50 is_waiting_for_key_(false),
53 key_added_while_decode_pending_(false), 51 key_added_while_decode_pending_(false),
54 is_waiting_for_audio_decoder_(false), 52 is_waiting_for_audio_decoder_(false),
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 is_waiting_for_key_ = false; 856 is_waiting_for_key_ = false;
859 key_added_while_decode_pending_ = false; 857 key_added_while_decode_pending_ = false;
860 858
861 // StartInternal() will trigger a prefetch, where in most cases we'll just 859 // StartInternal() will trigger a prefetch, where in most cases we'll just
862 // use previously received data. 860 // use previously received data.
863 if (playing_) 861 if (playing_)
864 StartInternal(); 862 StartInternal();
865 } 863 }
866 864
867 } // namespace media 865 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_source_player.h ('k') | media/base/android/media_source_player_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698