summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2011-03-10 15:51:08 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2011-06-24 17:38:48 -0400
commit9de505068df17515f6a5e35bbd4ab10f8206cad7 (patch)
tree226321c0eda95d174d3b941e46af935430e0803e
parent15bf8d8ec7375780bd4277e46a7f506b6217a7b3 (diff)
Remove tf_content_set_codec_preferences
-rw-r--r--doc/lib/telepathy-farstream-sections.txt1
-rw-r--r--python/pytpfarstream.defs10
-rw-r--r--python/pytpfarstream.override60
-rw-r--r--telepathy-farstream/call-content.c36
-rw-r--r--telepathy-farstream/content-priv.h4
-rw-r--r--telepathy-farstream/content.c42
-rw-r--r--telepathy-farstream/content.h4
7 files changed, 0 insertions, 157 deletions
diff --git a/doc/lib/telepathy-farstream-sections.txt b/doc/lib/telepathy-farstream-sections.txt
index 4bf08dd..f1acf12 100644
--- a/doc/lib/telepathy-farstream-sections.txt
+++ b/doc/lib/telepathy-farstream-sections.txt
@@ -9,7 +9,6 @@ tf_init
TfContent
TfContentClass
tf_content_error
-tf_content_set_codec_preferences
<SUBSECTION Private>
TfContentPrivate
<SUBSECTION Standard>
diff --git a/python/pytpfarstream.defs b/python/pytpfarstream.defs
index 83251ec..de62900 100644
--- a/python/pytpfarstream.defs
+++ b/python/pytpfarstream.defs
@@ -93,16 +93,6 @@
)
)
-(define-method set_codec_preferences
- (of-object "TfContent")
- (c-name "tf_content_set_codec_preferences")
- (return-type "gboolean")
- (parameters
- '("GList*" "codec_preferences")
- '("GError**" "error")
- )
-)
-
(define-method error
(of-object "TfContent")
(c-name "tf_content_error")
diff --git a/python/pytpfarstream.override b/python/pytpfarstream.override
index e03d534..411831b 100644
--- a/python/pytpfarstream.override
+++ b/python/pytpfarstream.override
@@ -11,42 +11,6 @@ headers
#include "pygstminiobject.h"
-static gboolean
-_fs_codec_list_from_pysequence (PyObject *obj, GList **list)
-{
- GList *codecs = NULL;
- Py_ssize_t i;
-
- if (!PySequence_Check (obj))
- {
- PyErr_SetString (PyExc_TypeError,
- "The parameter must be a Sequence of FsCodec");
- return FALSE;
- }
-
- for (i = 0; i < PySequence_Size (obj); i++)
- {
- PyObject *item = PySequence_GetItem (obj, i);
-
- if (!pyg_boxed_check (item, FS_TYPE_CODEC))
- {
- PyErr_SetString(PyExc_TypeError,
- "The parameter must be a Sequence of FsCodec");
- return FALSE;
- }
- }
-
- for (i = 0; i < PySequence_Size (obj); i++)
- {
- PyObject *item = PySequence_GetItem (obj, i);
-
- codecs = g_list_append (codecs, pyg_boxed_get (item, FsCodec));
- }
-
- *list = codecs;
- return TRUE;
-}
-
static void
async_result_callback_marshal(GObject *source_object,
GAsyncResult *result,
@@ -83,30 +47,6 @@ ignore-glob
%%
headers
%%
-override tf_content_set_codec_preferences onearg
-static PyObject *
-_wrap_tf_content_set_codec_preferences (PyGObject *self, PyObject *arg)
-{
- gboolean ret = FALSE;
- GError *error = NULL;
- GList *codecs = NULL;
-
- if (!_fs_codec_list_from_pysequence (arg, &codecs))
- return NULL;
-
- Py_BEGIN_ALLOW_THREADS
- ret = tf_content_set_codec_preferences (TF_CONTENT(self->obj), codecs,
- &error);
- Py_END_ALLOW_THREADS
-
- g_list_free (codecs);
-
- if (pyg_error_check(&error))
- return NULL;
-
- return PyBool_FromLong (ret);
-}
-%%
override tf_channel_new_async kwargs
static PyObject *
_wrap_tf_channel_new_async(PyGObject *self, PyObject *args, PyObject *kwargs)
diff --git a/telepathy-farstream/call-content.c b/telepathy-farstream/call-content.c
index 3fe6090..4ee7b33 100644
--- a/telepathy-farstream/call-content.c
+++ b/telepathy-farstream/call-content.c
@@ -150,10 +150,6 @@ static gboolean tf_call_content_init_finish (GAsyncInitable *initable,
GError **error);
-static gboolean tf_call_content_set_codec_preferences (TfContent *content,
- GList *codec_preferences,
- GError **error);
-
static void tf_call_content_try_sending_codecs (TfCallContent *self);
static FsStream * tf_call_content_get_existing_fsstream_by_handle (
TfCallContent *content, guint contact_handle);
@@ -171,7 +167,6 @@ static void
tf_call_content_class_init (TfCallContentClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- TfContentClass *content_class = TF_CONTENT_CLASS (klass);
content_class->content_error = tf_call_content_error;
@@ -179,8 +174,6 @@ tf_call_content_class_init (TfCallContentClass *klass)
object_class->finalize = tf_call_content_finalize;
object_class->get_property = tf_call_content_get_property;
- content_class->set_codec_preferences = tf_call_content_set_codec_preferences;
-
g_object_class_override_property (object_class, PROP_TF_CHANNEL,
"tf-channel");
g_object_class_override_property (object_class, PROP_FS_CONFERENCE,
@@ -1537,32 +1530,3 @@ src_pad_added (FsStream *fsstream, GstPad *pad, FsCodec *codec,
_tf_content_emit_src_pad_added (TF_CONTENT (content), handle,
fsstream, pad, codec);
}
-
-
-static gboolean
-tf_call_content_set_codec_preferences (TfContent *content,
- GList *codec_preferences,
- GError **error)
-{
- TfCallContent *self;
-
- g_return_val_if_fail (TF_IS_CALL_CONTENT (content), FALSE);
- self = TF_CALL_CONTENT (content);
-
- if (self->fssession == NULL)
- {
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_INITIALIZED,
- "TfCallContent not initialised yet");
- return FALSE;
- }
-
- if (self->got_codec_offer_property)
- {
- g_warning ("Too late, already got the initial codec offer");
- return FALSE;
- }
-
-
- return fs_session_set_codec_preferences (self->fssession, codec_preferences,
- error);
-}
diff --git a/telepathy-farstream/content-priv.h b/telepathy-farstream/content-priv.h
index ec3c831..3842bd4 100644
--- a/telepathy-farstream/content-priv.h
+++ b/telepathy-farstream/content-priv.h
@@ -18,10 +18,6 @@ struct _TfContent {
struct _TfContentClass{
GObjectClass parent_class;
- gboolean (*set_codec_preferences) (TfContent *self,
- GList *codec_preferences,
- GError **error);
-
void (*content_error) (TfContent *chan,
guint reason, /* TfFutureContentRemovalReason */
const gchar *detailed_reason,
diff --git a/telepathy-farstream/content.c b/telepathy-farstream/content.c
index faf8962..09f0ce0 100644
--- a/telepathy-farstream/content.c
+++ b/telepathy-farstream/content.c
@@ -237,48 +237,6 @@ _tf_content_emit_src_pad_added (TfContent *self, guint handle,
}
/**
- * tf_content_set_codec_preferences:
- * @content: the #TfContent
- * @codec_preferences: The #GList of #FsCodec
- * @error: a #GError or %NULL
- *
- * Set the list of desired codec preferences. It is a #GList
- * of #FsCodec. The function does not take ownership of the list.
- *
- * The payload type may be a valid dynamic PT (96-127), %FS_CODEC_ID_DISABLE
- * or %FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the
- * payload type of the codec will be "reserved" and not be used by any
- * dynamically assigned payload type.
- *
- * If the list of specifications would invalidate all codecs, an error will
- * be returned.
- *
- * This function should be called only during the callback for the
- * #TfChannel::content-added signal. Afterwards, the codecs may have been
- * set to the connection manager.
- *
- * Returns: %TRUE if the preferences could be set of %FALSE if there was an
- * error, in that case @error will have been set.
- */
-
-gboolean
-tf_content_set_codec_preferences (TfContent *content,
- GList *codec_preferences,
- GError **error)
-{
- TfContentClass *klass = TF_CONTENT_GET_CLASS (content);
-
- if (klass->set_codec_preferences) {
- return klass->set_codec_preferences (content, codec_preferences, error);
- } else {
- GST_WARNING ("set_codec_preferences not defined in class");
- g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
- "set_codec_preferences not defined in class");
- }
- return FALSE;
-}
-
-/**
* tf_content_error:
* @content: a #TfContent
* @reason: the reason (a #TfContentRemovalReason)
diff --git a/telepathy-farstream/content.h b/telepathy-farstream/content.h
index 6ef63de..abd2a98 100644
--- a/telepathy-farstream/content.h
+++ b/telepathy-farstream/content.h
@@ -51,10 +51,6 @@ void tf_content_error_literal (TfContent *content,
const gchar *detailed_reason,
const gchar *message);
-gboolean tf_content_set_codec_preferences (TfContent *content,
- GList *codec_preferences,
- GError **error);
-
void tf_content_error (TfContent *content,
guint reason, /* TfFutureContentRemovalReason */
const gchar *detailed_reason,