Switch C++-style C headers with their C equivalents.
The C++ headers define the C functions within the std:: namespace, but we mainly don't use the std:: namespace for C functions. Therefore we should include the C headers. BUG=1833 R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1917004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4486 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -10,8 +10,8 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_PACKET_MANIPULATOR_H_
|
||||
#define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_PACKET_MANIPULATOR_H_
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
|
||||
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/codecs/test/predictive_packet_manipulator.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "webrtc/test/testsupport/packet_reader.h"
|
||||
|
||||
|
||||
@ -10,9 +10,10 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/codecs/test/stats.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <algorithm> // min_element, max_element
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
@ -10,8 +10,9 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/codecs/test/videoprocessor.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@ -10,7 +10,8 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/codecs/test_framework/benchmark.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <assert.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
@ -8,9 +8,11 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "webrtc/modules/video_coding/codecs/test_framework/packet_loss_test.h"
|
||||
#include "webrtc/modules/video_coding/codecs/test_framework/video_source.h"
|
||||
|
||||
|
||||
@ -10,7 +10,8 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/codecs/test_framework/test.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <string.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
||||
@ -31,7 +32,7 @@ _description(description)
|
||||
{
|
||||
memset(&_inst, 0, sizeof(_inst));
|
||||
unsigned int seed = static_cast<unsigned int>(0);
|
||||
std::srand(seed);
|
||||
srand(seed);
|
||||
}
|
||||
|
||||
CodecTest::CodecTest(std::string name, std::string description,
|
||||
@ -46,7 +47,7 @@ _description(description)
|
||||
{
|
||||
memset(&_inst, 0, sizeof(_inst));
|
||||
unsigned int seed = static_cast<unsigned int>(0);
|
||||
std::srand(seed);
|
||||
srand(seed);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@ -11,9 +11,11 @@
|
||||
#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_FRAWEWORK_TEST_H_
|
||||
#define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_FRAWEWORK_TEST_H_
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/modules/interface/module_common_types.h"
|
||||
#include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
|
||||
|
||||
|
||||
@ -8,12 +8,11 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/modules/video_coding/codecs/test_framework/unit_test.h"
|
||||
#include "webrtc/modules/video_coding/codecs/test_framework/video_source.h"
|
||||
|
||||
@ -8,13 +8,13 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <sys/stat.h> // To check for directory existence.
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
|
||||
#ifndef S_ISDIR // Not defined in stat.h on Windows.
|
||||
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/main/source/frame_buffer.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "webrtc/modules/video_coding/main/source/packet.h"
|
||||
|
||||
@ -9,8 +9,9 @@
|
||||
*/
|
||||
#include "webrtc/modules/video_coding/main/source/jitter_buffer.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <utility>
|
||||
|
||||
#include "webrtc/modules/video_coding/main/interface/video_coding.h"
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
#ifndef WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPT_UTIL_H_
|
||||
#define WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPT_UTIL_H_
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "webrtc/modules/video_coding/main/source/internal_defines.h"
|
||||
#include "webrtc/modules/video_coding/main/source/qm_select.h"
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include "webrtc/modules/video_coding/main/source/rtt_filter.h"
|
||||
#include "webrtc/system_wrappers/interface/trace.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@ -8,9 +8,10 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
#include "webrtc/modules/video_coding/main/interface/video_coding.h"
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/main/test/generic_codec_test.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "webrtc/common_video/interface/i420_video_frame.h"
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctime>
|
||||
#include <time.h>
|
||||
#include "JitterEstimateTest.h"
|
||||
|
||||
using namespace webrtc;
|
||||
@ -25,8 +25,8 @@ _counter(0),
|
||||
_lossrate(0.0)
|
||||
{
|
||||
// Assign to random value between 0 and max of unsigned int
|
||||
_seed = static_cast<unsigned>(std::time(0));
|
||||
std::srand(_seed);
|
||||
_seed = static_cast<unsigned>(time(0));
|
||||
srand(_seed);
|
||||
_prevTimestamp = static_cast<unsigned int>((std::rand() + 1.0)/(RAND_MAX + 1.0)*(pow((float) 2, (long) sizeof(unsigned int)*8)-1));
|
||||
_prevWallClock = VCMTickTime::MillisecondTimestamp();
|
||||
}
|
||||
|
||||
@ -14,8 +14,8 @@
|
||||
#include "typedefs.h"
|
||||
#include "jitter_buffer.h"
|
||||
#include "jitter_estimator.h"
|
||||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
double const pi = 4*std::atan(1.0);
|
||||
|
||||
@ -28,7 +28,7 @@ public:
|
||||
{
|
||||
double r1 = (std::rand() + 1.0)/(RAND_MAX + 1.0); // gives equal distribution in (0, 1]
|
||||
double r2 = (std::rand() + 1.0)/(RAND_MAX + 1.0);
|
||||
return _mu + _sigma * std::sqrt(-2*std::log(r1))*std::cos(2*pi*r2);
|
||||
return _mu + _sigma * sqrt(-2*std::log(r1))*std::cos(2*pi*r2);
|
||||
}
|
||||
|
||||
double GetAverage()
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/main/test/mt_test_common.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <math.h>
|
||||
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
|
||||
#include "webrtc/modules/utility/interface/rtp_dump.h"
|
||||
|
||||
@ -16,8 +16,9 @@
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "webrtc/modules/video_coding/main/test/rtp_player.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
|
||||
@ -10,7 +10,8 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/main/test/rtp_player.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/main/test/test_callbacks.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <math.h>
|
||||
|
||||
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
|
||||
|
||||
@ -16,10 +16,11 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <list>
|
||||
#include <string.h>
|
||||
|
||||
#include "webrtc/modules/interface/module_common_types.h"
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
#ifndef VCM_TEST_MACROS_H
|
||||
#define VCM_TEST_MACROS_H
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
extern int vcmMacrosTests;
|
||||
extern int vcmMacrosErrors;
|
||||
|
||||
@ -10,8 +10,9 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/main/test/test_util.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@ -10,8 +10,9 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
|
||||
#include "webrtc/modules/video_coding/main/test/test_util.h"
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include <assert.h>
|
||||
|
||||
#include "webrtc/modules/video_coding/main/test/receiver_tests.h"
|
||||
#include "webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.h"
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "webrtc/modules/video_coding/main/test/video_source.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <assert.h>
|
||||
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user