diff options
author | MaZderMind <github@mazdermind.de> | 2014-07-31 23:57:28 +0200 |
---|---|---|
committer | MaZderMind <github@mazdermind.de> | 2014-07-31 23:57:28 +0200 |
commit | c74eedab1300408607ba2972b9d70991d93ec4a0 (patch) | |
tree | 0c858f5d75da9a63b5a27d9061b6bc933d744875 | |
parent | a5ef9e4ee04e47bf15516b4ece91150f5ea4b5eb (diff) |
specify entry methods for control-server
-rw-r--r-- | voctocore/videomix.py | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/voctocore/videomix.py b/voctocore/videomix.py index bce44a8..2574a8d 100644 --- a/voctocore/videomix.py +++ b/voctocore/videomix.py @@ -210,3 +210,62 @@ class Videomix: # add to pipeline and pass the bin upstream self.pipeline.add(camberabin) yield camberabin + + + ### below are access-methods for the ControlServer + + # return number of available audio sources + def numAudioSources(): + pass + + # switch audio to the selected audio + def switchAudio(audiosrc): + liveaudio = self.pipeline.get_by_name('liveaudio') + pad = liveaudio.get_static_pad('sink_{}'.format(audiosrc)) + if pad is None: + return False + + liveaudio.set_property('active-pad', pad) + return True + + + # return number of available video sources + def numVideoSources(): + pass + + # switch audio to the selected video + def switchVideo(videosrc): + livevideo = self.pipeline.get_by_name('livevideo') + pad = livevideo.get_static_pad('sink_{}'.format(videosrc)) + # TODO set other videos to alpha = 0 + pad.set_property('alpha', 1) + + # fade video to the selected video + def fadeVideo(videosrc): + pass + + + # switch video-source in the PIP to the selected video + def setPipVideo(videosrc): + pass + + # fade video-source in the PIP to the selected video + def fadePipVideo(videosrc): + pass + + # enumeration of possible PIP-Placements + class PipPlacements(): + TopLeft, TopRight, BottomLeft, BottomRight = range(4) + + # place PIP in the selected position + def setPipPlacement(placement): + assert(isinstance(placement, PipPlacements)) + pass + + # show or hide PIP + def setPipStatus(enabled): + pass + + # fade PIP in our out + def fadePipStatus(enabled): + pass |