OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |