Apollo  6.0
Open source self driving car software
input.h
Go to the documentation of this file.
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 <cstdint>
20 
21 namespace apollo {
22 namespace drivers {
23 namespace video {
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 typedef struct RtpHeader {
30  uint16_t csrc_count : 4;
31  uint16_t extension : 1;
32  uint16_t padding : 1;
33  uint16_t version : 2;
34  uint16_t payloadtype : 7;
35  uint16_t marker : 1;
36  uint16_t seq;
37  uint32_t timestamp;
38  uint32_t ssrc;
39 } RtpHeader;
40 
41 #define HW_CAMERA_MAGIC0 0xBBAABBAA
42 #define HW_CAMERA_MAGIC1 0xAABBAABB
43 
44 typedef struct FrameHeader {
45  uint32_t magic0; /* 0xBBAABBAA */
46  uint32_t magic1; /* 0xAABBAABB */
47  // uint32_t ChanNo;
48  uint8_t PhyNo;
49  uint8_t frame_type; /* IDR: 1, other: 0 */
50  uint8_t error; /* error:1, other: 0 */
51  uint8_t resv;
52  uint32_t frame_size;
53  uint32_t frame_id;
54  uint32_t ts_sec;
55  uint32_t ts_usec;
56  uint16_t height; /* 1920 */
57  uint16_t width; /* 1080 */
58  uint32_t format; /* H265 */
59  uint32_t resv0;
60  uint32_t resv1;
61 } FrameHeader;
62 
63 typedef struct HwPduPacket {
66 } HwPduPacket;
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 } // namespace video
73 } // namespace drivers
74 } // namespace apollo
FrameHeader header
Definition: input.h:65
uint8_t resv
Definition: input.h:51
uint16_t marker
Definition: input.h:35
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
struct apollo::drivers::video::FrameHeader FrameHeader
uint32_t frame_size
Definition: input.h:52
Definition: input.h:29
struct apollo::drivers::video::HwPduPacket HwPduPacket
uint16_t extension
Definition: input.h:31
uint32_t format
Definition: input.h:58
uint16_t seq
Definition: input.h:36
uint32_t ssrc
Definition: input.h:38
uint32_t ts_sec
Definition: input.h:54
uint32_t frame_id
Definition: input.h:53
uint8_t PhyNo
Definition: input.h:48
uint32_t resv1
Definition: input.h:60
uint32_t timestamp
Definition: input.h:37
uint16_t payloadtype
Definition: input.h:34
uint32_t resv0
Definition: input.h:59
uint32_t magic0
Definition: input.h:45
uint8_t frame_type
Definition: input.h:49
uint32_t ts_usec
Definition: input.h:55
uint16_t width
Definition: input.h:57
struct apollo::drivers::video::RtpHeader RtpHeader
uint16_t padding
Definition: input.h:32
uint16_t height
Definition: input.h:56
uint16_t csrc_count
Definition: input.h:30
uint16_t version
Definition: input.h:33
RtpHeader rtp_header
Definition: input.h:64
uint32_t magic1
Definition: input.h:46
uint8_t error
Definition: input.h:50