gstd icon indicating copy to clipboard operation
gstd copied to clipboard

list of supported get/set types

Open rectoyon opened this issue 12 years ago • 2 comments

I'd like to switch between inputs using a pipeline such as this gst-client --session create "videotestsrc pattern=0 ! input-selector name=sel ! ximagesink videotestsrc pattern=1 ! sel."

Now, I'd like to select the active input pad, using something like this gst-client --session -p 0 set sel active-pad GstPad 1

But, GstPad isn't an accepted type and I'm not even sure what the number should be following GstPad. Normally, I'd do something like sel.getPad("sink1") to resolve the name.

Anyone have any experience with input-selector and/or resolving pad names?

rectoyon avatar May 23 '13 16:05 rectoyon

I ran

gst-inspect input-selector

and saw

Element Properties:
  n-pads              : The number of sink pads
                        flags: readable
                        Unsigned Integer. Range: 0 - 4294967295 Default: 0 
  active-pad          : The currently active sink pad
                        flags: readable, writable
                        Object of type "GstPad"
  sync-streams        : Synchronize inactive streams to the running time of the active stream
                        flags: readable, writable
                        Boolean. Default: false

Then I ran

gst-client help set

and got

Parse single command interactive:
Command: set
Description:    Sets an element's property value of the pipeline
        Supported s include: boolean, integer, int64, and string
Syntax: set    

so I suspect you can do something like

gst-client --session -p 0 set sel integer 1

fischer avatar May 23 '13 17:05 fischer

rcagley@rcagley-VirtualBox:~$ gst-client --session -p 0 set sel integer 1 Parse single command interactive: Error: Missing argument.Execute:'help set'

Your command doesn't provide an element to set for "sel", but trying this is the obvious first thought. gst-client --session -p 0 set sel active-pad integer 1

But, see this line... active-pad : The currently active sink pad flags: readable, writable Object of type "GstPad"

It's not of type integer. It's of type "GstPad".

So, I'm to assume this won't work? There is no way to resolve pad names, such as sel.getPad("sink1")? Cool if that's the case, I was just hoping to find a set of supported types...I guess I can dig into the code if this isn't documented.

rectoyon avatar May 23 '13 18:05 rectoyon