FarsightSession

FarsightSession — An object representing an audio/video session which may contain a number of streams.

Synopsis




            FarsightSession;
enum        FarsightSessionError;
            FarsightSessionClass;
FarsightSession* farsight_session_factory_make
                                            (const gchar *session_id);
const GList* farsight_session_list_supported_codecs
                                            (FarsightSession *session);
FarsightStream* farsight_session_create_stream
                                            (FarsightSession *session,
                                             FarsightMediaType media_type,
                                             FarsightStreamDirection dir);
void        farsight_session_destroy        (FarsightSession *session);


Object Hierarchy


  GObject
   +----FarsightSession

Signals


"error"     void        user_function      (FarsightSession *self,
                                            gint             type,
                                            gchar           *message,
                                            gpointer         user_data)      : Run last

Description

Details

FarsightSession

typedef struct _FarsightSession FarsightSession;

plugin: pointer to plugin that implements this session

This represents a collection of streams that form a session with a single wallclock base.


enum FarsightSessionError

typedef enum
{
  ERROR_UNKNOWN
} FarsightSessionError;

Enum used to indicate an error condition.

ERROR_UNKNOWN An unknown error occured

FarsightSessionClass

typedef struct {
  GObjectClass parent_class;

  /*virtual methods */
  G_CONST_RETURN GList * (* list_supported_codecs) (FarsightSession *session);
  FarsightStream * (* create_stream) (FarsightSession *session,
                                      FarsightMediaType media_type,
                                      FarsightStreamDirection dir);
} FarsightSessionClass;


farsight_session_factory_make ()

FarsightSession* farsight_session_factory_make
                                            (const gchar *session_id);

Called by the client to create a new farsight session object. It then initialises this object to the given session. The string given must be a valid session plugin that exists.

session_id : a string representing the session to load
Returns : the FarsightSession that has been created, NULL if an error occurs.

farsight_session_list_supported_codecs ()

const GList* farsight_session_list_supported_codecs
                                            (FarsightSession *session);

Lists all codecs this session is cabable of handling.

session : a FarsightSession
Returns : GList of FarsightCodec

farsight_session_create_stream ()

FarsightStream* farsight_session_create_stream
                                            (FarsightSession *session,
                                             FarsightMediaType media_type,
                                             FarsightStreamDirection dir);

Creates a FarsightStream on this session.

session : a FarsightSession
media_type : a FarsightMediaType for this stream
dir : a FarsightStreamDirection for this stream
Returns : a new FarsightStream

farsight_session_destroy ()

void        farsight_session_destroy        (FarsightSession *session);

Destroy this session and all resources allocated by it. This function should be used instead of g_object_unref in order to destroy the session.

session : a FarsightSession

Signal Details

The "error" signal

void        user_function                  (FarsightSession *self,
                                            gint             type,
                                            gchar           *message,
                                            gpointer         user_data)      : Run last

This signal is emitted in any error condition

self : FarsightSession that emmitted the signal
type : FarsightSessionError type of error
message : Error message
user_data : user data set when the signal handler was connected.