OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_codec_player.h" | 5 #include "media/base/android/media_codec_player.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/barrier_closure.h" | 9 #include "base/barrier_closure.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 namespace media { | 35 namespace media { |
36 | 36 |
37 // MediaCodecPlayer implementation. | 37 // MediaCodecPlayer implementation. |
38 | 38 |
39 MediaCodecPlayer::MediaCodecPlayer( | 39 MediaCodecPlayer::MediaCodecPlayer( |
40 int player_id, | 40 int player_id, |
41 base::WeakPtr<MediaPlayerManager> manager, | 41 base::WeakPtr<MediaPlayerManager> manager, |
42 const OnDecoderResourcesReleasedCB& on_decoder_resources_released_cb, | 42 const OnDecoderResourcesReleasedCB& on_decoder_resources_released_cb, |
43 scoped_ptr<DemuxerAndroid> demuxer, | 43 scoped_ptr<DemuxerAndroid> demuxer, |
44 const GURL& frame_url) | 44 const GURL& frame_url, |
| 45 int session_id) |
45 : MediaPlayerAndroid(player_id, | 46 : MediaPlayerAndroid(player_id, |
46 manager.get(), | 47 manager.get(), |
47 on_decoder_resources_released_cb, | 48 on_decoder_resources_released_cb, |
48 frame_url), | 49 frame_url, |
| 50 session_id), |
49 ui_task_runner_(base::ThreadTaskRunnerHandle::Get()), | 51 ui_task_runner_(base::ThreadTaskRunnerHandle::Get()), |
50 demuxer_(std::move(demuxer)), | 52 demuxer_(std::move(demuxer)), |
51 state_(kStatePaused), | 53 state_(kStatePaused), |
52 interpolator_(&default_tick_clock_), | 54 interpolator_(&default_tick_clock_), |
53 pending_start_(false), | 55 pending_start_(false), |
54 pending_seek_(kNoTimestamp()), | 56 pending_seek_(kNoTimestamp()), |
55 cdm_registration_id_(0), | 57 cdm_registration_id_(0), |
56 key_is_required_(false), | 58 key_is_required_(false), |
57 key_is_added_(false), | 59 key_is_added_(false), |
58 media_weak_factory_(this) { | 60 media_weak_factory_(this) { |
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 RETURN_STRING(kStateWaitingForMediaCrypto); | 1417 RETURN_STRING(kStateWaitingForMediaCrypto); |
1416 RETURN_STRING(kStateWaitingForSeek); | 1418 RETURN_STRING(kStateWaitingForSeek); |
1417 RETURN_STRING(kStateError); | 1419 RETURN_STRING(kStateError); |
1418 } | 1420 } |
1419 return nullptr; // crash early | 1421 return nullptr; // crash early |
1420 } | 1422 } |
1421 | 1423 |
1422 #undef RETURN_STRING | 1424 #undef RETURN_STRING |
1423 | 1425 |
1424 } // namespace media | 1426 } // namespace media |
OLD | NEW |