Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Val Doroshchuk
qtgstreamerextras
Commits
f66b8478
Commit
f66b8478
authored
Dec 11, 2018
by
Val Doroshchuk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wo videooutput
parent
14e268cf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
16 deletions
+32
-16
src/gstreamerextras/qgstreamerpipeline.cpp
src/gstreamerextras/qgstreamerpipeline.cpp
+3
-10
src/gstreamerextras/qgstreamerpipeline_p.h
src/gstreamerextras/qgstreamerpipeline_p.h
+0
-3
src/gstreamerextras/qgstreamerplaybin.cpp
src/gstreamerextras/qgstreamerplaybin.cpp
+0
-2
tests/auto/integration/qml/pipeline/tst_pipeline.qml
tests/auto/integration/qml/pipeline/tst_pipeline.qml
+29
-1
No files found.
src/gstreamerextras/qgstreamerpipeline.cpp
View file @
f66b8478
...
...
@@ -63,15 +63,6 @@ void QGstreamerPipelinePrivate::updateMediaObject()
q
->
setMediaPlayer
(
obj
);
}
void
QGstreamerPipelinePrivate
::
updatePipeline
(
bool
ready
)
{
Q_Q
(
QGstreamerPipeline
);
emit
rendererIsReady
(
ready
);
if
(
ready
)
q
->
setPipeline
(
pendingPipelineDesc
);
}
QGstreamerPipeline
::
QGstreamerPipeline
(
QObject
*
parent
)
:
QGstreamerPipeline
(
new
QGstreamerPipelinePrivate
(
this
),
nullptr
,
parent
)
{
...
...
@@ -151,10 +142,12 @@ void QGstreamerPipeline::setMediaPlayer(QMediaPlayer *src)
connect
(
d
->
session
,
&
QGstreamerPlayerSession
::
pipelineChanged
,
this
,
&
QGstreamerPipeline
::
pipelineChanged
);
connect
(
d
->
session
,
&
QGstreamerPlayerSession
::
rendererIsReady
,
d
,
&
QGstreamerPipelinePrivate
::
updatePipeline
);
d
,
&
QGstreamerPipelinePrivate
::
rendererIsReady
);
d
->
mediaPlayer
=
src
;
emit
mediaPlayerChanged
();
setPipeline
(
d
->
pendingPipelineDesc
);
}
QString
QGstreamerPipeline
::
pipeline
()
const
...
...
src/gstreamerextras/qgstreamerpipeline_p.h
View file @
f66b8478
...
...
@@ -76,9 +76,6 @@ public:
public
Q_SLOTS
:
void
updateMediaObject
();
private
Q_SLOTS
:
void
updatePipeline
(
bool
);
Q_SIGNALS:
void
streamsChanged
();
void
rendererIsReady
(
bool
);
...
...
src/gstreamerextras/qgstreamerplaybin.cpp
View file @
f66b8478
...
...
@@ -240,8 +240,6 @@ QGstreamerPlaybin::QGstreamerPlaybin(QMediaPlayer *media, QObject *parent)
d
,
&
QGstreamerPlaybinPrivate
::
onMediaPlayerChanged
);
connect
(
d
,
&
QGstreamerPipelinePrivate
::
rendererIsReady
,
d
,
&
QGstreamerPlaybinPrivate
::
updatePlaybin
);
d
->
onMediaPlayerChanged
();
}
QGstreamerPlaybin
::
QGstreamerPlaybin
(
QObject
*
parent
)
...
...
tests/auto/integration/qml/pipeline/tst_pipeline.qml
View file @
f66b8478
...
...
@@ -68,6 +68,23 @@ Item {
signalName
:
"
pipelineChanged
"
}
MediaPlayer
{
id
:
player2
autoPlay
:
false
loops
:
Audio
.
Infinite
}
Pipeline
{
id
:
control2
source
:
player2
}
SignalSpy
{
id
:
spyPipeline2
target
:
control2
signalName
:
"
pipelineChanged
"
}
TestCase
{
name
:
"
GstreamerPipelineControl
"
...
...
@@ -78,6 +95,7 @@ Item {
}
function
test_pipeline
()
{
spyPipeline
.
clear
();
var
pp
=
"
videotestsrc ! autovideosink
"
;
control
.
pipeline
=
pp
;
compare
(
spyPipeline
.
count
,
1
);
...
...
@@ -85,10 +103,20 @@ Item {
}
function
test_setProp
()
{
spyPipeline
.
clear
();
control
.
pipeline
=
"
videotestsrc name=src ! autovideosink
"
;
compare
(
spyPipeline
.
count
,
2
);
compare
(
spyPipeline
.
count
,
1
);
control
.
set
(
"
src
"
,
{
"
num-buffers
"
:
1
});
compare
(
player
.
error
,
MediaPlayer
.
NoError
);
}
function
test_pipelineWithoutOutput
()
{
spyPipeline2
.
clear
();
var
pp
=
"
videotestsrc ! autovideosink
"
;
control2
.
pipeline
=
pp
;
compare
(
spyPipeline2
.
count
,
1
);
compare
(
control2
.
pipeline
,
pp
);
compare
(
player2
.
error
,
MediaPlayer
.
NoError
);
}
}
}
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