Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Farid Abdelnour
kdenlive
Commits
3b400d92
Commit
3b400d92
authored
Jun 05, 2012
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add decklink detection in wizard
parent
3cddf00a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
32 deletions
+54
-32
src/widgets/wizardcapture_ui.ui
src/widgets/wizardcapture_ui.ui
+38
-28
src/wizard.cpp
src/wizard.cpp
+15
-4
src/wizard.h
src/wizard.h
+1
-0
No files found.
src/widgets/wizardcapture_ui.ui
View file @
3b400d92
...
...
@@ -6,46 +6,26 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
279
</width>
<height>
1
10
</height>
<width>
152
</width>
<height>
1
54
</height>
</rect>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"0"
colspan=
"4"
>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
Autodetected capture devices
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"4"
>
<item
row=
"1"
column=
"3"
>
<widget
class=
"QPushButton"
name=
"button_reload"
>
<property
name=
"text"
>
<string>
Check
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
colspan=
"5"
>
<widget
class=
"QLabel"
name=
"v4l_status"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
colspan=
"5"
>
<widget
class=
"KComboBox"
name=
"v4l_devices"
/>
</item>
<item
row=
"3"
column=
"0"
colspan=
"2"
>
<widget
class=
"QLabel"
name=
"label_9"
>
<property
name=
"text"
>
<string>
Select capture format
</string>
<item
row=
"4"
column=
"0"
colspan=
"4"
>
<widget
class=
"Line"
name=
"line"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item
row=
"3"
column=
"2"
colspan=
"3"
>
<widget
class=
"KComboBox"
name=
"v4l_formats"
/>
</item>
<item
row=
"4"
column=
"1"
>
<item
row=
"7"
column=
"1"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
...
...
@@ -58,6 +38,36 @@
</property>
</spacer>
</item>
<item
row=
"3"
column=
"0"
colspan=
"4"
>
<widget
class=
"KComboBox"
name=
"v4l_formats"
/>
</item>
<item
row=
"1"
column=
"0"
colspan=
"3"
>
<widget
class=
"KComboBox"
name=
"v4l_devices"
/>
</item>
<item
row=
"0"
column=
"0"
colspan=
"4"
>
<widget
class=
"QLabel"
name=
"v4l_status"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
colspan=
"4"
>
<widget
class=
"QLabel"
name=
"label_9"
>
<property
name=
"text"
>
<string>
Capture format:
</string>
</property>
</widget>
</item>
<item
row=
"5"
column=
"0"
colspan=
"4"
>
<widget
class=
"QLabel"
name=
"decklink_status"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item
row=
"6"
column=
"0"
colspan=
"4"
>
<widget
class=
"KComboBox"
name=
"decklink_devices"
/>
</item>
</layout>
</widget>
<customwidgets>
...
...
src/wizard.cpp
View file @
3b400d92
...
...
@@ -20,6 +20,7 @@
#include "wizard.h"
#include "kdenlivesettings.h"
#include "profilesdialog.h"
#include "renderer.h"
#ifdef USE_V4L
#include "v4l/v4lcapture.h"
#endif
...
...
@@ -43,8 +44,8 @@
// Recommended MLT version
const
int
mltVersionMajor
=
0
;
const
int
mltVersionMinor
=
7
;
const
int
mltVersionRevision
=
6
;
const
int
mltVersionMinor
=
8
;
const
int
mltVersionRevision
=
0
;
static
const
char
kdenlive_version
[]
=
VERSION
;
...
...
@@ -135,8 +136,13 @@ Wizard::Wizard(bool upgrade, QWidget *parent) :
#ifndef Q_WS_MAC
QWizardPage
*
page6
=
new
QWizardPage
;
page6
->
setTitle
(
i18n
(
"
Webcam
"
));
page6
->
setTitle
(
i18n
(
"
Capture device
"
));
m_capture
.
setupUi
(
page6
);
bool
found_decklink
=
Render
::
getBlackMagicDeviceList
(
m_capture
.
decklink_devices
);
KdenliveSettings
::
setDecklink_device_found
(
found_decklink
);
if
(
found_decklink
)
m_capture
.
decklink_status
->
setText
(
i18n
(
"Default Blackmagic Decklink card:"
));
else
m_capture
.
decklink_status
->
setText
(
i18n
(
"No Blackmagic Decklink device found"
));
connect
(
m_capture
.
decklink_devices
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
slotUpdateDecklinkDevice
(
int
)));
connect
(
m_capture
.
button_reload
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotDetectWebcam
()));
connect
(
m_capture
.
v4l_devices
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
slotUpdateCaptureParameters
()));
connect
(
m_capture
.
v4l_formats
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
slotSaveCaptureFormat
()));
...
...
@@ -174,7 +180,7 @@ void Wizard::slotDetectWebcam()
}
}
if
(
m_capture
.
v4l_devices
->
count
()
>
0
)
{
m_capture
.
v4l_status
->
setText
(
i18n
(
"
Select your d
efault video4linux device"
));
m_capture
.
v4l_status
->
setText
(
i18n
(
"
D
efault video4linux device
:
"
));
// select default device
bool
found
=
false
;
for
(
int
i
=
0
;
i
<
m_capture
.
v4l_devices
->
count
();
i
++
)
{
...
...
@@ -676,4 +682,9 @@ void Wizard::slotSaveCaptureFormat()
ProfilesDialog
::
saveProfile
(
profile
,
vl4ProfilePath
);
}
void
Wizard
::
slotUpdateDecklinkDevice
(
int
captureCard
)
{
KdenliveSettings
::
setDecklink_capturedevice
(
captureCard
);
}
#include "wizard.moc"
src/wizard.h
View file @
3b400d92
...
...
@@ -107,6 +107,7 @@ private slots:
void
slotDetectWebcam
();
void
slotUpdateCaptureParameters
();
void
slotSaveCaptureFormat
();
void
slotUpdateDecklinkDevice
(
int
captureCard
);
};
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment