[farsight2/master] rtpspecialsource: Rename negotiated_codecs to negotiated_codec_associations
Olivier Crête
olivier.crete at collabora.co.uk
Fri Nov 20 16:37:20 PST 2009
This way, the list contents can be guessed
---
gst/fsrtpconference/fs-rtp-dtmf-event-source.c | 17 ++++++------
gst/fsrtpconference/fs-rtp-dtmf-sound-source.c | 12 ++++----
gst/fsrtpconference/fs-rtp-special-source.c | 32 ++++++++++++-----------
gst/fsrtpconference/fs-rtp-special-source.h | 8 +++---
4 files changed, 36 insertions(+), 33 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-dtmf-event-source.c b/gst/fsrtpconference/fs-rtp-dtmf-event-source.c
index 647fe92..3fab606 100644
--- a/gst/fsrtpconference/fs-rtp-dtmf-event-source.c
+++ b/gst/fsrtpconference/fs-rtp-dtmf-event-source.c
@@ -61,7 +61,7 @@ G_DEFINE_TYPE (FsRtpDtmfEventSource, fs_rtp_dtmf_event_source,
static GstElement *
fs_rtp_dtmf_event_source_build (FsRtpSpecialSource *source,
- GList *negotiated_codecs,
+ GList *negotiated_codec_associations,
FsCodec *selected_codec);
@@ -73,7 +73,7 @@ static GList *fs_rtp_dtmf_event_source_negotiation_filter (
GList *codec_associations);
static FsCodec *fs_rtp_dtmf_event_source_get_codec (
FsRtpSpecialSourceClass *klass,
- GList *negotiated_codecs,
+ GList *negotiated_codec_associations,
FsCodec *codec);
static void
@@ -208,7 +208,8 @@ _is_telephony_codec (CodecAssociation *ca, gpointer user_data)
/**
* fs_rtp_dtmf_event_source_get_codec:
- * @negotiated_codecs: a #GList of currently negotiated #FsCodec
+ * @negotiated_codec_associations: a #GList of currently negotiated
+ * #CodecAssociation
* @selected_codec: The current #FsCodec
*
* Find the telephone-event codec with the proper clock rate in the list
@@ -218,15 +219,15 @@ _is_telephony_codec (CodecAssociation *ca, gpointer user_data)
*/
static FsCodec *
fs_rtp_dtmf_event_source_get_codec (FsRtpSpecialSourceClass *klass,
- GList *negotiated_codecs, FsCodec *selected_codec)
+ GList *negotiated_codec_associations, FsCodec *selected_codec)
{
CodecAssociation *ca = NULL;
if (selected_codec->media_type != FS_MEDIA_TYPE_AUDIO)
return NULL;
- ca = lookup_codec_association_custom (negotiated_codecs, _is_telephony_codec,
- GUINT_TO_POINTER (selected_codec->clock_rate));
+ ca = lookup_codec_association_custom (negotiated_codec_associations,
+ _is_telephony_codec, GUINT_TO_POINTER (selected_codec->clock_rate));
if (ca)
return ca->codec;
@@ -236,7 +237,7 @@ fs_rtp_dtmf_event_source_get_codec (FsRtpSpecialSourceClass *klass,
static GstElement *
fs_rtp_dtmf_event_source_build (FsRtpSpecialSource *source,
- GList *negotiated_codecs,
+ GList *negotiated_codec_associations,
FsCodec *selected_codec)
{
FsCodec *telephony_codec = NULL;
@@ -248,7 +249,7 @@ fs_rtp_dtmf_event_source_build (FsRtpSpecialSource *source,
GstElement *bin = NULL;
telephony_codec = fs_rtp_dtmf_event_source_get_codec (
- FS_RTP_SPECIAL_SOURCE_GET_CLASS(source), negotiated_codecs,
+ FS_RTP_SPECIAL_SOURCE_GET_CLASS(source), negotiated_codec_associations,
selected_codec);
g_return_val_if_fail (telephony_codec, NULL);
diff --git a/gst/fsrtpconference/fs-rtp-dtmf-sound-source.c b/gst/fsrtpconference/fs-rtp-dtmf-sound-source.c
index 46b6496..4f28e09 100644
--- a/gst/fsrtpconference/fs-rtp-dtmf-sound-source.c
+++ b/gst/fsrtpconference/fs-rtp-dtmf-sound-source.c
@@ -61,13 +61,13 @@ G_DEFINE_TYPE(FsRtpDtmfSoundSource, fs_rtp_dtmf_sound_source,
static GstElement *
fs_rtp_dtmf_sound_source_build (FsRtpSpecialSource *source,
- GList *negotiated_codecs,
+ GList *negotiated_codec_associations,
FsCodec *selected_codec);
static FsCodec *fs_rtp_dtmf_sound_source_get_codec (
FsRtpSpecialSourceClass *klass,
- GList *negotiated_codecs,
+ GList *negotiated_codec_associations,
FsCodec *selected_codec);
@@ -156,7 +156,7 @@ _check_element_factory (gchar *name)
static FsCodec *
fs_rtp_dtmf_sound_source_get_codec (FsRtpSpecialSourceClass *klass,
- GList *negotiated_codecs,
+ GList *negotiated_codec_associations,
FsCodec *selected_codec)
{
FsCodec *codec = NULL;
@@ -169,7 +169,7 @@ fs_rtp_dtmf_sound_source_get_codec (FsRtpSpecialSourceClass *klass,
if (selected_codec->clock_rate != 8000)
return NULL;
- codec = get_pcm_law_sound_codec (negotiated_codecs,
+ codec = get_pcm_law_sound_codec (negotiated_codec_associations,
&encoder_name, &payloader_name);
if (!codec)
return NULL;
@@ -187,7 +187,7 @@ fs_rtp_dtmf_sound_source_get_codec (FsRtpSpecialSourceClass *klass,
static GstElement *
fs_rtp_dtmf_sound_source_build (FsRtpSpecialSource *source,
- GList *negotiated_codecs,
+ GList *negotiated_codec_associations,
FsCodec *selected_codec)
{
FsCodec *telephony_codec = NULL;
@@ -202,7 +202,7 @@ fs_rtp_dtmf_sound_source_build (FsRtpSpecialSource *source,
gchar *encoder_name = NULL;
gchar *payloader_name = NULL;
- telephony_codec = get_pcm_law_sound_codec (negotiated_codecs,
+ telephony_codec = get_pcm_law_sound_codec (negotiated_codec_associations,
&encoder_name, &payloader_name);
g_return_val_if_fail (telephony_codec, NULL);
diff --git a/gst/fsrtpconference/fs-rtp-special-source.c b/gst/fsrtpconference/fs-rtp-special-source.c
index cffb716..de299b0 100644
--- a/gst/fsrtpconference/fs-rtp-special-source.c
+++ b/gst/fsrtpconference/fs-rtp-special-source.c
@@ -88,7 +88,7 @@ static void fs_rtp_special_source_finalize (GObject *object);
static FsRtpSpecialSource *
fs_rtp_special_source_new (FsRtpSpecialSourceClass *klass,
- GList **negotiated_codecs,
+ GList **negotiated_codec_associations,
GMutex *mutex,
FsCodec *selected_codec,
GstElement *bin,
@@ -96,7 +96,7 @@ fs_rtp_special_source_new (FsRtpSpecialSourceClass *klass,
FsCodec* fs_rtp_special_source_class_get_codec (FsRtpSpecialSourceClass *klass,
- GList *negotiated_codecs,
+ GList *negotiated_codec_associations,
FsCodec *selected_codec);
static gpointer
@@ -354,7 +354,7 @@ fs_rtp_special_sources_negotiation_filter (GList *codec_associations)
* fs_rtp_special_sources_remove:
* @extra_sources: A pointer to the #GList returned by previous calls to this
* function
- * @negotiated_codecs: A pointer to the #GList of current negotiated
+ * @negotiated_codec_associations: A pointer to the #GList of current negotiated
* #CodecAssociation
* @mutex: the mutex protecting the last two things
* @send_codec: A pointer to the currently selected send codec
@@ -365,7 +365,7 @@ fs_rtp_special_sources_negotiation_filter (GList *codec_associations)
void
fs_rtp_special_sources_remove (
GList **extra_sources,
- GList **negotiated_codecs,
+ GList **negotiated_codec_associations,
GMutex *mutex,
FsCodec *send_codec)
{
@@ -397,7 +397,7 @@ fs_rtp_special_sources_remove (
if (obj_item)
{
FsCodec *telephony_codec = fs_rtp_special_source_class_get_codec (klass,
- *negotiated_codecs, send_codec);
+ *negotiated_codec_associations, send_codec);
if (!telephony_codec || !fs_codec_are_equal (telephony_codec, obj->codec))
{
@@ -425,7 +425,7 @@ _source_order_compare_func (gconstpointer item1,gconstpointer item2)
* fs_rtp_special_sources_create:
* @current_extra_sources: A pointer to the #GList returned by previous calls
* to this function
- * @negotiated_codecs: A pointer to the #GList of current negotiated
+ * @negotiated_codec_associations: A pointer to the #GList of current negotiated
* #CodecAssociation
* @mutex: the mutex protecting the last two things
* @send_codec: The currently selected send codec
@@ -437,7 +437,7 @@ _source_order_compare_func (gconstpointer item1,gconstpointer item2)
void
fs_rtp_special_sources_create (
GList **extra_sources,
- GList **negotiated_codecs,
+ GList **negotiated_codec_associations,
GMutex *mutex,
FsCodec *send_codec,
GstElement *bin,
@@ -468,12 +468,12 @@ fs_rtp_special_sources_create (
}
if (!obj_item &&
- fs_rtp_special_source_class_get_codec (klass, *negotiated_codecs,
- send_codec))
+ fs_rtp_special_source_class_get_codec (klass,
+ *negotiated_codec_associations, send_codec))
{
g_mutex_unlock (mutex);
- obj = fs_rtp_special_source_new (klass, negotiated_codecs, mutex,
- send_codec, bin, rtpmuxer);
+ obj = fs_rtp_special_source_new (klass, negotiated_codec_associations,
+ mutex, send_codec, bin, rtpmuxer);
if (!obj)
{
GST_WARNING ("Failed to make new special source");
@@ -507,7 +507,7 @@ fs_rtp_special_sources_create (
static FsRtpSpecialSource *
fs_rtp_special_source_new (FsRtpSpecialSourceClass *klass,
- GList **negotiated_codecs,
+ GList **negotiated_codec_associations,
GMutex *mutex,
FsCodec *selected_codec,
GstElement *bin,
@@ -529,7 +529,8 @@ fs_rtp_special_source_new (FsRtpSpecialSourceClass *klass,
source->priv->rtpmuxer = gst_object_ref (rtpmuxer);
source->priv->outer_bin = gst_object_ref (bin);
- source->priv->src = klass->build (source, *negotiated_codecs, selected_codec);
+ source->priv->src = klass->build (source, *negotiated_codec_associations,
+ selected_codec);
g_mutex_unlock (mutex);
@@ -754,11 +755,12 @@ fs_rtp_special_sources_destroy (GList *current_extra_sources)
*/
FsCodec*
fs_rtp_special_source_class_get_codec (FsRtpSpecialSourceClass *klass,
- GList *negotiated_codecs,
+ GList *negotiated_codec_associations,
FsCodec *selected_codec)
{
if (klass->get_codec)
- return klass->get_codec (klass, negotiated_codecs, selected_codec);
+ return klass->get_codec (klass, negotiated_codec_associations,
+ selected_codec);
return NULL;
}
diff --git a/gst/fsrtpconference/fs-rtp-special-source.h b/gst/fsrtpconference/fs-rtp-special-source.h
index b918872..bbccfb6 100644
--- a/gst/fsrtpconference/fs-rtp-special-source.h
+++ b/gst/fsrtpconference/fs-rtp-special-source.h
@@ -78,7 +78,7 @@ struct _FsRtpSpecialSourceClass
/* Object methods */
GstElement* (*build) (FsRtpSpecialSource *source,
- GList *negotiated_codecs,
+ GList *negotiated_codec_associations,
FsCodec *selected_codec);
/* Class methods */
@@ -89,7 +89,7 @@ struct _FsRtpSpecialSourceClass
GList *codec_associations);
FsCodec* (*get_codec) (FsRtpSpecialSourceClass *klass,
- GList *negotiated_codecs,
+ GList *negotiated_codec_associations,
FsCodec *selected_codec);
};
@@ -117,14 +117,14 @@ GType fs_rtp_special_source_get_type (void);
void
fs_rtp_special_sources_remove (
GList **current_extra_sources,
- GList **negotiated_codecs,
+ GList **negotiated_codec_associations,
GMutex *mutex,
FsCodec *send_codec);
void
fs_rtp_special_sources_create (
GList **extra_sources,
- GList **negotiated_codecs,
+ GList **negotiated_codec_associations,
GMutex *mutex,
FsCodec *send_codec,
GstElement *bin,
--
1.5.6.5
More information about the farsight-commits
mailing list