## FsConference FsConference — Interface for farstream conference elements |

## Functions

FsSession * | fs_conference_new_session ()
FsParticipant * | fs_conference_new_participant ()
#define | FS_ERROR
#define | FS_ERROR_IS_FATAL()
gboolean | fs_parse_error ()

## Types and Values

struct | FsConference
enum | FsError

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBin
                        ╰── FsConference

## Implemented Interfaces

FsConference implements GstChildProxy.

## Includes

    #include <farstream/fs-conference.h>

## Description

A Farstream conference is a conversation space that takes place between 2 or more participants. Each conference must have one or more Farstream sessions that are associated to the conference participants.

This will communicate asynchronous events to the user through GstMessage of type GST_MESSAGE_ELEMENT sent over the GstBus.

### The "`farstream-error`" message

    1
    2
    3
    "src-object"       #GObject           The object (#FsConference, #FsSession or #FsStream) that emitted the error
    "error-no"         #FsError           The Error number
    "error-msg"        #gchar*            The error message

The message is sent on asynchronous errors.

## Functions

### fs_conference_new_session ()

    FsSession *
    fs_conference_new_session (FsConference *conference,
                               FsMediaType media_type,
                               GError **error);

Create a new Farstream session for the given conference.

#### Parameters

conference | FsConference interface of a GstElement |
media_type | FsMediaType of the new session |
error | location of a GError, or `NULL` if no error occured |

#### Returns

the new FsSession that has been created. The FsSession must be unref'd by the user when closing the session.

[transfer full]

### fs_conference_new_participant ()

    FsParticipant *
    fs_conference_new_participant (FsConference *conference,
                                   GError **error);

Create a new Farstream Participant for the type of the given conference.

#### Parameters

conference | FsConference interface of a GstElement |
error | location of a GError, or `NULL` if no error occured |

#### Returns

the new FsParticipant that has been created. The FsParticipant is owned by the user and he must unref it when he is done with it.

[transfer full]

### FS_ERROR

    #define FS_ERROR (fs_error_quark ())

This quark is used to denote errors coming from Farstream objects

### FS_ERROR_IS_FATAL()

    #define             FS_ERROR_IS_FATAL(error)

Tells the programmer if an error if fatal or not, if it returns `TRUE`, the error is fatal, and the object that created it should be discarded. It returns `FALSE` otherwise.

#### Parameters

error | a FsError |

### fs_parse_error ()

    gboolean
    fs_parse_error (GObject *object,
                    GstMessage *message,
                    FsError *error,
                    const gchar **error_msg);

Parses a "farstream-farstream" message and checks if it matches the `object` parameters.

#### Parameters

object | a GObject to match against the message |
message | a GstMessage to parse |
error | Returns the FsError error number in the message if not `NULL`. | [out]
error_msg | Returns the error message if not `NULL`. | [out][transfer none]

#### Returns

`TRUE` if the message matches the object and is valid.

## Types and Values

### struct FsConference

    struct FsConference;

The FsConference structure, all the members are private

### enum FsError

This is the enum of error numbers that will come either on the "error" signal, from the Gst Bus or for error in the FS_ERROR domain in GErrors

#### Members

FS_ERROR_CONSTRUCTION | Error constructing some of the sub-elements, this probably denotes an error in the installation of the gstreamer elements. It is a fatal error. |
FS_ERROR_INTERNAL | An internal error happened in Farstream, it may be in an inconsistent state. The object from which this error comes should be discarded. |
FS_ERROR_INVALID_ARGUMENTS | Invalid arguments to the function, this is a programming error and should not be reported to the user |
FS_ERROR_NETWORK | A network related error, this should probably be reported to the user. |
FS_ERROR_NOT_IMPLEMENTED | The optional functionality is not implemented by this plugin. |
FS_ERROR_NEGOTIATION_FAILED | The codec negotiation has failed, this means that there are no common codecs between the local and remote codecs. |
FS_ERROR_UNKNOWN_CODEC | Data is received on an unknown codec, this most likely denotes an error on the remote side, the buffers will be ignored. It can safely be ignored in most cases (but may result in a call with no media received). |
FS_ERROR_NO_CODECS | There are no codecs detected for that media type. |
FS_ERROR_NO_CODECS_LEFT | All of the codecs have been disabled by the codec preferences, one should try less strict codec preferences. |
FS_ERROR_CONNECTION_FAILED | Could not connect to the to remote party. |
FS_ERROR_DISPOSED | The object has been disposed. |
FS_ERROR_ALREADY_EXISTS | The object already exists |