Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/cast/test/utility/default_config.h" | 5 #include "media/cast/test/utility/default_config.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | |
| 7 #include "media/cast/transport/cast_transport_config.h" | 8 #include "media/cast/transport/cast_transport_config.h" |
| 8 | 9 |
| 10 namespace { | |
| 11 | |
| 12 void CreateVideoEncodeAccelerator(const base::Callback< | |
|
pwestin
2014/03/21 21:02:02
Use the proposed typedef
Alpha Left Google
2014/03/21 21:37:12
Done.
| |
| 13 void(scoped_refptr<base::SingleThreadTaskRunner>, | |
| 14 scoped_ptr<media::VideoEncodeAccelerator>)>& callback) { | |
| 15 // Do nothing. | |
| 16 } | |
| 17 | |
| 18 void CreateVideoEncodeMemory( | |
| 19 size_t size, | |
| 20 const base::Callback<void(scoped_ptr<base::SharedMemory>)>& callback) { | |
|
pwestin
2014/03/21 21:02:02
Use the proposed typedef
Alpha Left Google
2014/03/21 21:37:12
Done.
| |
| 21 // Do nothing. | |
| 22 } | |
| 23 | |
| 24 } // namespace | |
| 25 | |
| 9 namespace media { | 26 namespace media { |
| 10 namespace cast { | 27 namespace cast { |
| 11 | 28 |
| 12 AudioReceiverConfig GetDefaultAudioReceiverConfig() { | 29 AudioReceiverConfig GetDefaultAudioReceiverConfig() { |
| 13 AudioReceiverConfig config; | 30 AudioReceiverConfig config; |
| 14 config.feedback_ssrc = 1; | 31 config.feedback_ssrc = 1; |
| 15 config.incoming_ssrc = 2; | 32 config.incoming_ssrc = 2; |
| 16 config.rtp_payload_type = 127; | 33 config.rtp_payload_type = 127; |
| 17 config.rtcp_c_name = "audio_receiver@a.b.c.d"; | 34 config.rtcp_c_name = "audio_receiver@a.b.c.d"; |
| 18 config.use_external_decoder = false; | 35 config.use_external_decoder = false; |
| 19 config.frequency = 48000; | 36 config.frequency = 48000; |
| 20 config.channels = 2; | 37 config.channels = 2; |
| 21 config.codec = media::cast::transport::kOpus; | 38 config.codec = media::cast::transport::kOpus; |
| 22 return config; | 39 return config; |
| 23 } | 40 } |
| 24 | 41 |
| 25 VideoReceiverConfig GetDefaultVideoReceiverConfig() { | 42 VideoReceiverConfig GetDefaultVideoReceiverConfig() { |
| 26 VideoReceiverConfig config; | 43 VideoReceiverConfig config; |
| 27 config.feedback_ssrc = 12; | 44 config.feedback_ssrc = 12; |
| 28 config.incoming_ssrc = 11; | 45 config.incoming_ssrc = 11; |
| 29 config.rtp_payload_type = 96; | 46 config.rtp_payload_type = 96; |
| 30 config.rtcp_c_name = "video_receiver@a.b.c.d"; | 47 config.rtcp_c_name = "video_receiver@a.b.c.d"; |
| 31 config.use_external_decoder = false; | 48 config.use_external_decoder = false; |
| 32 config.codec = media::cast::transport::kVp8; | 49 config.codec = media::cast::transport::kVp8; |
| 33 return config; | 50 return config; |
| 34 } | 51 } |
| 35 | 52 |
| 53 CreateVideoEncodeAcceleratorCallback | |
| 54 CreateDefaultVideoEncodeAcceleratorCallback() { | |
| 55 return base::Bind(&CreateVideoEncodeAccelerator); | |
| 56 } | |
| 57 | |
| 58 CreateVideoEncodeMemoryCallback CreateDefaultVideoEncodeMemoryCallback() { | |
| 59 return base::Bind(&CreateVideoEncodeMemory); | |
| 60 } | |
| 61 | |
| 36 } // namespace cast | 62 } // namespace cast |
| 37 } // namespace media | 63 } // namespace media |
| OLD | NEW |