forked from duzy/gst-switch
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
122 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
""" | ||
Usage - | ||
`python console.py` | ||
(Cmd)help | ||
""" | ||
import sys | ||
import os | ||
sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/python-api') | ||
|
||
from gstswitch.server import Server | ||
from gstswitch.helpers import * | ||
from gstswitch.controller import Controller | ||
import cmd | ||
import inspect | ||
|
||
|
||
|
||
class Console(cmd.Cmd): | ||
|
||
def do_get_compose_port(self, line): | ||
self.c = Controller() | ||
self.c.establish_connection() | ||
print self.c.get_compose_port() | ||
|
||
def help_get_compose_port(self): | ||
print "Get the Compose Port" | ||
|
||
def do_get_encode_port(self, line): | ||
self.c = Controller() | ||
self.c.establish_connection() | ||
print self.c.get_encode_port() | ||
|
||
def do_get_audio_port(self, line): | ||
self.c = Controller() | ||
self.c.establish_connection() | ||
print self.c.get_audio_port() | ||
|
||
def do_get_preview_ports(self, line): | ||
self.c = Controller() | ||
self.c.establish_connection() | ||
print self.c.get_preview_ports() | ||
|
||
def do_set_composite_mode(self, line): | ||
self.c = Controller() | ||
self.c.establish_connection() | ||
print self.c.set_composite_mode(int(line)) | ||
|
||
|
||
|
||
|
||
if __name__ == '__main__': | ||
con = Console() | ||
con.cmdloop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters