Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
9e7a87b4
Commit
9e7a87b4
authored
Nov 29, 2019
by
Jean-Baptiste Mardelle
Browse files
Screengrab fixes: fix crash on Linux and non working on Windows (Vincent)
parent
7a5e9356
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/monitor/recmanager.cpp
View file @
9e7a87b4
...
...
@@ -46,7 +46,7 @@ RecManager::RecManager(Monitor *parent)
,
m_recToolbar
(
new
QToolBar
(
parent
))
,
m_checkAudio
(
false
)
,
m_checkVideo
(
false
)
,
m_screenIndex
(
-
1
)
,
m_screenIndex
(
0
)
{
m_playAction
=
m_recToolbar
->
addAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"media-playback-start"
)),
i18n
(
"Preview"
));
m_playAction
->
setCheckable
(
true
);
...
...
@@ -226,14 +226,11 @@ void RecManager::slotRecord(bool record)
++
i
;
}
m_captureFile
=
QUrl
::
fromLocalFile
(
path
);
QString
captureSize
;
QStringList
captureArgs
;
#ifdef Q_OS_WIN
captureArgs
<<
QStringLiteral
(
"-f"
)
<<
QStringLiteral
(
"gdigrab"
);
// fps
captureArgs
<<
QStringLiteral
(
"-framerate"
)
<<
QString
::
number
(
KdenliveSettings
::
grab_fps
());
captureSize
=
QStringLiteral
(
"desktop"
);
captureArgs
<<
QStringLiteral
(
"-i"
)
<<
captureSize
;
captureArgs
<<
QStringLiteral
(
"-f"
)
<<
QStringLiteral
(
"gdigrab"
)
<<
QStringLiteral
(
"-framerate"
)
<<
QString
::
number
(
KdenliveSettings
::
grab_fps
())
<<
QStringLiteral
(
"-i"
)
<<
QStringLiteral
(
"desktop"
);
if
(
KdenliveSettings
::
grab_parameters
().
contains
(
QLatin1String
(
"alsa"
)))
{
// Add audio device
QString
params
=
captureArgs
.
join
(
QLatin1Char
(
' '
));
...
...
@@ -276,7 +273,7 @@ void RecManager::slotRecord(bool record)
}
else
if
(
!
KdenliveSettings
::
grab_parameters
().
simplified
().
isEmpty
())
{
captureArgs
<<
KdenliveSettings
::
grab_parameters
().
simplified
().
split
(
QLatin1Char
(
' '
));
captureArgs
<<
path
;
m_captureProcess
->
start
(
KdenliveSettings
::
ffmpegpath
());
m_captureProcess
->
start
(
KdenliveSettings
::
ffmpegpath
()
,
captureArgs
);
}
#else
captureArgs
<<
QStringLiteral
(
"-f"
)
<<
QStringLiteral
(
"x11grab"
);
...
...
@@ -286,7 +283,7 @@ void RecManager::slotRecord(bool record)
if
(
!
KdenliveSettings
::
grab_hide_frame
())
{
captureArgs
<<
QStringLiteral
(
"-show_region"
)
<<
QStringLiteral
(
"1"
);
}
captureSize
=
QStringLiteral
(
":0.0"
);
QString
captureSize
=
QStringLiteral
(
":0.0"
);
if
(
KdenliveSettings
::
grab_capture_type
()
==
0
)
{
// Full screen capture
QRect
screenSize
=
QApplication
::
screens
()[
m_screenIndex
]
->
geometry
();
...
...
Write
Preview
Supports
Markdown
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