Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
56f7e29d
Commit
56f7e29d
authored
May 19, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: add zmqshell.py.
parent
68c4633f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
zmqshell.py
tools/zmqshell.py
+26
-0
No files found.
tools/zmqshell.py
0 → 100755
View file @
56f7e29d
#!/usr/bin/env python2
import
sys
,
zmq
,
cmd
class
LavfiCmd
(
cmd
.
Cmd
):
prompt
=
'lavfi> '
def
__init__
(
self
,
bind_address
):
context
=
zmq
.
Context
()
self
.
requester
=
context
.
socket
(
zmq
.
REQ
)
self
.
requester
.
connect
(
bind_address
)
cmd
.
Cmd
.
__init__
(
self
)
def
onecmd
(
self
,
cmd
):
if
cmd
==
'EOF'
:
sys
.
exit
(
0
)
print
'Sending command:[
%
s]'
%
cmd
self
.
requester
.
send
(
cmd
)
message
=
self
.
requester
.
recv
()
print
'Received reply:[
%
s]'
%
message
try
:
bind_address
=
sys
.
argv
[
1
]
if
len
(
sys
.
argv
)
>
1
else
"tcp://localhost:5555"
LavfiCmd
(
bind_address
)
.
cmdloop
(
'FFmpeg libavfilter interactive shell'
)
except
KeyboardInterrupt
:
pass
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment