Port frame_analyzer and rgba_to_i420_converter targets to GN build.

Tested on Linux with the following command lines:

$ gn gen //out/Debug --args='is_debug=true target_cpu="x64" build_with_chromium=false'
$ ninja -C out/Debug frame_analyzer rgba_to_i420_converter

BUG=chromium:461019
TEST=see above
R=kjellander@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/42999004

Cr-Commit-Position: refs/heads/master@{#8914}
This commit is contained in:
Henrik Kjellander 2015-04-01 17:29:44 +02:00
parent 722ef1fb59
commit 6ac53b2b37
4 changed files with 51 additions and 4 deletions

View File

@ -16,12 +16,50 @@ source_set("tools") {
source_set("command_line_parser") {
sources = [
"simple_command_line_parser.h",
"simple_command_line_parser.cc",
"simple_command_line_parser.h",
]
deps = [
"..:gtest_prod",
]
configs += [ "..:common_config" ]
public_configs = [ "..:common_inherited_config"]
public_configs = [ "..:common_inherited_config" ]
}
source_set("video_quality_analysis") {
sources = [
"frame_analyzer/video_quality_analysis.cc",
"frame_analyzer/video_quality_analysis.h",
]
deps = [
"../common_video",
]
public_deps = [
"../common_video",
]
}
executable("frame_analyzer") {
sources = [
"frame_analyzer/frame_analyzer.cc",
]
deps = [
":command_line_parser",
":video_quality_analysis",
]
}
executable("rgba_to_i420_converter") {
sources = [
"converter/converter.cc",
"converter/converter.h",
"converter/rgba_to_i420_converter.cc",
]
deps = [
":command_line_parser",
"../common_video",
]
}
# TODO(kjellander): Convert all of tools.gyp into GN here.
@ -35,7 +73,7 @@ if (!build_with_chromium) {
]
configs += [ "..:common_config" ]
public_configs = [ "..:common_inherited_config"]
public_configs = [ "..:common_inherited_config" ]
deps = [
":command_line_parser",

View File

@ -26,6 +26,9 @@ namespace test {
using std::string;
ResultsContainer::ResultsContainer() {}
ResultsContainer::~ResultsContainer() {}
int GetI420FrameSize(int width, int height) {
int half_width = (width + 1) >> 1;
int half_height = (height + 1) >> 1;

View File

@ -32,6 +32,9 @@ struct AnalysisResult {
};
struct ResultsContainer {
ResultsContainer();
~ResultsContainer();
std::vector<AnalysisResult> frames;
};

View File

@ -20,6 +20,9 @@
'simple_command_line_parser.h',
'simple_command_line_parser.cc',
],
'deps': [
'<(webrtc_root)/common.gyp:gtest_prod',
],
}, # command_line_parser
],
}
}