gstd-1.x icon indicating copy to clipboard operation
gstd-1.x copied to clipboard

What is the purpose of `list_pipelines`?

Open jakew009 opened this issue 5 years ago • 4 comments

When running the list_pipelines command, we get the following output (with 1 pipeline playing called 'source'):

{
  "code" : 0,
  "description" : "Success",
  "response" : {
    "properties" : [
        {
            "name" : "parent",
            "value" : "NULL",
            "param" : {
                "description" : "The parent of the object",
                "type" : "GstObject",
                "access" : "((GstdParamFlags) READ | 226)"
            }
        },
        {
            "name" : "name",
            "value" : "\"pipelines\"",
            "param" : {
                "description" : "The name of the current Gstd session",
                "type" : "gchararray",
                "access" : "((GstdParamFlags) READ | 234)"
            }
        },
        {
            "name" : "count",
            "value" : 1,
            "param" : {
                "description" : "The amount of nodes in the list",
                "type" : "guint",
                "access" : "((GstdParamFlags) READ)"
            }
        },
        {
            "name" : "node-type",
            "value" : "((gpointer) 0x55565d2db900)",
            "param" : {
                "description" : "The type of the node that the list holds",
                "type" : "GType",
                "access" : "((GstdParamFlags) READ | 10)"
            }
        },
        {
            "name" : "flags",
            "value" : "((GstdParamFlags) CREATE | READ | UPDATE | DELETE)",
            "param" : {
                "description" : "The resource access flags",
                "type" : "GstdParamFlags",
                "access" : "((GstdParamFlags) READ | 2)"
            }
        }
    ],
  "nodes" : []
}
}

Unless I am missing something, this is pretty useless and tells us next to nothing?

How do we get a list of all the running pipelines and info about them?

jakew009 avatar Aug 24 '20 18:08 jakew009

Indeed this looks like a bug. The “nodes” member should contain the actual list of the pipelines. I see the count is 1 but the nodes list is empty. Here’s an output of a correct output:

… { "name" : "count", "value" : 1, "param" : { "description" : "The amount of nodes in the list", "type" : "guint", "access" : "((GstdParamFlags) READ)" } }, { "name" : "node-type", "value" : "((gpointer) 0x7fc82a461cc0)", "param" : { "description" : "The type of the node that the list holds", "type" : "GType", "access" : "((GstdParamFlags) READ | 10)" } }, { "name" : "flags", "value" : "((GstdParamFlags) CREATE | READ | UPDATE | DELETE)", "param" : { "description" : "The resource access flags", "type" : "GstdParamFlags", "access" : "((GstdParamFlags) READ | 2)" } } ], "nodes" : [{ "name" : "p" }] } }

Let me look into this. Michael

On Aug 24, 2020, at 12:39, jakew009 [email protected] wrote:

When running the list_pipelines command, we get the following output (with 1 pipeline playing called 'source'):

{ "code" : 0, "description" : "Success", "response" : { "properties" : [ { "name" : "parent", "value" : "NULL", "param" : { "description" : "The parent of the object", "type" : "GstObject", "access" : "((GstdParamFlags) READ | 226)" } }, { "name" : "name", "value" : ""pipelines"", "param" : { "description" : "The name of the current Gstd session", "type" : "gchararray", "access" : "((GstdParamFlags) READ | 234)" } }, { "name" : "count", "value" : 1, "param" : { "description" : "The amount of nodes in the list", "type" : "guint", "access" : "((GstdParamFlags) READ)" } }, { "name" : "node-type", "value" : "((gpointer) 0x55565d2db900)", "param" : { "description" : "The type of the node that the list holds", "type" : "GType", "access" : "((GstdParamFlags) READ | 10)" } }, { "name" : "flags", "value" : "((GstdParamFlags) CREATE | READ | UPDATE | DELETE)", "param" : { "description" : "The resource access flags", "type" : "GstdParamFlags", "access" : "((GstdParamFlags) READ | 2)" } } ], "nodes" : [] } } Unless I am missing something, this is pretty useless and tells us next to nothing?

How do we get a list of all the running pipelines and info about them?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/RidgeRun/gstd-1.x/issues/210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFPIOD6U7SLUDL2T3S2523SCKXULANCNFSM4QJZOPBQ.

michaelgruner avatar Aug 24 '20 19:08 michaelgruner

Thanks Michael,

What is the recommended way of getting the current status of a pipeline? To find out whether it is playing / stopped / in an error state etc? I see that list_pipelines will give us the name of the pipeline but no indication of it's current status.

Thanks Jake

jakew009 avatar Aug 25 '20 08:08 jakew009

For the state of the pipeline you can do a read /pipelines/pipeline_name/state, where pipeline_name is the name you gave to the pipeline.

michaelgruner avatar Sep 28 '20 21:09 michaelgruner

For the state of the pipeline you can do a read /pipelines/pipeline_name/state, where pipeline_name is the name you gave to the pipeline.

Can this be mentioned in the wiki documentation? I was wondering this same thing.

jcormier avatar Oct 29 '21 15:10 jcormier