## AgsGstreamerPort

AgsGstreamerPort — gstreamer resource.

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_GSTREAMER_PORT_GET_OBJ_MUTEX()
gboolean | ags_gstreamer_port_test_flags ()
void | ags_gstreamer_port_set_flags ()
void | ags_gstreamer_port_unset_flags ()
GList * | ags_gstreamer_port_find ()
void | ags_gstreamer_port_register ()
void | ags_gstreamer_port_unregister ()
guint | ags_gstreamer_port_get_fixed_size ()
void | ags_gstreamer_port_set_samplerate ()
void | ags_gstreamer_port_set_pcm_channels ()
void | ags_gstreamer_port_set_buffer_size ()
void | ags_gstreamer_port_set_format ()
void | ags_gstreamer_port_set_cache_buffer_size ()
guint | ags_gstreamer_port_get_latency ()
AgsGstreamerPort * | ags_gstreamer_port_new ()

## Properties

AgsGstreamerClient * | gstreamer-client | Read / Write
AgsGstreamerDevin * | gstreamer-devin | Read / Write
AgsGstreamerDevout * | gstreamer-devout | Read / Write
char * | port-name | Read / Write

## Types and Values

#define | AGS_GSTREAMER_PORT_DEFAULT_CACHE_BUFFER_SIZE
enum | AgsGstreamerPortFlags

## Object Hierarchy

        GFlags
        ╰── AgsGstreamerPortFlags
        GObject
        ╰── AgsGstreamerPort

## Includes

    #include <ags/audio/gstreamer/ags_gstreamer_port.h>

## Description

The AgsGstreamerPort represents either a gstreamer sequencer or soundcard to communicate with.

## Functions

### AGS_GSTREAMER_PORT_GET_OBJ_MUTEX()

    #define AGS_GSTREAMER_PORT_GET_OBJ_MUTEX(obj) (&(((AgsGstreamerPort *) obj)->obj_mutex))

### ags_gstreamer_port_test_flags ()

    gboolean
    ags_gstreamer_port_test_flags (AgsGstreamerPort *gstreamer_port,
                                   AgsGstreamerPortFlags flags);

Test `flags` to be set on `gstreamer_port` .

#### Parameters

gstreamer_port | the AgsGstreamerPort |
flags | the flags |

#### Returns

`TRUE` if flags are set, else `FALSE`

Since: 3.6.0

### ags_gstreamer_port_set_flags ()

    void
    ags_gstreamer_port_set_flags (AgsGstreamerPort *gstreamer_port,
                                  AgsGstreamerPortFlags flags);

Enable a feature of `gstreamer_port` .

#### Parameters

gstreamer_port | the AgsGstreamerPort |
flags | see AgsGstreamerPortFlags |

Since: 3.6.0

### ags_gstreamer_port_unset_flags ()

    void
    ags_gstreamer_port_unset_flags (AgsGstreamerPort *gstreamer_port,
                                    AgsGstreamerPortFlags flags);

Disable a feature of `gstreamer_port` .

#### Parameters

gstreamer_port | the AgsGstreamerPort |
flags | see AgsGstreamerPortFlags |

Since: 3.6.0

### ags_gstreamer_port_find ()

    GList *
    ags_gstreamer_port_find (GList *gstreamer_port,
                             gchar *port_name);

Finds next match of `port_name` in `gstreamer_port` .

#### Parameters

gstreamer_port | the GList containig AgsGstreamerPort. | [element-type AgsAudio.GstreamerPort][transfer none]
port_name | the port name to find |

#### Returns

the next matching GList or `NULL`.

[element-type AgsAudio.GstreamerPort][transfer none]

Since: 3.6.0

### ags_gstreamer_port_register ()

    void
    ags_gstreamer_port_register (AgsGstreamerPort *gstreamer_port,
                                 gchar *port_name,
                                 gboolean is_audio,
                                 gboolean is_midi,
                                 gboolean is_output);

Register a new gstreamer port and read uuid. Creates a new AgsSequencer or AgsSoundcard object.

#### Parameters

gstreamer_port | the AgsGstreamerPort |
port_name | the name as string |
is_audio | if `TRUE` interpreted as audio port |
is_midi | if `TRUE` interpreted as midi port |
is_output | if `TRUE` port is acting as output, otherwise as input |

Since: 3.6.0

### ags_gstreamer_port_unregister ()

    void
    ags_gstreamer_port_unregister (AgsGstreamerPort *gstreamer_port);

### ags_gstreamer_port_get_fixed_size ()

    guint
    ags_gstreamer_port_get_fixed_size (AgsGstreamerPort *gstreamer_port);

### ags_gstreamer_port_set_samplerate ()

    void
    ags_gstreamer_port_set_samplerate (AgsGstreamerPort *gstreamer_port,
                                       guint samplerate);

### ags_gstreamer_port_set_pcm_channels ()

    void
    ags_gstreamer_port_set_pcm_channels (AgsGstreamerPort *gstreamer_port,
                                         guint pcm_channels);

### ags_gstreamer_port_set_buffer_size ()

    void
    ags_gstreamer_port_set_buffer_size (AgsGstreamerPort *gstreamer_port,
                                        guint buffer_size);

### ags_gstreamer_port_set_format ()

    void
    ags_gstreamer_port_set_format (AgsGstreamerPort *gstreamer_port,
                                   AgsSoundcardFormat format);

### ags_gstreamer_port_set_cache_buffer_size ()

    void
    ags_gstreamer_port_set_cache_buffer_size
                                   (AgsGstreamerPort *gstreamer_port,
                                    guint cache_buffer_size);

### ags_gstreamer_port_get_latency ()

    guint
    ags_gstreamer_port_get_latency (AgsGstreamerPort *gstreamer_port);

Gets latency.

#### Parameters

gstreamer_port | the AgsGstreamerPort |

Since: 3.6.0

### ags_gstreamer_port_new ()

    AgsGstreamerPort *
    ags_gstreamer_port_new (GObject *gstreamer_client);

Create a new instance of AgsGstreamerPort.

#### Parameters

gstreamer_client | the AgsGstreamerClient assigned to |

#### Returns

the new AgsGstreamerPort

Since: 3.6.0

## Types and Values

### AGS_GSTREAMER_PORT_DEFAULT_CACHE_BUFFER_SIZE

    #define AGS_GSTREAMER_PORT_DEFAULT_CACHE_BUFFER_SIZE (4096)

### enum AgsGstreamerPortFlags

Enum values to control the behavior or indicate internal state of AgsGstreamerPort by enable/disable as flags.

#### Members

AGS_GSTREAMER_PORT_REGISTERED | the port was registered |
AGS_GSTREAMER_PORT_IS_AUDIO | the port provides audio data |
AGS_GSTREAMER_PORT_IS_MIDI | the port provides midi data |
AGS_GSTREAMER_PORT_IS_OUTPUT | the port does output |
AGS_GSTREAMER_PORT_IS_INPUT | the port does input |

## Property Details

### The `“gstreamer-client”` property

      “gstreamer-client”         AgsGstreamerClient *

The assigned AgsGstreamerClient.

Owner: AgsGstreamerPort

Flags: Read / Write

Since: 3.6.0

### The `“gstreamer-devin”` property

      “gstreamer-devin”          AgsGstreamerDevin *

The assigned AgsGstreamerDevout.

Owner: AgsGstreamerPort

Flags: Read / Write

Since: 3.6.0

### The `“gstreamer-devout”` property

      “gstreamer-devout”         AgsGstreamerDevout *

The assigned AgsGstreamerDevout.

Owner: AgsGstreamerPort

Flags: Read / Write

Since: 3.6.0

### The `“port-name”` property

      “port-name”                char *

The gstreamer soundcard indentifier

Owner: AgsGstreamerPort

Flags: Read / Write

Default value: NULL

Since: 3.6.0