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 22 matching lines...) Expand all Loading... |
33 } while (0) | 33 } while (0) |
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 std::unique_ptr<DemuxerAndroid> demuxer, |
44 const GURL& frame_url, | 44 const GURL& frame_url, |
45 int media_session_id) | 45 int media_session_id) |
46 : MediaPlayerAndroid(player_id, | 46 : MediaPlayerAndroid(player_id, |
47 manager.get(), | 47 manager.get(), |
48 on_decoder_resources_released_cb, | 48 on_decoder_resources_released_cb, |
49 frame_url, | 49 frame_url, |
50 media_session_id), | 50 media_session_id), |
51 ui_task_runner_(base::ThreadTaskRunnerHandle::Get()), | 51 ui_task_runner_(base::ThreadTaskRunnerHandle::Get()), |
52 demuxer_(std::move(demuxer)), | 52 demuxer_(std::move(demuxer)), |
53 state_(kStatePaused), | 53 state_(kStatePaused), |
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1419 RETURN_STRING(kStateWaitingForMediaCrypto); | 1419 RETURN_STRING(kStateWaitingForMediaCrypto); |
1420 RETURN_STRING(kStateWaitingForSeek); | 1420 RETURN_STRING(kStateWaitingForSeek); |
1421 RETURN_STRING(kStateError); | 1421 RETURN_STRING(kStateError); |
1422 } | 1422 } |
1423 return nullptr; // crash early | 1423 return nullptr; // crash early |
1424 } | 1424 } |
1425 | 1425 |
1426 #undef RETURN_STRING | 1426 #undef RETURN_STRING |
1427 | 1427 |
1428 } // namespace media | 1428 } // namespace media |
OLD | NEW |