Apollo 11.0
自动驾驶开放平台
video2jpg.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2019 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
17#include "gflags/gflags.h"
18
19#include "cyber/common/log.h"
21
23
24DECLARE_string(input_video);
25DECLARE_string(output_dir);
26DEFINE_string(input_video, "", "The input video file");
27DEFINE_string(output_dir, "", "The directory to output decoded pictures.");
28
29int main(int argc, char** argv) {
30 google::ParseCommandLineFlags(&argc, &argv, true);
31 AINFO << "input video: " << FLAGS_input_video
32 << ". output dir: " << FLAGS_output_dir;
33 FrameProcessor processor(FLAGS_input_video, FLAGS_output_dir);
34 if (!processor.ProcessStream()) {
35 AERROR << "error: failed to decode file " << FLAGS_input_video;
36 return -1;
37 }
38 return 0;
39}
FrameProcessor is a class to process video streams.
#define AERROR
Definition log.h:44
#define AINFO
Definition log.h:42
int main(int argc, char **argv)
Definition video2jpg.cc:29
DECLARE_string(input_video)
DEFINE_string(input_video, "", "The input video file")