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
Multimedia
Kdenlive
Commits
ed72f2cc
Commit
ed72f2cc
authored
May 02, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display stream name in clip monitor overlay when playing a multistream clip
parent
41c63e46
Pipeline
#19347
passed with stage
in 9 minutes and 42 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
2 deletions
+33
-2
src/monitor/monitor.cpp
src/monitor/monitor.cpp
+7
-2
src/monitor/monitorproxy.cpp
src/monitor/monitorproxy.cpp
+7
-0
src/monitor/monitorproxy.h
src/monitor/monitorproxy.h
+4
-0
src/monitor/view/kdenliveclipmonitor.qml
src/monitor/view/kdenliveclipmonitor.qml
+15
-0
No files found.
src/monitor/monitor.cpp
View file @
ed72f2cc
...
...
@@ -1415,11 +1415,13 @@ void Monitor::slotOpenClip(const std::shared_ptr<ProjectClip> &controller, int i
disconnect
(
m_controller
->
getMarkerModel
().
get
(),
SIGNAL
(
rowsRemoved
(
const
QModelIndex
&
,
int
,
int
)),
this
,
SLOT
(
checkOverlay
()));
}
m_controller
=
controller
;
m_glMonitor
->
getControllerProxy
()
->
setAudioStream
(
QString
());
m_snaps
.
reset
(
new
SnapModel
());
m_glMonitor
->
getControllerProxy
()
->
resetZone
();
if
(
controller
)
{
m_audioChannels
->
clear
();
delete
m_audioChannelsGroup
;
m_audioChannelsGroup
=
nullptr
;
if
(
m_controller
->
audioInfo
())
{
QMap
<
int
,
QString
>
audioStreamsInfo
=
m_controller
->
audioInfo
()
->
streamInfo
(
m_controller
->
properties
());
if
(
audioStreamsInfo
.
size
()
>
1
)
{
...
...
@@ -1435,6 +1437,7 @@ void Monitor::slotOpenClip(const std::shared_ptr<ProjectClip> &controller, int i
ac
->
setCheckable
(
true
);
if
(
i
.
key
()
==
activeStream
)
{
ac
->
setChecked
(
true
);
m_glMonitor
->
getControllerProxy
()
->
setAudioStream
(
ac
->
text
().
remove
(
QLatin1Char
(
'&'
)));
}
m_audioChannelsGroup
->
addAction
(
ac
);
}
...
...
@@ -1445,11 +1448,12 @@ void Monitor::slotOpenClip(const std::shared_ptr<ProjectClip> &controller, int i
ac
->
setChecked
(
true
);
}
m_audioChannelsGroup
->
addAction
(
ac
);
connect
(
m_audioChannelsGroup
,
&
QActionGroup
::
triggered
,
[
controller
]
(
QAction
*
act
)
{
connect
(
m_audioChannelsGroup
,
&
QActionGroup
::
triggered
,
[
this
]
(
QAction
*
act
)
{
int
selectedStream
=
act
->
data
().
toInt
();
m_glMonitor
->
getControllerProxy
()
->
setAudioStream
(
act
->
text
().
remove
(
QLatin1Char
(
'&'
)));
QMap
<
QString
,
QString
>
props
;
props
.
insert
(
QStringLiteral
(
"audio_index"
),
QString
::
number
(
selectedStream
));
controller
->
setProperties
(
props
,
true
);
m_
controller
->
setProperties
(
props
,
true
);
});
m_audioChannels
->
menuAction
()
->
setVisible
(
true
);
}
else
{
...
...
@@ -1519,6 +1523,7 @@ void Monitor::reloadActiveStream()
for
(
QAction
*
ac
:
actions
)
{
if
(
ac
->
data
().
toInt
()
==
activeStream
)
{
ac
->
setChecked
(
true
);
m_glMonitor
->
getControllerProxy
()
->
setAudioStream
(
ac
->
text
().
remove
(
QLatin1Char
(
'&'
)));
break
;
}
}
...
...
src/monitor/monitorproxy.cpp
View file @
ed72f2cc
...
...
@@ -334,6 +334,13 @@ void MonitorProxy::setAudioThumb(const QUrl thumbPath)
emit
audioThumbChanged
();
}
void
MonitorProxy
::
setAudioStream
(
const
QString
&
name
)
{
m_clipStream
=
name
;
emit
clipStreamChanged
();
}
QPoint
MonitorProxy
::
profile
()
{
QSize
s
=
pCore
->
getCurrentFrameSize
();
...
...
src/monitor/monitorproxy.h
View file @
ed72f2cc
...
...
@@ -52,6 +52,7 @@ class MonitorProxy : public QObject
/** @brief: Contains the name of clip currently displayed in monitor
* */
Q_PROPERTY
(
QString
clipName
MEMBER
m_clipName
NOTIFY
clipNameChanged
)
Q_PROPERTY
(
QString
clipStream
MEMBER
m_clipStream
NOTIFY
clipStreamChanged
)
/** @brief: Contains the name of clip currently displayed in monitor
* */
Q_PROPERTY
(
int
clipType
MEMBER
m_clipType
NOTIFY
clipTypeChanged
)
...
...
@@ -91,6 +92,7 @@ public:
QPoint
profile
();
void
setClipProperties
(
int
clipId
,
ClipType
::
ProducerType
type
,
bool
hasAV
,
const
QString
clipName
);
void
setAudioThumb
(
const
QUrl
thumbPath
=
QUrl
());
void
setAudioStream
(
const
QString
&
name
);
signals:
void
positionChanged
(
int
);
...
...
@@ -111,6 +113,7 @@ signals:
void
seekToKeyframe
();
void
clipHasAVChanged
();
void
clipNameChanged
();
void
clipStreamChanged
();
void
clipTypeChanged
();
void
clipIdChanged
();
void
audioThumbChanged
();
...
...
@@ -125,6 +128,7 @@ private:
QUrl
m_audioThumb
;
QString
m_markerComment
;
QString
m_clipName
;
QString
m_clipStream
;
int
m_clipType
;
int
m_clipId
;
bool
m_seekFinished
;
...
...
src/monitor/view/kdenliveclipmonitor.qml
View file @
ed72f2cc
...
...
@@ -134,6 +134,21 @@ Item {
left
:
parent
.
left
bottom
:
parent
.
bottom
}
Label
{
id
:
clipStreamLabel
font
:
fixedFont
anchors
{
bottom
:
audioThumb
.
isAudioClip
?
parent
.
bottom
:
parent
.
top
horizontalCenter
:
parent
.
horizontalCenter
}
color
:
"
white
"
text
:
controller
.
clipStream
background
:
Rectangle
{
color
:
"
#222277
"
}
visible
:
text
!=
""
padding
:
4
}
height
:
isAudioClip
?
parent
.
height
:
parent
.
height
/
6
//font.pixelSize * 3
width
:
parent
.
width
...
...
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