-
Notifications
You must be signed in to change notification settings - Fork 36
feat(config): add useRgbData config to control RGB preview mode #488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -282,6 +282,14 @@ void MajorImageProcessingThread::run() | |
| if (GStreamer_Env == m_eEncodeEnv) | ||
| bUseRgb = true; | ||
|
|
||
| // DConfig配置控制RGB数据使用模式,-1表示不设置(由系统自动判断),0表示强制关闭,1表示强制开启 | ||
| int useRgbData = DataManager::instance()->getUseRgbData(); | ||
| if (useRgbData == 1) { | ||
| bUseRgb = true; | ||
| } else if (useRgbData == 0) { | ||
|
Comment on lines
+286
to
+289
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Clarify handling of unexpected Right now only Suggested implementation: // DConfig配置控制RGB数据使用模式,-1表示不设置(由系统自动判断),0表示强制关闭,1表示强制开启
int useRgbData = DataManager::instance()->getUseRgbData();
switch (useRgbData) {
case 1:
// 强制开启 RGB
bUseRgb = true;
break;
case 0:
// 强制关闭 RGB
bUseRgb = false;
break;
case -1:
// 自动模式:保持当前 bUseRgb 由系统逻辑决定
break;
default:
// 非法配置值:保持当前 bUseRgb,同时在开发期暴露问题
assert(false && "Invalid useRgbData configuration value (expected -1/0/1)");
break;
}
|
||
| bUseRgb = false; | ||
| } | ||
|
|
||
| if (bUseRgb || (m_bPhoto && m_filtersGroupDislay)) { | ||
| if (m_nVdWidth != static_cast<unsigned int>(m_frame->width) || m_nVdHeight != static_cast<unsigned int>(m_frame->height)) { | ||
| m_nVdWidth = static_cast<unsigned int>(m_frame->width); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.