Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier/possible to override baked in constants. #24

Open
CarlFK opened this issue Jul 31, 2020 · 0 comments
Open

Make it easier/possible to override baked in constants. #24

CarlFK opened this issue Jul 31, 2020 · 0 comments

Comments

@CarlFK
Copy link
Owner

CarlFK commented Jul 31, 2020

Make it easier/possible to override baked in constants.
a.
args.video_attribs,
example:

    elif args.video_source == 'ximage':
        # startx=0 starty=0 endx=1919 endy=1079 !
        video_src = """
            ximagesrc {attribs} name=videosrc
                   use-damage=false !
            """

--video-attribs "startx=0 starty=0" will be added to "use-damage=false" (good)
but there isn't a way to set use-damage=true (bad)

    elif args.video_source == 'ximage':
        # startx=0 starty=0 endx=1919 endy=1079 !
        video_src = """ ximagesrc {attribs} name=videosrc """
        video_attribs = "use-damage=false"
    ...
    # make a dict out of video_attribs and args.video_attribs, merge.

>>> d = dict([kv.split('=') for kv in "use-damage=false foo=bar".split()])
# {'use-damage': 'false', 'foo': 'bar'}
>>> d.update({"foo": 'baz'})
>>> d
{'use-damage': 'false', 'foo': 'baz'}
>>> ' '.join(["{}={}".format(k,d[k]) for k in d ] )
'use-damage=false foo=baz'

Maybe code the defaults as a dict, but accept a gst style string to keep it looking consistent with other gst pipelines.

Then the same thing for args.video_elements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant