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 "base/bind.h" |
8 #include "media/cast/transport/cast_transport_config.h" | 8 #include "media/cast/transport/cast_transport_config.h" |
9 | 9 |
10 namespace { | 10 namespace { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 config.rtcp_c_name = "video_receiver@a.b.c.d"; | 46 config.rtcp_c_name = "video_receiver@a.b.c.d"; |
47 config.rtp_max_delay_ms = kDefaultRtpMaxDelayMs; | 47 config.rtp_max_delay_ms = kDefaultRtpMaxDelayMs; |
48 config.rtp_payload_type = 96; | 48 config.rtp_payload_type = 96; |
49 config.frequency = kVideoFrequency; | 49 config.frequency = kVideoFrequency; |
50 config.channels = 1; | 50 config.channels = 1; |
51 config.max_frame_rate = kDefaultMaxFrameRate; | 51 config.max_frame_rate = kDefaultMaxFrameRate; |
52 config.codec = media::cast::transport::CODEC_VIDEO_VP8; | 52 config.codec = media::cast::transport::CODEC_VIDEO_VP8; |
53 return config; | 53 return config; |
54 } | 54 } |
55 | 55 |
| 56 AudioSenderConfig GetDefaultAudioSenderConfig() { |
| 57 FrameReceiverConfig recv_config = GetDefaultAudioReceiverConfig(); |
| 58 AudioSenderConfig config; |
| 59 config.ssrc = recv_config.incoming_ssrc; |
| 60 config.incoming_feedback_ssrc = recv_config.feedback_ssrc; |
| 61 config.rtp_payload_type = recv_config.rtp_payload_type; |
| 62 config.use_external_encoder = false; |
| 63 config.frequency = recv_config.frequency; |
| 64 config.channels = recv_config.channels; |
| 65 config.bitrate = kDefaultAudioEncoderBitrate; |
| 66 config.codec = recv_config.codec; |
| 67 config.target_playout_delay = |
| 68 base::TimeDelta::FromMilliseconds(kDefaultRtpMaxDelayMs); |
| 69 return config; |
| 70 } |
| 71 |
| 72 VideoSenderConfig GetDefaultVideoSenderConfig() { |
| 73 FrameReceiverConfig recv_config = GetDefaultVideoReceiverConfig(); |
| 74 VideoSenderConfig config; |
| 75 config.ssrc = recv_config.incoming_ssrc; |
| 76 config.incoming_feedback_ssrc = recv_config.feedback_ssrc; |
| 77 config.rtp_payload_type = recv_config.rtp_payload_type; |
| 78 config.use_external_encoder = false; |
| 79 config.width = 1280; |
| 80 config.height = 720; |
| 81 config.max_bitrate = 4000000; |
| 82 config.min_bitrate = 2000000; |
| 83 config.start_bitrate = 4000000; |
| 84 config.max_frame_rate = recv_config.max_frame_rate; |
| 85 config.max_number_of_video_buffers_used = 1; |
| 86 config.codec = recv_config.codec; |
| 87 config.number_of_encode_threads = 2; |
| 88 config.target_playout_delay = |
| 89 base::TimeDelta::FromMilliseconds(kDefaultRtpMaxDelayMs); |
| 90 return config; |
| 91 } |
| 92 |
56 CreateVideoEncodeAcceleratorCallback | 93 CreateVideoEncodeAcceleratorCallback |
57 CreateDefaultVideoEncodeAcceleratorCallback() { | 94 CreateDefaultVideoEncodeAcceleratorCallback() { |
58 return base::Bind(&CreateVideoEncodeAccelerator); | 95 return base::Bind(&CreateVideoEncodeAccelerator); |
59 } | 96 } |
60 | 97 |
61 CreateVideoEncodeMemoryCallback CreateDefaultVideoEncodeMemoryCallback() { | 98 CreateVideoEncodeMemoryCallback CreateDefaultVideoEncodeMemoryCallback() { |
62 return base::Bind(&CreateVideoEncodeMemory); | 99 return base::Bind(&CreateVideoEncodeMemory); |
63 } | 100 } |
64 | 101 |
65 } // namespace cast | 102 } // namespace cast |
66 } // namespace media | 103 } // namespace media |
OLD | NEW |