Apollo 11.0
自动驾驶开放平台
frame_processor.h
浏览该文件的文档.
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#pragma once
18
19#include <string>
20#include <vector>
21
22namespace apollo {
23namespace drivers {
24namespace video {
25
31 public:
32 // Constructor
33 FrameProcessor(const std::string& input_video_file,
34 const std::string& output_jpg_dir);
35
36 // Process frames according to input data, and output converted data
37 bool ProcessStream() const;
38
39 // Destructor
40 ~FrameProcessor() = default;
41
42 private:
43 void WriteOutputJpgFile(const std::vector<uint8_t>& jpeg_buffer,
44 const std::string& output_jpg_file) const;
45 std::string GetOutputFile(const int frame_num) const;
46
47 std::vector<uint8_t> input_video_buffer_;
48 const std::string output_jpg_dir_;
49};
50
51} // namespace video
52} // namespace drivers
53} // namespace apollo
FrameProcessor is a class to process video streams.
class register implement
Definition arena_queue.h:37