diff --git a/webrtc/modules/audio_coding/main/acm2/acm_dump.cc b/webrtc/modules/audio_coding/main/acm2/acm_dump.cc index 3fc055723a..9c624d97b6 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_dump.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_dump.cc @@ -18,12 +18,14 @@ #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" #include "webrtc/system_wrappers/interface/file_wrapper.h" +#ifdef RTC_AUDIOCODING_DEBUG_DUMP // Files generated at build-time by the protobuf compiler. #ifdef WEBRTC_ANDROID_PLATFORM_BUILD #include "external/webrtc/webrtc/modules/audio_coding/dump.pb.h" #else #include "webrtc/audio_coding/dump.pb.h" #endif +#endif namespace webrtc { @@ -213,13 +215,6 @@ void AcmDumpImpl::AddRecentEvent(const ACMDumpEvent& event) { } } -#endif // RTC_AUDIOCODING_DEBUG_DUMP - -// AcmDump member functions. -rtc::scoped_ptr AcmDump::Create() { - return rtc::scoped_ptr(new AcmDumpImpl()); -} - bool AcmDump::ParseAcmDump(const std::string& file_name, ACMDumpEventStream* result) { char tmp_buffer[1024]; @@ -236,4 +231,10 @@ bool AcmDump::ParseAcmDump(const std::string& file_name, return result->ParseFromString(dump_buffer); } +#endif // RTC_AUDIOCODING_DEBUG_DUMP + +// AcmDump member functions. +rtc::scoped_ptr AcmDump::Create() { + return rtc::scoped_ptr(new AcmDumpImpl()); +} } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module.gypi b/webrtc/modules/audio_coding/main/acm2/audio_coding_module.gypi index c78bcd74fe..13b1d4e73f 100644 --- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module.gypi +++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module.gypi @@ -78,25 +78,13 @@ 'nack.h', ], }, - { - 'target_name': 'acm_dump_proto', - 'type': 'static_library', - 'sources': ['dump.proto',], - 'variables': { - 'proto_in_dir': '.', - # Workaround to protect against gyp's pathname relativization when - # this file is included by modules.gyp. - 'proto_out_protected': 'webrtc/audio_coding', - 'proto_out_dir': '<(proto_out_protected)', - }, - 'includes': ['../../../../build/protoc.gypi',], - }, { 'target_name': 'acm_dump', 'type': 'static_library', 'conditions': [ ['enable_protobuf==1', { 'defines': ['RTC_AUDIOCODING_DEBUG_DUMP'], + 'dependencies': ['acm_dump_proto'], } ], ], @@ -104,10 +92,26 @@ 'acm_dump.h', 'acm_dump.cc' ], - 'dependencies': ['acm_dump_proto'], }, ], 'conditions': [ + ['enable_protobuf==1', { + 'targets': [ + { + 'target_name': 'acm_dump_proto', + 'type': 'static_library', + 'sources': ['dump.proto',], + 'variables': { + 'proto_in_dir': '.', + # Workaround to protect against gyp's pathname relativization when + # this file is included by modules.gyp. + 'proto_out_protected': 'webrtc/audio_coding', + 'proto_out_dir': '<(proto_out_protected)', + }, + 'includes': ['../../../../build/protoc.gypi',], + }, + ] + }], ['include_tests==1', { 'targets': [ {