Replace ExtraCodecOptions with new Config class that supports multiple settings at once.
R=niklas.enbom@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1452004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4017 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/common_types.h b/webrtc/common_types.h
index 5001da2..525dcf9 100644
--- a/webrtc/common_types.h
+++ b/webrtc/common_types.h
@@ -35,6 +35,8 @@
namespace webrtc {
+class Config;
+
class InStream
{
public:
@@ -534,11 +536,6 @@
kScreensharing
};
-// When using an external encoder/decoder one may need to specify extra
-// options. This struct definition is left for the external implementation.
-// TODO(andresp): Support for multiple external encoder/decoders.
-struct ExtraCodecOptions;
-
// Common video codec properties
struct VideoCodec
{
@@ -561,7 +558,10 @@
SimulcastStream simulcastStream[kMaxSimulcastStreams];
VideoCodecMode mode;
- ExtraCodecOptions* extra_options;
+
+ // When using an external encoder/decoder this allows to pass
+ // extra options without requiring webrtc to be aware of them.
+ Config* extra_options;
};
// Bandwidth over-use detector options. These are used to drive
diff --git a/webrtc/modules/audio_coding/main/test/delay_test.cc b/webrtc/modules/audio_coding/main/test/delay_test.cc
index 2cc1661..bfe6128 100644
--- a/webrtc/modules/audio_coding/main/test/delay_test.cc
+++ b/webrtc/modules/audio_coding/main/test/delay_test.cc
@@ -37,7 +37,6 @@
DEFINE_bool(dtx, false, "Enable DTX at the sender side.");
namespace webrtc {
-
namespace {
struct CodecConfig {
@@ -57,7 +56,6 @@
bool packet_loss;
};
-}
class DelayTest {
public:
@@ -242,13 +240,8 @@
int encoding_sample_rate_hz_;
};
-} // namespace webrtc
-
-int main(int argc, char* argv[]) {
-
- google::ParseCommandLineFlags(&argc, &argv, true);
-
- webrtc::Config config;
+void RunTest() {
+ Config config;
strcpy(config.codec.name, FLAGS_codec.c_str());
config.codec.sample_rate_hz = FLAGS_sample_rate_hz;
config.codec.num_channels = FLAGS_num_channels;
@@ -256,8 +249,16 @@
config.acm.fec = false;
config.packet_loss = false;
- webrtc::DelayTest delay_test;
+ DelayTest delay_test;
delay_test.SetUp();
delay_test.Perform(&config, 1, 240, "delay_test");
delay_test.TearDown();
}
+} // namespace
+} // namespace webrtc
+
+int main(int argc, char* argv[]) {
+ using namespace webrtc;
+ google::ParseCommandLineFlags(&argc, &argv, true);
+ RunTest();
+}