Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
f3515268
Unverified
Commit
f3515268
authored
Mar 11, 2020
by
Don Gagne
Committed by
GitHub
Mar 11, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8547 from andrewvoznytsa/pr-gstqgcvideosinkbin-update-4.0
Add "sync" option to gstqgcvideosinkbin
parents
2a250a6c
30770371
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
gstqgcvideosinkbin.c
src/VideoStreaming/gstqgcvideosinkbin.c
+18
-0
No files found.
src/VideoStreaming/gstqgcvideosinkbin.c
View file @
f3515268
...
...
@@ -46,6 +46,7 @@ enum {
PROP_WIDGET
,
PROP_FORCE_ASPECT_RATIO
,
PROP_PIXEL_ASPECT_RATIO
,
PROP_SYNC
,
};
#define PROP_ENABLE_LAST_SAMPLE_NAME "enable-last-sample"
...
...
@@ -53,11 +54,13 @@ enum {
#define PROP_WIDGET_NAME "widget"
#define PROP_FORCE_ASPECT_RATIO_NAME "force-aspect-ratio"
#define PROP_PIXEL_ASPECT_RATIO_NAME "pixel-aspect-ratio"
#define PROP_SYNC_NAME "sync"
#define DEFAULT_ENABLE_LAST_SAMPLE TRUE
#define DEFAULT_FORCE_ASPECT_RATIO TRUE
#define DEFAULT_PAR_N 0
#define DEFAULT_PAR_D 1
#define DEFAULT_SYNC TRUE
static
GstBinClass
*
parent_class
;
...
...
@@ -256,6 +259,13 @@ _vsb_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *psp
gst_value_set_fraction
(
value
,
num
,
den
);
}
while
(
0
);
break
;
case
PROP_SYNC
:
do
{
gboolean
enable
=
FALSE
;
g_object_get
(
G_OBJECT
(
vsb
->
qmlglsink
),
PROP_SYNC_NAME
,
&
enable
,
NULL
);
g_value_set_boolean
(
value
,
enable
);
}
while
(
0
);
break
;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID
(
object
,
prop_id
,
pspec
);
break
;
...
...
@@ -282,6 +292,9 @@ _vsb_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpe
case
PROP_PIXEL_ASPECT_RATIO
:
g_object_set
(
G_OBJECT
(
vsb
->
qmlglsink
),
PROP_PIXEL_ASPECT_RATIO_NAME
,
gst_value_get_fraction_numerator
(
value
),
gst_value_get_fraction_denominator
(
value
),
NULL
);
break
;
case
PROP_SYNC
:
g_object_set
(
G_OBJECT
(
vsb
->
qmlglsink
),
PROP_SYNC_NAME
,
g_value_get_boolean
(
value
),
NULL
);
break
;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID
(
object
,
prop_id
,
pspec
);
break
;
...
...
@@ -354,6 +367,11 @@ _vsb_class_init(GstQgcVideoSinkBinClass *klass)
G_MAXINT
,
1
,
1
,
1
,
(
GParamFlags
)(
G_PARAM_READWRITE
|
G_PARAM_STATIC_STRINGS
)));
g_object_class_install_property
(
gobject_klass
,
PROP_SYNC
,
g_param_spec_boolean
(
PROP_SYNC_NAME
,
"Sync"
,
"Sync on the clock"
,
DEFAULT_SYNC
,
(
GParamFlags
)(
G_PARAM_READWRITE
|
G_PARAM_STATIC_STRINGS
)));
gst_element_class_set_static_metadata
(
gstelement_klass
,
"QGC Video Sink Bin"
,
"Sink/Video/Bin"
,
"Video rendering for QGC"
,
...
...
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