Skip to content

Commit

Permalink
Added support for Ubuntu 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Sushanth172 committed Nov 1, 2023
1 parent a83b46c commit bc2d8f1
Show file tree
Hide file tree
Showing 1,092 changed files with 65,363 additions and 67 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Qtcam Application - 25.0.23
Qtcam Application - 26.0.0
---------------------------
*Added support for Ubuntu 22.04.
*Added new HID controls for See3CAM_50CUGM second phase.
*UI changes in See3CAM_130.

Expand Down
7 changes: 4 additions & 3 deletions src/audioinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static pthread_t my_read_thread;
static pa_stream *recordstream = NULL;

bool AudioInput::is20_04 = false;

bool AudioInput::is22_04 = false;

AudioInfo::AudioInfo(const QAudioFormat &format, QObject *parent)
: QIODevice(parent)
Expand Down Expand Up @@ -377,7 +377,7 @@ void AudioInput::pa_sourcelist_cb(pa_context *c, const pa_source_info *l, int eo
int state = 0;
int pa_ready = 0;

if(is20_04)
if(is20_04 || is22_04)
{
process.start("bash", QStringList() << "-c" << "sudo pulseaudio -D");
process.waitForFinished();
Expand Down Expand Up @@ -723,7 +723,8 @@ void AudioInput::recordAudio(){
int r;
int pa_ready = 0;

if(audioInput->is20_04)
//To start pulse audio server for ubuntu 20.04 & 22.04
if(audioInput->is20_04 || audioInput->is22_04)
{
audioInput->process.start("bash", QStringList() << "-c" << "sudo pulseaudio -D");
audioInput->process.waitForFinished();
Expand Down
1 change: 1 addition & 0 deletions src/audioinput.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class AudioInput : public QObject

Alsa alsa;
static bool is20_04;
static bool is22_04;

private:
static void finish(pa_context *pa_ctx, pa_mainloop *pa_ml);
Expand Down
21 changes: 18 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,20 @@ int main(int argc, char *argv[])
process.waitForFinished();
char *os_name = strdup(process.readAllStandardOutput());
bool is20_04detected =false;
bool is22_04detected = false;

if(strstr(os_name,"20.04"))
is20_04detected = true;
{
is20_04detected = true;
}
else if(strstr(os_name,"22.04"))
{
is22_04detected = true;
}

QApplication app(argc, argv);

app.setOrganizationName("econsystems");
app.setOrganizationDomain("econsystems.com");

qmlRegisterType<Cameraproperty>("econ.camera.property",1,0,"Camproperty");
qmlRegisterType<Videostreaming>("econ.camera.stream", 1, 0, "Videostreaming");
Expand Down Expand Up @@ -221,9 +229,16 @@ int main(int argc, char *argv[])
viewer.rootContext()->setContextProperty("is20_04detcted", QVariant(true));
audio.is20_04 = true;
}
else if(is22_04detected)
{
viewer.rootContext()->setContextProperty("is22_04detcted", QVariant(true));
audio.is22_04 = true;
}
else {
viewer.rootContext()->setContextProperty("is20_04detcted", QVariant(false));
viewer.rootContext()->setContextProperty("is22_04detcted", QVariant(false));
audio.is20_04 = false;
audio.is22_04 = false;
}

viewer.rootContext()->setContextProperty("resolutionModel", &vs.resolution);
Expand All @@ -236,7 +251,7 @@ int main(int argc, char *argv[])
viewer.rootContext()->setContextProperty("audioChannelCountModel", &audio.audioChannelCountModel);

//Creating directory in Home for saving videos & pictures instead of saving it in default root folder
if(is20_04detected)
if(is20_04detected || is22_04detected)
{
// Create the folder in the home directory
QString picturesPath = QDir::homePath() + "/Pictures";
Expand Down
22 changes: 9 additions & 13 deletions src/qml/qtcam/UVCSettings/see3cam50cugm/see3cam_50cug_m.qml
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,6 @@ Item{
}
}


// Used when selecting auto exposure in image Quality settings menu
Timer {
id: getAutoExpsoureControlValues
interval: 1000
onTriggered: {
stop()
}
}

Connections{
target: root

Expand Down Expand Up @@ -2043,6 +2033,7 @@ Item{
opacity: (enableUSExp.enabled && enableUSExp.checked) ? 1 : 0.1
onValueChanged: {
ultraShortExpTextField.text = ultraShortExpSlider.value

if(skipUpdateUltraShortExposure){
see3cam50cugm.setUltraShortExposure(SEE3CAM_50CUGM.EXP_ENABLE, ultraShortExpSlider.value)
}
Expand Down Expand Up @@ -2576,12 +2567,18 @@ Item{
onUltraShortExposureModeReceived:{
currentUltraShortExposureReceived(mode)
}
onUltraShortExposureValuesReceived:{

onCurrentUltraShortExpValueReceived:{
skipUpdateUltraShortExposure = false
ultraShortExpSlider.value = current
skipUpdateUltraShortExposure = true
}

onMinUltraShortExposureReceived:{
ultraShortExpSlider.minimumValue = min
}
onMaxUltraShortExposureReceived:{
ultraShortExpSlider.maximumValue = max
skipUpdateUltraShortExposure = true
}

onCurrentTriggerValueReceived:{
Expand Down Expand Up @@ -3600,7 +3597,6 @@ Item{
milliSecExpStat.opacity = 0.1
microSecExpStat.opacity = 0.1
}
getAutoExpsoureControlValues.start()
}

function sendConvertedExpToUVC()
Expand Down
2 changes: 1 addition & 1 deletion src/qml/qtcam/Views/audiocapturesettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ Item {
cameraSelect = true
}

onCameraDeviceUnplugged:
onCameraDeviceUnplugged:
{
audioDevicesList.currentIndex = 0
audio_Capture_property_Child.visible = false
Expand Down
7 changes: 4 additions & 3 deletions src/qml/qtcam/Views/imagequalitysettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1300,9 +1300,6 @@ Item {
onGetColorTempFromHID:{
white_balance_Slider.value = colorTempFromHID
}
onGetExposureFromHID:{
exposure_Slider.value = exposureFromHID
}
onGetExposureStatusFromHID:{
if(isAutoEnable)
{
Expand All @@ -1314,7 +1311,11 @@ Item {
exposure_Slider.value = exposure
}
}
onGetExposureFromHID:{
exposure_Slider.value = exposureFromHID
}
}

Connections
{
target: root
Expand Down
18 changes: 9 additions & 9 deletions src/qml/qtcam/Views/qtcam.qml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ Rectangle {
signal getGammaFromHID(int gammaFromHID);
signal getColorTempFromHID(int colorTempFromHID);
signal getExposureFromHID(int exposureFromHID);
signal getExposureStatusFromHID(bool isAutoEnable, int exposure)
signal getExposureStatusFromHID(bool isAutoEnable, int exposure);

width:Screen.width
height:Screen.height
Expand Down Expand Up @@ -869,8 +869,9 @@ Rectangle {

// Added by Sankari: 12 Feb 2018 : stop Getting key from camera.
keyEvent.stopGetKeyFromCamera()
// if(!is20_04detcted)
enumerateAudioSettings();

//To Enumerate Audio devices
enumerateAudioSettings();

cameraSelected()
//Added by Dhurka - 20th Oct 2016
Expand Down Expand Up @@ -1702,14 +1703,13 @@ Rectangle {
{
videoSettingsRootObject = videoViewComponent.createObject(root,{"imageFormatY" : imageFormatYValue,"stillPropertyY" : stillPropertyYValue});
}
// if(!is20_04detcted)

var AudioViewComponent = Qt.createComponent("audiocapturesettings.qml")
if (AudioViewComponent.status === Component.Ready)
{
var AudioViewComponent = Qt.createComponent("audiocapturesettings.qml")
if (AudioViewComponent.status === Component.Ready)
{
audioSettingsRootObject = AudioViewComponent.createObject(root,{"imageFormatY" : imageFormatYValue,"stillPropertyY" : stillPropertyYValue});
}
audioSettingsRootObject = AudioViewComponent.createObject(root,{"imageFormatY" : imageFormatYValue,"stillPropertyY" : stillPropertyYValue});
}

//Capture and Video recording
var captureVideoRecordComponent = Qt.createComponent("captureandvideorecord.qml")
if (captureVideoRecordComponent.status === Component.Ready)
Expand Down
4 changes: 2 additions & 2 deletions src/qml/qtcam/about/release.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[release]
applicationname=Qtcam
version=25.0.23
releasedate=31/10/2023
version=26.0.0
releasedate=01/11/2023
logDebugEnable=true
logWarningEnable=true
logFatalEnable=true
Expand Down
Loading

0 comments on commit bc2d8f1

Please sign in to comment.