| OLD | NEW |
| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/test/simple_test_tick_clock.h" | 8 #include "base/test/simple_test_tick_clock.h" |
| 9 #include "media/cast/audio_receiver/audio_receiver.h" | 9 #include "media/cast/audio_receiver/audio_receiver.h" |
| 10 #include "media/cast/cast_defines.h" | 10 #include "media/cast/cast_defines.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 NULL, NULL); | 45 NULL, NULL); |
| 46 } | 46 } |
| 47 | 47 |
| 48 void Configure(bool use_external_decoder) { | 48 void Configure(bool use_external_decoder) { |
| 49 audio_config_.use_external_decoder = use_external_decoder; | 49 audio_config_.use_external_decoder = use_external_decoder; |
| 50 receiver_.reset(new | 50 receiver_.reset(new |
| 51 PeerAudioReceiver(cast_thread_, audio_config_, &mock_transport_)); | 51 PeerAudioReceiver(cast_thread_, audio_config_, &mock_transport_)); |
| 52 receiver_->set_clock(&testing_clock_); | 52 receiver_->set_clock(&testing_clock_); |
| 53 } | 53 } |
| 54 | 54 |
| 55 ~AudioReceiverTest() {} | 55 virtual ~AudioReceiverTest() {} |
| 56 | 56 |
| 57 virtual void SetUp() { | 57 virtual void SetUp() { |
| 58 payload_.assign(kPacketSize, 0); | 58 payload_.assign(kPacketSize, 0); |
| 59 // Always start with a key frame. | 59 // Always start with a key frame. |
| 60 rtp_header_.is_key_frame = true; | 60 rtp_header_.is_key_frame = true; |
| 61 rtp_header_.frame_id = 0; | 61 rtp_header_.frame_id = 0; |
| 62 rtp_header_.packet_id = 0; | 62 rtp_header_.packet_id = 0; |
| 63 rtp_header_.max_packet_id = 0; | 63 rtp_header_.max_packet_id = 0; |
| 64 rtp_header_.is_reference = false; | 64 rtp_header_.is_reference = false; |
| 65 rtp_header_.reference_frame_id = 0; | 65 rtp_header_.reference_frame_id = 0; |
| 66 } | 66 } |
| 67 | 67 |
| 68 AudioReceiverConfig audio_config_; | 68 AudioReceiverConfig audio_config_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 86 EXPECT_EQ(kPcm16, audio_frame.codec); | 86 EXPECT_EQ(kPcm16, audio_frame.codec); |
| 87 task_runner_->RunTasks(); | 87 task_runner_->RunTasks(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 // TODO(mikhal): Add encoded frames. | 90 // TODO(mikhal): Add encoded frames. |
| 91 TEST_F(AudioReceiverTest, GetRawFrame) { | 91 TEST_F(AudioReceiverTest, GetRawFrame) { |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace cast | 94 } // namespace cast |
| 95 } // namespace media | 95 } // namespace media |
| OLD | NEW |