GStreamer Daemon - C API: Difference between revisions

From RidgeRun Developer Wiki
mNo edit summary
(Add actions)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{GStreamer Daemon Page |[[GStreamer Daemon - API Reference|API Reference]]|[[GStreamer Daemon - Python API|Python API]]|
{{GStreamer Daemon/Head | previous=API Reference | next=Python API}}


__TOC__
__TOC__
Line 90: Line 90:


------------------------------------------------------------------------------------------------------------------------------------------------------------------------  
------------------------------------------------------------------------------------------------------------------------------------------------------------------------  
====pipeline_get_graph ====
Code
pipeline_get_graph <i><name> </i>


Get the <i>graph</i> of the  <i>pipeline</i> named <i>name</i> the graph is in GraphViz dot format.
<b><i>Parameters</i></b>
:: name: name of the pipeline. 
<b><i>Returns</i></b>
:: a new code: 0 "success" , 10 "Bad command"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
====pipeline_verbose ====
Code
pipeline_verbose <i><name> </i> <i><value> </i>
Enable/disable the verbose mode of the  <i>pipeline</i> named <i>name</i>.
Verbose mode is like the <i>-v</i> option on gst-launch.
<b><i>Parameters</i></b>
:: name: name of the pipeline. 
:: value: true or false, to enable or disable. 
<b><i>Returns</i></b>
:: a new code: 0 "success" ,9 "Cannot update this resource", 10 "Bad command",
------------------------------------------------------------------------------------------------------------------------------------------------------------------------


====list_pipelines====
====list_pipelines====
Line 99: Line 130:


<b><i>Returns</i></b>  
<b><i>Returns</i></b>  
:: a new code: 0 "success"  
:: a new code: 0 "success"
 


=== Elements ===
=== Elements ===
Line 271: Line 301:
:: a new code: 0 "success", 10 "Bad command", 13 "Bad value"
:: a new code: 0 "success", 10 "Bad command", 13 "Bad value"


=== Element Actions ===
==== action_emit ====
Code
action_emit <i><pipeline> <element> <action></i>
Emits an action to a selected element <i>name</i> .
<b><i>Parameters</i></b>
:: pipeline: name of the pipeline.
:: element: name of the pipeline.
:: action: name of the action to trigger.
<b><i>Returns</i></b>
:: a new code: 0 "success", 10 "Bad command"




Line 343: Line 390:
<b><i>Returns</i></b>  
<b><i>Returns</i></b>  
:: a new code: 0 "success", 10 "Bad command", 13 "Bad value" 17 "Event error"
:: a new code: 0 "success", 10 "Bad command", 13 "Bad value" 17 "Event error"


== Low Level API ==
== Low Level API ==
Line 412: Line 458:




}}
{{GStreamer Daemon/Foot | previous=API Reference | next=Python API}}

Latest revision as of 18:17, 3 March 2022



Previous: API Reference Index Next: Python API




This wiki shows the API for Gstd with a little description of each command and the arguments.

High Level API

Pipelines

pipeline_create

Code 
pipeline_create <name> <description>

Creates a new pipeline named after name using the description gst-launch syntax.

Parameters

name: name of the pipeline to create.
description: pipeline with gst-launch syntax.

Returns

a new code: 0 "success" , 2 "Bad pipeline description", 9 "Cannot update this resource", 10 "Bad command"




pipeline_play

Code 
pipeline_play <name> 

Puts the pipeline named name in the PLAYING state.

Parameters

name: name of the pipeline to create.

Returns

a new code: 0 "success" , 2 "Bad pipeline description", 9 "Cannot update this resource", 10 "Bad command"




pipeline_pause

Code 
pipeline_pause <name> 

Puts the pipeline named name in the PAUSE state.

Parameters

name: name of the pipeline to create.

Returns

a new code: 0 "success" , 2 "Bad pipeline description", 9 "Cannot update this resource", 10 "Bad command"




pipeline_stop

Code 
pipeline_stop <name> 

Puts the pipeline named name in the NULL state.

Parameters

name: name of the pipeline to create.

Returns

a new code: 0 "success" , 2 "Bad pipeline description", 9 "Cannot update this resource", 10 "Bad command"




pipeline_delete

Code 
pipeline_delete <name> 

Puts the pipeline named name, stopping it first if necessary.

Parameters

name: name of the pipeline to create.

Returns

a new code: 0 "success" , 2 "Bad pipeline description", 9 "Cannot update this resource", 10 "Bad command"



pipeline_get_graph

Code 
pipeline_get_graph <name> 

Get the graph of the pipeline named name the graph is in GraphViz dot format.

Parameters

name: name of the pipeline.

Returns

a new code: 0 "success" , 10 "Bad command"



pipeline_verbose

Code 
pipeline_verbose <name>  <value> 

Enable/disable the verbose mode of the pipeline named name.

Verbose mode is like the -v option on gst-launch.

Parameters

name: name of the pipeline.
value: true or false, to enable or disable.

Returns

a new code: 0 "success" ,9 "Cannot update this resource", 10 "Bad command",



list_pipelines

Code 
list_pipelines

List the pipelines in the session.

Returns

a new code: 0 "success"

Elements

element_get

Code 
element_get <name> <element> <property>

Reads the value of the property of the element in pipeline.

Parameters

name: name of the pipeline.
element: name of the element in the pipeline.
property: property of the element to read.

Returns

a new code: 0 "success", 10 "Bad command"




element_set

Code 
element_set <name> <element> <property>

Sets the value of the property of the element in pipeline.

Parameters

name: name of the pipeline.
element: name of the element in the pipeline.
property: property of the element to set.

Returns

a new code: 0 "success", 9 "Cannot update this resource", 10 "Bad command", 13 "Bad value",




list_elements

Code 
list_elements <name> 

List the elements in the pipelines in the session.

Parameters

name: name of the pipeline.

Returns

a new code: 0 "success" , 10 "Bad command"




list_properties

Code 
list_properties <name> <element> 

List the properties in the element of the pipeline.

Parameters

name: name of the pipeline.
element: name of the element in the pipeline.

Returns

a new code: 0 "success" , 10 "Bad command"


Debug

debug_enable

Code 
debug_enable <value> 

Enable or Disable the debug.

Parameters

bool value: value to enable or disable the debug (true/false).

Returns

a new code: 0 "success", 13 "Bad value"




debug_threshold

Code 
debug_threshold <threshold> 

Define the level of the debug.

Parameters

threshold: value of the level of debug.

Returns

a new code: 0 "success"




debug_color

Code 
debug_color <color> 

Enable or Disable the color on the debug log.

Parameters

bool color: value to enable or disable the color in the debug (true/false).

Returns

a new code: 0 "success", 13 "Bad value"


Bus

bus_read

Code 
bus_read <name> 

Read the bus messages in the pipeline name . (Bus example)

Parameters

name: name of the pipeline.

Returns

a new code: 0 "success", 10 "Bad command"




bus_filter

Code 
bus_filter <name> <filter>

Filter the bus messages in the pipeline name . (Bus example)

Parameters

name: name of the pipeline.
filter: name of the filter of the bus in the pipeline.

Returns

a new code: 0 "success", 10 "Bad command", 13 "Bad value"




bus_timeout

Code 
bus_timeout <name> <time_ns>

Sets the timeout of the bus in the pipeline name . (Bus example)

Parameters

name: name of the pipeline.
time_ns: time of the timeout in nanoseconds.

Returns

a new code: 0 "success", 10 "Bad command", 13 "Bad value"


Element Actions

action_emit

Code 
action_emit <pipeline> <element> <action>

Emits an action to a selected element name .

Parameters

pipeline: name of the pipeline.
element: name of the pipeline.
action: name of the action to trigger.

Returns

a new code: 0 "success", 10 "Bad command"


Events

event_eos

Code 
event_eos <name> 

Creates a new EOS event and sends it to pipeline name .

Parameters

name: name of the pipeline.

Returns

a new code: 0 "success", 10 "Bad command"




event_flush_start

Code 
event_flush_start <name> 

Creates a new flush start event and sends it to pipeline name .

Parameters

name: name of the pipeline.

Returns

a new code: 0 "success", 10 "Bad command", 17 "Event error"




event_flush_stop

Code 
event_flush_stop <name> <reset> 

Creates a new flush stop event and sends it to pipeline name .

Parameters

name: name of the pipeline.
reset: if time should be reset. Default value: true.

Returns

a new code: 0 "success", 10 "Bad command", 17 "Event error"




event_seek

Code 
event_seek <name> <rate> <flags> <format> <flags> <start-type> <start> <end-type> <end> 

Creates a new seek event and sends it to pipeline name .

Parameters

name: name of the pipeline.
rate: The new playback rate. Default value: 1.0.
format: The format of the seek values. Default value: 3.
flags: The optional seek flags. Default value: 1.
start-type: The type and flags for the new start position. Default value: 1.
start: The value of the new start position. Default value: 0.
end-type: The type and flags for the new end position. Default value: 1.
end: The value of the new end position. Default value: -1.

Returns

a new code: 0 "success", 10 "Bad command", 13 "Bad value" 17 "Event error"

Low Level API

create

Code 
create <URI> <description>

A new Create call of the argument with the description.

Parameters

URI: name of the parameter to create. example: /pipelines/<name>/event_eos
description: it can changes according to the context (pipeline or event)

Returns

a new code: 0 "success" , 2 "Bad pipeline description", 9 "Cannot update this resource", 10 "Bad command"




read

Code 
read <URI>

A new Read call of the argument.

Parameters

URI: name of the parameter to read. example: /pipelines/<name>/bus

Returns

a new code: 0 "success" , 2 "Bad pipeline description", 9 "Cannot update this resource", 10 "Bad command"




update

Code 
update <URI> <description>

A new Update call of the argument with the description.

Parameters

URI: name of the parameter to update. example: /debug/enable/
description: new value to set the resource.

Returns

a new code: 0 "success" , 2 "Bad pipeline description", 9 "Cannot update this resource", 10 "Bad command"




delete

Code 
delete <URI> 

Delete the resouce given by the URI.

Parameters

URI: name of the resource to delete. example: /pipelines/<name>/

Returns

a new code: 0 "success" , 2 "Bad pipeline description", 9 "Cannot update this resource", 10 "Bad command"



Previous: API Reference Index Next: Python API