Normalize main(..) routines for WinUWP
In order to support WinUWP platform, all main(..) routines must be normalized to the formal int main(int argc, char* argv[]) form. A platform wrapper main is auto-created linking against the default main(...). This can only work if the linkage is exactly matching the proper formal definition and not a loosely defined main(...) alternative. Bug: webrtc:8608 Change-Id: I606663aaea7df1792c7c5636279617b8926fa5cc Reviewed-on: https://webrtc-review.googlesource.com/28721 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21229}
This commit is contained in:

committed by
Patrik Höglund

parent
818d910392
commit
1c62ffa530
1
AUTHORS
1
AUTHORS
@ -68,6 +68,7 @@ Intel Corporation <*@intel.com>
|
|||||||
MIPS Technologies <*@mips.com>
|
MIPS Technologies <*@mips.com>
|
||||||
Mozilla Foundation <*@mozilla.com>
|
Mozilla Foundation <*@mozilla.com>
|
||||||
Opera Software ASA <*@opera.com>
|
Opera Software ASA <*@opera.com>
|
||||||
|
Optical Tone Ltd <*@opticaltone.com>
|
||||||
Sinch AB <*@sinch.com>
|
Sinch AB <*@sinch.com>
|
||||||
struktur AG <*@struktur.de>
|
struktur AG <*@struktur.de>
|
||||||
Telenor Digital AS <*@telenor.com>
|
Telenor Digital AS <*@telenor.com>
|
||||||
|
@ -46,7 +46,7 @@ void HandleBrowserRequest(DataSocket* ds, bool* quit) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char* argv[]) {
|
||||||
std::string program_name = argv[0];
|
std::string program_name = argv[0];
|
||||||
std::string usage = "Example usage: " + program_name + " --port=8888";
|
std::string usage = "Example usage: " + program_name + " --port=8888";
|
||||||
webrtc::test::CommandLineParser parser;
|
webrtc::test::CommandLineParser parser;
|
||||||
|
@ -100,7 +100,7 @@ void StopTrial(rtc::Thread* thread, StunProber* prober, int result) {
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char* argv[]) {
|
||||||
rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
|
rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
|
||||||
if (FLAG_help) {
|
if (FLAG_help) {
|
||||||
rtc::FlagList::Print(nullptr, false);
|
rtc::FlagList::Print(nullptr, false);
|
||||||
|
@ -41,7 +41,7 @@ class TurnFileAuth : public cricket::TurnAuthInterface {
|
|||||||
rtc::OptionsFile file_;
|
rtc::OptionsFile file_;
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char* argv[]) {
|
||||||
if (argc != 5) {
|
if (argc != 5) {
|
||||||
std::cerr << "usage: turnserver int-addr ext-ip realm auth-file"
|
std::cerr << "usage: turnserver int-addr ext-ip realm auth-file"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
@ -455,4 +455,5 @@ int main(int argc, char* argv[])
|
|||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -677,5 +677,5 @@ int RunTest(int argc, char* argv[]) {
|
|||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
webrtc::test::RunTest(argc, argv);
|
return webrtc::test::RunTest(argc, argv);
|
||||||
}
|
}
|
||||||
|
@ -319,4 +319,5 @@ int main(int argc, char* argv[]) {
|
|||||||
test.TearDown();
|
test.TearDown();
|
||||||
if (delay_log != NULL)
|
if (delay_log != NULL)
|
||||||
fclose(delay_log);
|
fclose(delay_log);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ class Observer : public webrtc::RemoteBitrateObserver {
|
|||||||
webrtc::Clock* clock_;
|
webrtc::Clock* clock_;
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char* argv[]) {
|
||||||
webrtc::test::RtpFileReader* reader;
|
webrtc::test::RtpFileReader* reader;
|
||||||
webrtc::RemoteBitrateEstimator* estimator;
|
webrtc::RemoteBitrateEstimator* estimator;
|
||||||
webrtc::RtpHeaderParser* parser;
|
webrtc::RtpHeaderParser* parser;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "rtc_base/format_macros.h"
|
#include "rtc_base/format_macros.h"
|
||||||
#include "test/rtp_file_reader.h"
|
#include "test/rtp_file_reader.h"
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char* argv[]) {
|
||||||
webrtc::test::RtpFileReader* reader;
|
webrtc::test::RtpFileReader* reader;
|
||||||
webrtc::RtpHeaderParser* parser;
|
webrtc::RtpHeaderParser* parser;
|
||||||
if (!ParseArgsAndSetupEstimator(argc, argv, NULL, NULL, &reader, &parser,
|
if (!ParseArgsAndSetupEstimator(argc, argv, NULL, NULL, &reader, &parser,
|
||||||
|
@ -67,7 +67,7 @@ int TestCrtReportHandler(int report_type, char* msg, int* retval) {
|
|||||||
}
|
}
|
||||||
#endif // WEBRTC_WIN
|
#endif // WEBRTC_WIN
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char* argv[]) {
|
||||||
testing::InitGoogleTest(&argc, argv);
|
testing::InitGoogleTest(&argc, argv);
|
||||||
rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, false);
|
rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, false);
|
||||||
if (FLAG_help) {
|
if (FLAG_help) {
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
* --output_file=<output_yuv_file> --width=<width_of_input_frames>
|
* --output_file=<output_yuv_file> --width=<width_of_input_frames>
|
||||||
* --height=<height_of_input_frames>
|
* --height=<height_of_input_frames>
|
||||||
*/
|
*/
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char* argv[]) {
|
||||||
std::string program_name = argv[0];
|
std::string program_name = argv[0];
|
||||||
std::string usage = "Converts RGBA raw image files to I420 frames for YUV.\n"
|
std::string usage = "Converts RGBA raw image files to I420 frames for YUV.\n"
|
||||||
"Example usage:\n" + program_name +
|
"Example usage:\n" + program_name +
|
||||||
|
@ -22,7 +22,7 @@ using webrtc::AudioDeviceModule;
|
|||||||
#define DEFAULT_INPUT_DEVICE (0)
|
#define DEFAULT_INPUT_DEVICE (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int /*argc*/, char** /*argv*/) {
|
int main(int /*argc*/, char* /*argv*/ []) {
|
||||||
// Create and initialize the ADM.
|
// Create and initialize the ADM.
|
||||||
rtc::scoped_refptr<AudioDeviceModule> adm(
|
rtc::scoped_refptr<AudioDeviceModule> adm(
|
||||||
AudioDeviceModule::Create(AudioDeviceModule::kPlatformDefaultAudio));
|
AudioDeviceModule::Create(AudioDeviceModule::kPlatformDefaultAudio));
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
* --stats_file=<name_of_file> --width=<frame_width>
|
* --stats_file=<name_of_file> --width=<frame_width>
|
||||||
* --height=<frame_height>
|
* --height=<frame_height>
|
||||||
*/
|
*/
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char* argv[]) {
|
||||||
std::string program_name = argv[0];
|
std::string program_name = argv[0];
|
||||||
std::string usage =
|
std::string usage =
|
||||||
"Compares the output video with the initially sent video."
|
"Compares the output video with the initially sent video."
|
||||||
@ -107,4 +107,5 @@ int main(int argc, char** argv) {
|
|||||||
webrtc::test::PrintMaxRepeatedAndSkippedFrames(
|
webrtc::test::PrintMaxRepeatedAndSkippedFrames(
|
||||||
label, parser.GetFlag("stats_file_ref"),
|
label, parser.GetFlag("stats_file_ref"),
|
||||||
parser.GetFlag("stats_file_test"));
|
parser.GetFlag("stats_file_test"));
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include "rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h"
|
#include "rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h"
|
||||||
#include "rtc_tools/simple_command_line_parser.h"
|
#include "rtc_tools/simple_command_line_parser.h"
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char* argv[]) {
|
||||||
// This captures the freezing metrics for reference less video analysis.
|
// This captures the freezing metrics for reference less video analysis.
|
||||||
std::string program_name = argv[0];
|
std::string program_name = argv[0];
|
||||||
std::string usage = "Outputs the freezing score by comparing current frame "
|
std::string usage = "Outputs the freezing score by comparing current frame "
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "rtc_tools/simple_command_line_parser.h"
|
#include "rtc_tools/simple_command_line_parser.h"
|
||||||
|
|
||||||
// A command-line tool to edit a YUV-video (I420 sub-sampled).
|
// A command-line tool to edit a YUV-video (I420 sub-sampled).
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char* argv[]) {
|
||||||
std::string program_name = argv[0];
|
std::string program_name = argv[0];
|
||||||
std::string usage = "Deletes a series of frames in a yuv file."
|
std::string usage = "Deletes a series of frames in a yuv file."
|
||||||
" Only I420 is supported!\n"
|
" Only I420 is supported!\n"
|
||||||
|
@ -10,10 +10,11 @@
|
|||||||
|
|
||||||
#include "rtc_tools/network_tester/test_controller.h"
|
#include "rtc_tools/network_tester/test_controller.h"
|
||||||
|
|
||||||
int main() {
|
int main(int /*argn*/, char* /*argv*/ []) {
|
||||||
webrtc::TestController server(9090, 9090, "server_config.dat",
|
webrtc::TestController server(9090, 9090, "server_config.dat",
|
||||||
"server_packet_log.dat");
|
"server_packet_log.dat");
|
||||||
while (!server.IsTestDone()) {
|
while (!server.IsTestDone()) {
|
||||||
server.Run();
|
server.Run();
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ void CompareFiles(const char* reference_file_name, const char* test_file_name,
|
|||||||
* --results_file=<name_of_file> --width=<width_of_frames>
|
* --results_file=<name_of_file> --width=<width_of_frames>
|
||||||
* --height=<height_of_frames>
|
* --height=<height_of_frames>
|
||||||
*/
|
*/
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char* argv[]) {
|
||||||
std::string program_name = argv[0];
|
std::string program_name = argv[0];
|
||||||
std::string usage = "Runs PSNR and SSIM on two I420 videos and write the"
|
std::string usage = "Runs PSNR and SSIM on two I420 videos and write the"
|
||||||
"results in a file.\n"
|
"results in a file.\n"
|
||||||
@ -130,4 +130,5 @@ int main(int argc, char** argv) {
|
|||||||
CompareFiles(parser.GetFlag("reference_file").c_str(),
|
CompareFiles(parser.GetFlag("reference_file").c_str(),
|
||||||
parser.GetFlag("test_file").c_str(),
|
parser.GetFlag("test_file").c_str(),
|
||||||
parser.GetFlag("results_file").c_str(), width, height);
|
parser.GetFlag("results_file").c_str(), width, height);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user