Skip to content

Commit

Permalink
make-xges: set xges project name from bbb metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
jhenstridge committed Sep 11, 2020
1 parent 9a3e800 commit 6b98756
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion make-xges.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __init__(self, opts):

# Construct the presentation
self.set_track_caps()
self.set_project_metadata()
self.add_webcams()
self.add_slides()
self.add_deskshare()
Expand Down Expand Up @@ -123,7 +124,7 @@ def set_track_caps(self):
# Add an encoding profile for the benefit of Pitivi
profile = GstPbutils.EncodingContainerProfile.new(
'MP4', 'bbb-render encoding profile',
Gst.Caps.from_string('video/quicktime, variant=(string)iso'))
Gst.Caps.from_string('video/quicktime,variant=iso'))
profile.add_profile(GstPbutils.EncodingVideoProfile.new(
Gst.Caps.from_string('video/x-h264,profile=high'), None,
self.video_track.props.restriction_caps, 0))
Expand All @@ -132,6 +133,12 @@ def set_track_caps(self):
None, self.audio_track.props.restriction_caps, 0))
self.project.add_encoding_profile(profile)

def set_project_metadata(self):
doc = ET.parse(os.path.join(self.opts.basedir, 'metadata.xml'))
name = doc.find('./meta/name')
self.project.register_meta_string(
GES.MetaFlag.READWRITE, 'name', name.text.strip())

def add_webcams(self):
layer = self._add_layer('Camera')
asset = self._get_asset(
Expand Down

0 comments on commit 6b98756

Please sign in to comment.