Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#17: add short_repr for input and output nodes
  • Loading branch information
kkroening committed Jul 6, 2017
commit c6e2f05e5b1509d0d262fcee56a348db520c02f4
11 changes: 10 additions & 1 deletion ffmpeg/nodes.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import unicode_literals

from builtins import object
from .dag import KwargReprNode
from ._utils import get_hash_int
from builtins import object
import os


def _is_of_types(obj, types):
Expand Down Expand Up @@ -115,6 +116,10 @@ def __init__(self, name, args=[], kwargs={}):
kwargs=kwargs
)

@property
def short_repr(self):
return os.path.basename(self.kwargs['filename'])


class FilterNode(Node):
def __init__(self, stream_spec, name, max_inputs=1, args=[], kwargs={}):
Expand Down Expand Up @@ -152,6 +157,10 @@ def __init__(self, stream, name, args=[], kwargs={}):
kwargs=kwargs
)

@property
def short_repr(self):
return os.path.basename(self.kwargs['filename'])


class OutputStream(Stream):
def __init__(self, upstream_node, upstream_label):
Expand Down