FFmpeg
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
tools
zmqshell.py
Go to the documentation of this file.
1
#!/usr/bin/env python2
2
3
import
sys, zmq, cmd
4
5
class
LavfiCmd
(cmd.Cmd):
6
prompt =
'lavfi> '
7
8
def
__init__
(self, bind_address):
9
context = zmq.Context()
10
self.
requester
= context.socket(zmq.REQ)
11
self.requester.connect(bind_address)
12
cmd.Cmd.__init__(self)
13
14
def
onecmd
(self, cmd):
15
if
cmd ==
'EOF'
:
16
sys.exit(0)
17
print
'Sending command:[%s]'
% cmd
18
self.requester.send(cmd)
19
message = self.requester.recv()
20
print
'Received reply:[%s]'
% message
21
22
try
:
23
bind_address = sys.argv[1]
if
len
(sys.argv) > 1
else
"tcp://localhost:5555"
24
LavfiCmd
(bind_address).cmdloop(
'FFmpeg libavfilter interactive shell'
)
25
except
KeyboardInterrupt:
26
pass
zmqshell.LavfiCmd.__init__
def __init__
Definition:
zmqshell.py:8
zmqshell.LavfiCmd.requester
requester
Definition:
zmqshell.py:10
zmqshell.LavfiCmd.onecmd
def onecmd
Definition:
zmqshell.py:14
len
int len
Definition:
vorbis_enc_data.h:452
zmqshell.LavfiCmd
Definition:
zmqshell.py:5
Generated on Fri Jan 12 2018 01:46:02 for FFmpeg by
1.8.6