Fixing build errors on Windows platform. Minor changes...
Review URL: http://webrtc-codereview.appspot.com/241004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@779 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -20,9 +20,9 @@ class PacketManipulatorTest: public PacketRelatedTest {
|
||||
protected:
|
||||
PacketReader packet_reader_;
|
||||
EncodedImage image_;
|
||||
static const double kNeverDropProbability = 0.0;
|
||||
static const double kAlwaysDropProbability = 1.0;
|
||||
static const int kBurstLength = 1;
|
||||
const double kNeverDropProbability = 0.0;
|
||||
const double kAlwaysDropProbability = 1.0;
|
||||
const int kBurstLength = 1;
|
||||
NetworkingConfig drop_config_;
|
||||
NetworkingConfig no_drop_config_;
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ TEST_F(PacketReaderTest, NormalLargeData) {
|
||||
// Test with empty data.
|
||||
TEST_F(PacketReaderTest, EmptyData) {
|
||||
const int kDataLengthInBytes = 0;
|
||||
WebRtc_UWord8 data[kDataLengthInBytes];
|
||||
WebRtc_UWord8 data[0];
|
||||
WebRtc_UWord8* data_pointer = data;
|
||||
reader_->InitializeReading(data, kDataLengthInBytes, kPacketSizeInBytes);
|
||||
EXPECT_EQ(kDataLengthInBytes, reader_->NextPacket(&data_pointer));
|
||||
|
||||
@@ -140,7 +140,7 @@ bool VideoProcessorImpl::ProcessFrame(int frame_number) {
|
||||
frame_type = kKeyFrame;
|
||||
}
|
||||
WebRtc_Word32 encode_result = encoder_->Encode(source_frame_, NULL,
|
||||
frame_type);
|
||||
&frame_type);
|
||||
if (encode_result != WEBRTC_VIDEO_CODEC_OK) {
|
||||
fprintf(stderr, "Failed to encode frame %d, return code: %d\n",
|
||||
frame_number, encode_result);
|
||||
|
||||
@@ -7,10 +7,14 @@
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#include <dirent.h> // for checking directory existence
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <sys/stat.h> // To check for directory existence.
|
||||
|
||||
#ifndef S_ISDIR // Not defined in stat.h on Windows.
|
||||
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#include "google/gflags.h"
|
||||
#include "packet_manipulator.h"
|
||||
@@ -100,13 +104,13 @@ int HandleCommandLineFlags(webrtc::test::TestConfig* config) {
|
||||
config->input_filename = FLAGS_input_filename;
|
||||
|
||||
// Verify the output dir exists:
|
||||
DIR* output_dir = opendir(FLAGS_output_dir.c_str());
|
||||
if (output_dir == NULL) {
|
||||
struct stat dir_info;
|
||||
if (!(stat(FLAGS_output_dir.c_str(), &dir_info) == 0 &&
|
||||
S_ISDIR(dir_info.st_mode))) {
|
||||
fprintf(stderr, "Cannot find output directory: %s\n",
|
||||
FLAGS_output_dir.c_str());
|
||||
FLAGS_output_dir.c_str());
|
||||
return 3;
|
||||
}
|
||||
closedir(output_dir);
|
||||
config->output_dir = FLAGS_output_dir;
|
||||
|
||||
// Manufacture an output filename if none was given:
|
||||
|
||||
Reference in New Issue
Block a user