mirror of
https://gitlvb.teallvbs.xyz/IQ.Lvbs/IQ.Pilot.git
synced 2026-08-06 00:35:39 +08:00
IQ.Pilot Release Commit @ 2b39aa6
This commit is contained in:
@@ -28,12 +28,17 @@ const int SEGMENT_LENGTH = LOGGERD_TEST ? atoi(getenv("LOGGERD_SEGMENT_LENGTH"))
|
||||
constexpr char PRESERVE_ATTR_NAME[] = "user.preserve";
|
||||
constexpr char PRESERVE_ATTR_VALUE = '1';
|
||||
|
||||
// 2.5x the stock 526x330 qcamera, rounded up to even. The msm_vidc encoder rejects
|
||||
// VIDIOC_S_FMT with ENOTSUPP (524) on an odd width or height, which throws out of
|
||||
// encoder_thread and SIGABRTs all of encoderd -- taking fcamera/dcamera/ecamera with it.
|
||||
constexpr int QCAM_WIDTH = 1316;
|
||||
constexpr int QCAM_HEIGHT = 826;
|
||||
static_assert(QCAM_WIDTH % 2 == 0 && QCAM_HEIGHT % 2 == 0, "qcamera dimensions must be even");
|
||||
constexpr int MICI_QCAM_WIDTH = 1210;
|
||||
constexpr int MICI_QCAM_HEIGHT = 760;
|
||||
static_assert(QCAM_WIDTH % 2 == 0 && QCAM_HEIGHT % 2 == 0 &&
|
||||
MICI_QCAM_WIDTH % 2 == 0 && MICI_QCAM_HEIGHT % 2 == 0,
|
||||
"qcamera dimensions must be even");
|
||||
|
||||
inline bool is_mici() {
|
||||
return Hardware::get_device_type() == cereal::InitData::DeviceType::MICI;
|
||||
}
|
||||
|
||||
struct EncoderSettings {
|
||||
cereal::EncodeIndex::Type encode_type;
|
||||
@@ -147,8 +152,8 @@ const EncoderInfo qcam_encoder_info = {
|
||||
.filename = "qcamera.ts",
|
||||
.cbr = true, // enforce the bitrate so upload size stays predictable (no VBR overshoot)
|
||||
.get_settings = [](int){return EncoderSettings::QcamEncoderSettings();},
|
||||
.frame_width = QCAM_WIDTH,
|
||||
.frame_height = QCAM_HEIGHT,
|
||||
.frame_width = is_mici() ? MICI_QCAM_WIDTH : QCAM_WIDTH,
|
||||
.frame_height = is_mici() ? MICI_QCAM_HEIGHT : QCAM_HEIGHT,
|
||||
.include_audio = Params().getBool("RecordAudio"),
|
||||
INIT_ENCODE_FUNCTIONS(QRoadEncode),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user