TfContent

TfContent — Represent the Content of a channel handled by TfChannel

Synopsis

                    TfContent;
                    TfContentClass;
GstIterator *       tf_content_iterate_src_pads         (TfContent *content,
                                                         guint *handles,
                                                         guint handle_count);
void                tf_content_error                    (TfContent *content,
                                                         const gchar *message_format,
                                                         ...);
void                tf_content_error_literal            (TfContent *content,
                                                         const gchar *message);
void                tf_content_receiving_failed         (TfContent *content,
                                                         guint *handles,
                                                         guint handle_count,
                                                         const gchar *message_format,
                                                         ...);
void                tf_content_receiving_failed_literal (TfContent *content,
                                                         guint *handles,
                                                         guint handle_count,
                                                         const gchar *message);
void                tf_content_sending_failed           (TfContent *content,
                                                         const gchar *message_format,
                                                         ...);
void                tf_content_sending_failed_literal   (TfContent *content,
                                                         const gchar *message);

Object Hierarchy

  GObject
   +----TfContent

Properties

  "fs-conference"            FsConference*         : Read
  "fs-session"               FsSession*            : Read
  "media-type"               FsMediaType           : Read
  "object-path"              gchar*                : Read
  "sink-pad"                 GstPad*               : Read
  "tf-channel"               TfChannel*            : Read

Signals

  "restart-source"                                 : Run Last
  "src-pad-added"                                  : Run Last
  "start-receiving"                                : Run Last
  "start-sending"                                  : Run Last
  "stop-receiving"                                 : Run Last
  "stop-sending"                                   : Run Last

Description

Objects of this class allow the user to handle the media side of a Telepathy channel handled by TfChannel.

This object is created by the TfChannel and the user is notified of its creation by the "content-added" signal. In the callback for this signal, the user should connect to the "src-pad-added" signal.

Details

TfContent

typedef struct _TfContent TfContent;

This structure is private, this class is not subclassable.


TfContentClass

typedef struct _TfContentClass TfContentClass;

This structure is private, this class is not subclassable.


tf_content_iterate_src_pads ()

GstIterator *       tf_content_iterate_src_pads         (TfContent *content,
                                                         guint *handles,
                                                         guint handle_count);

Provides a iterator that can be used to iterate through all of the src pads that are are used to receive from a group of Telepathy handles.

content :

a TfContent

handles :

a 0 terminated array of guint representing Telepathy handles

handle_count :

the numner of handles in handles

Returns :

a GstIterator

tf_content_error ()

void                tf_content_error                    (TfContent *content,
                                                         const gchar *message_format,
                                                         ...);

Send a fatal streaming error to the Content to the CM, the effect is most likely that the content will be removed.

content :

a TfContent

message_format :

error Message with printf style formatting

... :

Parameters to insert into the message_format string

tf_content_error_literal ()

void                tf_content_error_literal            (TfContent *content,
                                                         const gchar *message);

Send a fatal streaming error to the Content to the CM, the effect is most likely that the content will be removed.

Rename to: tf_content_error

content :

a TfContent

message :

error Message

tf_content_receiving_failed ()

void                tf_content_receiving_failed         (TfContent *content,
                                                         guint *handles,
                                                         guint handle_count,
                                                         const gchar *message_format,
                                                         ...);

Informs the Connection Manager that receiving has failed for this content. This is a transient error and it may or not not end the Content and the call.

If handles are not specific, it assumes that it is valid for all handles.

content :

a TfContent

handles :

an array of guint representing Telepathy handles, may be NULL

handle_count :

the numner of handles in handles

message_format :

Message with printf style formatting

... :

Parameters to insert into the message_format string

tf_content_receiving_failed_literal ()

void                tf_content_receiving_failed_literal (TfContent *content,
                                                         guint *handles,
                                                         guint handle_count,
                                                         const gchar *message);

Informs the Connection Manager that receiving has failed for this content. This is a transient error and it may or not not end the Content and the call.

If handles are not specific, it assumes that it is valid for all handles.

Rename to: tf_content_receiving_failed

content :

a TfContent

handles :

an array of guint representing Telepathy handles, may be NULL

handle_count :

the numner of handles in handles

message :

The error message

tf_content_sending_failed ()

void                tf_content_sending_failed           (TfContent *content,
                                                         const gchar *message_format,
                                                         ...);

Informs the Connection Manager that sending has failed for this content. This is a transient error and it may or not not end the Content and the call.

content :

a TfContent

message_format :

Message with printf style formatting

... :

Parameters to insert into the message_format string

tf_content_sending_failed_literal ()

void                tf_content_sending_failed_literal   (TfContent *content,
                                                         const gchar *message);

Informs the Connection Manager that sending has failed for this content. This is a transient error and it may or not not end the Content and the call.

Rename to: tf_content_sending_failed

content :

a TfContent

message :

The error message

Property Details

The "fs-conference" property

  "fs-conference"            FsConference*         : Read

The Farstream conference for this content (could be the same as other contents).


The "fs-session" property

  "fs-session"               FsSession*            : Read

The Farstream session for this content.


The "media-type" property

  "media-type"               FsMediaType           : Read

The FsMediaType for this content.

Default value: FS_MEDIA_TYPE_AUDIO


The "object-path" property

  "object-path"              gchar*                : Read

D-Bus object path of the Telepathy content which this content operates on.

Default value: NULL


The "sink-pad" property

  "sink-pad"                 GstPad*               : Read

Sink GstPad for this content.


The "tf-channel" property

  "tf-channel"               TfChannel*            : Read

The Telepathy-Farstream Channel for this object.

Signal Details

The "restart-source" signal

void                user_function                      (TfContent *content,
                                                        gpointer   user_data)      : Run Last

This signal requests that the source be restarted so that the caps can be renegotiated with a new resolutions and framerate.

content :

the TfContent

user_data :

user data set when the signal handler was connected.

The "src-pad-added" signal

void                user_function                      (TfContent *content,
                                                        guint      handle,
                                                        FsStream  *stream,
                                                        GstPad    *pad,
                                                        FsCodec   *codec,
                                                        gpointer   user_data)      : Run Last

This signal is emitted when a data is coming on a new pad. This signal is not emitted on the main thread, so special care must be made to lock the relevant data. When the callback returns from this signal, data will start flowing through the pad, so the application MUST connect a sink.

content :

the TfContent

handle :

the handle of the remote party producing the content on this pad or 0 if unknown

stream :

the FsStream for this pad

pad :

a GstPad

codec :

the FsCodec for this pad

user_data :

user data set when the signal handler was connected.

The "start-receiving" signal

gboolean            user_function                      (TfContent *content,
                                                        gpointer   handles,
                                                        guint      handle_count,
                                                        gpointer   user_data)         : Run Last

This signal is emitted when the connection managers requests that the application prepares itself to start receiving data again from certain handles.

This signal will only be emitted after the "stop-receiving" signal has succeeded. It will not be emitted right after "src-pad-added".

content :

the TfContent

handles :

a 0-terminated array of guint containing the handles

handle_count :

The number of handles in the handles array

user_data :

user data set when the signal handler was connected.

Returns :

TRUE if the application can start receiving data or FALSE otherwise

The "start-sending" signal

gboolean            user_function                      (TfContent *content,
                                                        gpointer   user_data)      : Run Last

This signal is emitted when the connection manager ask to send media. For example, this can be used to open a camera, start recording from a microphone or play back a file. The application should start sending data on the "sink-pad"

content :

the TfContent

user_data :

user data set when the signal handler was connected.

Returns :

TRUE if the application can start providing data or FALSE otherwise

The "stop-receiving" signal

void                user_function                      (TfContent *content,
                                                        gpointer   handles,
                                                        guint      handle_count,
                                                        gpointer   user_data)         : Run Last

This signal is emitted when the connection manager wants to tell the application that it is now allowed to stop receiving.

content :

the TfContent

handles :

a 0-terminated array of guint containing the handles

handle_count :

The number of handles in the handles array

user_data :

user data set when the signal handler was connected.

The "stop-sending" signal

void                user_function                      (TfContent *content,
                                                        gpointer   user_data)      : Run Last

This signal is emitted when the connection manager ask to stop sending media

content :

the TfContent

user_data :

user data set when the signal handler was connected.