Skip to content

Commit

Permalink
fix issue where preview and program would share a cropper or overlay …
Browse files Browse the repository at this point in the history
…mixer
  • Loading branch information
justjanne committed Jan 13, 2025
1 parent b8eb3f0 commit 5a7784f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions voctocore/lib/previewscene.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class PreviewScene:
and voctomix frames.
With commit() you add frames at a specified play time
"""
log = logging.getLogger('Scene')
log = logging.getLogger('PreviewScene')

def __init__(self, sources, pipeline, fps, start_sink, cropping=True):
""" initialize with a gstreamer pipeline and names
Expand Down Expand Up @@ -62,7 +62,7 @@ def bind(pad, prop):
# get mixer and cropper pad from pipeline
if self.cpads is not None:
cropperpad = (pipeline
.get_by_name("cropper-%s" % source))
.get_by_name("precropper-%s" % source))
self.cpads[source] = {
'croptop': bind(cropperpad, 'top'),
'cropleft': bind(cropperpad, 'left'),
Expand Down
8 changes: 4 additions & 4 deletions voctocore/lib/videopremix.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def __init__(self):
self.bin += """\
! queue
max-size-time=3000000000
name=queue-overlay
name=queue-preoverlay
! gdkpixbufoverlay
name=overlay
name=preoverlay
overlay-width={width}
overlay-height={height}
""".format(
Expand Down Expand Up @@ -83,15 +83,15 @@ def __init__(self):
video-{name}.
! queue
max-size-time=3000000000
name=queue-video-{name}
name=queue-prevideo-{name}
! videopremixer.
""".format(name=background)

for idx, name in enumerate(self.sources):
self.bin += """
video-{name}.
! videobox
name=cropper-{name}
name=precropper-{name}
! queue
max-size-time=3000000000
name=queue-videopremixer-{name}
Expand Down

0 comments on commit 5a7784f

Please sign in to comment.