## FsTransmitter FsTransmitter — A transmitter object linked to a session |

## Functions

FsTransmitter * | fs_transmitter_new ()
FsStreamTransmitter * | fs_transmitter_new_stream_transmitter ()
GType | fs_transmitter_get_stream_transmitter_type ()
void | fs_transmitter_emit_error ()
char ** | fs_transmitter_list_available ()

## Properties

guint | components | Read / Write / Construct Only
gboolean | do-timestamp | Read / Write
GstElement * | gst-sink | Read
GstElement * | gst-src | Read
guint | tos | Read / Write

## Signals

void | error | Run Last

## Types and Values

struct | FsTransmitter
struct | FsTransmitterClass

## Object Hierarchy

        GObject
        ╰── FsTransmitter

## Includes

    #include <farstream/fs-transmitter.h>

## Description

This object is the base implementation of a Farstream Transmitter. It needs to be derived and implement by a Farstream transmitter. A Farstream Transmitter provides a GStreamer network sink and source to be used for the Farstream Session. It creates FsStreamTransmitter objects which are used to set the different per-stream properties

## Functions

### fs_transmitter_new ()

    FsTransmitter *
    fs_transmitter_new (const gchar *type,
                        guint components,
                        guint tos,
                        GError **error);

This function creates a new transmitter of the requested type. It will load the appropriate plugin as required.

#### Parameters

type | The type of transmitter to create |
components | The number of components to create |
tos | The Type of Service of the socket, max is 255 |
error | location of a GError, or NULL if no error occured |

#### Returns

a newly-created FsTransmitter of the requested type (or NULL if there is an error)

### fs_transmitter_new_stream_transmitter ()

    FsStreamTransmitter *
    fs_transmitter_new_stream_transmitter (FsTransmitter *transmitter,
                                           FsParticipant *participant,
                                           guint n_parameters,
                                           GParameter *parameters,
                                           GError **error);

This function will create a new FsStreamTransmitter element for a specific participant for this FsTransmitter

#### Parameters

transmitter | a FsTranmitter |
participant | the FsParticipant for which the FsStream using this new FsStreamTransmitter is created |
n_parameters | The number of parameters to pass to the newly created FsStreamTransmitter |
parameters | an array of GParameter |
error | location of a GError, or NULL if no error occured |

#### Returns

a new FsStreamTransmitter, or NULL if there is an error.

[transfer full]

### fs_transmitter_get_stream_transmitter_type ()

    GType
    fs_transmitter_get_stream_transmitter_type
                                   (FsTransmitter *transmitter);

This function returns the GObject type for the stream transmitter. This is meant for bindings that need to introspect the type of arguments that can be passed to the _new_stream_transmitter.

#### Parameters

transmitter | A FsTransmitter object |

#### Returns

the GType

### fs_transmitter_emit_error ()

    void
    fs_transmitter_emit_error (FsTransmitter *transmitter,
                               gint error_no,
                               const gchar *error_msg);

This function emit the "error" signal on a FsTransmitter, it should only be called by subclasses.

#### Parameters

transmitter | FsTransmitter on which to emit the error signal |
error_no | The number of the error |
error_msg | Error message to be displayed to user |

### fs_transmitter_list_available ()

    char **
    fs_transmitter_list_available (void);

Get the list of all available transmitters

#### Returns

a newly allocated array of strings containing the list of all available transmitters or `NULL` if there are none. It should be freed with `g_strfreev()`.

[transfer full]

## Types and Values

### struct FsTransmitter

    struct FsTransmitter;

All members are private, access them using methods and properties

### struct FsTransmitterClass

    struct FsTransmitterClass {
      GObjectClass parent_class;

      /*virtual functions */
      FsStreamTransmitter *(*new_stream_transmitter) (FsTransmitter *transmitter,
                                                      FsParticipant *participant,
                                                      guint n_parameters,
                                                      GParameter *parameters,
                                                      GError **error);
      GType (*get_stream_transmitter_type) (FsTransmitter *transmitter);
    };

You must override both methods in a subclass.

#### Members

`new_stream_transmitter` () | Creates a new FsStreamTransmitter |
`get_stream_transmitter_type` () | Returns the GType of the stream transmitter created by this class (useful for bindings) |

## Property Details

### The `“components”` property

      “components”               guint

The number of components to create

Flags: Read / Write / Construct Only

Allowed values: [1,255]

Default value: 1

### The `“do-timestamp”` property

      “do-timestamp”             gboolean

Apply current stream time to buffers or provide buffers without timestamps. Must be set before creating a stream transmitter.

Flags: Read / Write

Default value: TRUE

### The `“gst-sink”` property

      “gst-sink”                 GstElement *

A network source GstElement to be used by the FsSession These element's sink must have async=FALSE This element MUST provide a pad named "sink_%u" per component. These pads number must start at 1 (the %u corresponds to the component number). These pads MUST be static pads.

Flags: Read

### The `“gst-src”` property

      “gst-src”                  GstElement *

A network source GstElement to be used by the FsSession This element MUST provide a source pad named "src_`u`" per component. These pads number must start at 1 (the `u` corresponds to the component number). These pads MUST be static pads.

Flags: Read

### The `“tos”` property

      “tos”                      guint

Sets the IP ToS field (and if possible the IPv6 TCLASS field

Flags: Read / Write

Allowed values: <= 255

Default value: 0

## Signal Details

### The `“error”` signal

    void
    user_function (FsTransmitter *self,
                   FsError        errorno,
                   gchar         *error_msg,
                   gpointer       user_data)

This signal is emitted in any error condition

#### Parameters

self | FsTransmitter that emitted the signal |
errorno | The number of the error |
error_msg | Error message to be displayed to user |
user_data | user data set when the signal handler was connected. |

Flags: Run Last