Commit f372bd43 authored by Alexandru Băluț's avatar Alexandru Băluț

Use GObject.ParamFlags instead of deprecated constants

parent 7045e321
...@@ -101,7 +101,7 @@ class ThumbnailBin(PreviewerBin): ...@@ -101,7 +101,7 @@ class ThumbnailBin(PreviewerBin):
"uri of the media file", "uri of the media file",
"A URI", "A URI",
"", "",
GObject.PARAM_READWRITE), GObject.ParamFlags.READWRITE),
} }
def __init__(self, bin_desc="videoconvert ! videorate ! " def __init__(self, bin_desc="videoconvert ! videorate ! "
...@@ -178,11 +178,11 @@ class WaveformPreviewer(PreviewerBin): ...@@ -178,11 +178,11 @@ class WaveformPreviewer(PreviewerBin):
"uri of the media file", "uri of the media file",
"A URI", "A URI",
"", "",
GObject.PARAM_READWRITE), GObject.ParamFlags.READWRITE),
"duration": (GObject.TYPE_UINT64, "duration": (GObject.TYPE_UINT64,
"Duration", "Duration",
"Duration", "Duration",
0, GLib.MAXUINT64 - 1, 0, GObject.PARAM_READWRITE) 0, GLib.MAXUINT64 - 1, 0, GObject.ParamFlags.READWRITE)
} }
def __init__(self): def __init__(self):
......
...@@ -165,7 +165,7 @@ class TrackElementAction(UndoableAction): ...@@ -165,7 +165,7 @@ class TrackElementAction(UndoableAction):
self.track_element = track_element self.track_element = track_element
self.track_element_props = [] self.track_element_props = []
for prop in self.track_element.list_children_properties(): for prop in self.track_element.list_children_properties():
if not prop.flags & GObject.PARAM_WRITABLE or \ if not prop.flags & GObject.ParamFlags.WRITABLE or \
prop.name in PROPS_TO_IGNORE: prop.name in PROPS_TO_IGNORE:
continue continue
prop_name = child_property_name(prop) prop_name = child_property_name(prop)
......
...@@ -860,7 +860,6 @@ class GstElementSettingsWidget(Gtk.Box, Loggable): ...@@ -860,7 +860,6 @@ class GstElementSettingsWidget(Gtk.Box, Loggable):
if src_caps_fields: if src_caps_fields:
srccaps = self.element.get_static_pad('src').get_pad_template().caps srccaps = self.element.get_static_pad('src').get_pad_template().caps
vals = {}
for field, prefered_value in src_caps_fields.items(): for field, prefered_value in src_caps_fields.items():
gvalue = srccaps[0][field] gvalue = srccaps[0][field]
if isinstance(gvalue, Gst.ValueList) and isinstance(prefered_value, Gst.ValueList): if isinstance(gvalue, Gst.ValueList) and isinstance(prefered_value, Gst.ValueList):
...@@ -1070,7 +1069,7 @@ class GstElementSettingsWidget(Gtk.Box, Loggable): ...@@ -1070,7 +1069,7 @@ class GstElementSettingsWidget(Gtk.Box, Loggable):
"""Gets a name/value dict with the properties.""" """Gets a name/value dict with the properties."""
values = {} values = {}
for prop, widget in self.properties.items(): for prop, widget in self.properties.items():
if not prop.flags & GObject.PARAM_WRITABLE: if not prop.flags & GObject.ParamFlags.WRITABLE:
continue continue
value = widget.getWidgetValue() value = widget.getWidgetValue()
if value is not None and (value != prop.default_value or with_default): if value is not None and (value != prop.default_value or with_default):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment