liyujie
2025-08-28 d9927380ed7c8366f762049be9f3fee225860833
android/hardware/aw/camera/3_4/v4l2_stream.h
....@@ -67,7 +67,9 @@
6767 // to "new V4L2Stream", except that it may return nullptr in case of failure.
6868 static V4L2Stream* NewV4L2Stream(const int id,
6969 const std::string device_path,
70
- std::shared_ptr<CCameraConfig> pCameraCfg);
70
+ std::shared_ptr<CCameraConfig> pCameraCfg,
71
+ int merge_status
72
+ );
7173 virtual ~V4L2Stream();
7274
7375 // Turn the stream on or off.
....@@ -91,7 +93,7 @@
9193 virtual int SetAutoFocusRegions(cam_rect_t cam_regions);
9294 virtual int SetCropRect(cam_crop_rect_t cam_crop_rect);
9395 virtual int SetJpegCropRect(cam_crop_rect_t cam_crop_rect);
94
- virtual int SetParm(int mCapturemode);
96
+ virtual int SetParm(int mCapturemode, uint32_t width, uint32_t height);
9597 // Manage format.
9698 virtual int GetFormats(std::set<uint32_t>* v4l2_formats);
9799 virtual int GetFormatFrameSizes(uint32_t v4l2_format,
....@@ -104,7 +106,7 @@
104106 const std::array<int32_t, 2>& size,
105107 std::array<int64_t, 2>* duration_range);
106108 virtual int SetFormat(const StreamFormat& desired_format,
107
- uint32_t* result_max_buffers);
109
+ uint32_t* result_max_buffers, bool merge_stream_flag);
108110 // Manage buffers.
109111 virtual int PrepareBuffer();
110112 virtual int WaitCameraReady();
....@@ -132,11 +134,13 @@
132134 // Use NewV4L2Stream instead.
133135 V4L2Stream(const int id,
134136 const std::string device_path,
135
- std::shared_ptr<CCameraConfig> pCameraCfg);
137
+ std::shared_ptr<CCameraConfig> pCameraCfg,
138
+ int merge_status
139
+ );
136140
137141 // Connect or disconnect to the device. Access by creating/destroying
138142 // a V4L2Wrapper::Connection object.
139
- int Connect();
143
+ int Connect(int merge_status);
140144 void Disconnect();
141145 // Perform an ioctl call in a thread-safe fashion.
142146 template <typename T>
....@@ -167,6 +171,12 @@
167171 epoll_event *pEvents;
168172 // The open camera facing.
169173 const int device_id_;
174
+
175
+ int reduce_call_num;
176
+ uint32_t reducecallnum_dst_width;
177
+ uint32_t reducecallnum_dst_height;
178
+ uint32_t reducecallnum_src_width;
179
+ uint32_t reducecallnum_src_height;
170180
171181 // Whether or not the device supports the extended control query.
172182 bool extended_query_supported_;
....@@ -257,9 +267,9 @@
257267 class ConnectionStream {
258268 friend class V4L2Stream;
259269 public:
260
- explicit ConnectionStream(std::shared_ptr<V4L2Stream> device)
270
+ ConnectionStream(std::shared_ptr<V4L2Stream> device, int merge_status)
261271 : device_(std::move(device)) {
262
- connect_result_ = device_->Connect();
272
+ connect_result_ = device_->Connect(merge_status);
263273 }
264274 ~ConnectionStream() {
265275 if (connect_result_ == 0) {