[telepathy-gabble/master] Set dummy width, height and framerate attributes
Sjoerd Simons
sjoerd.simons at collabora.co.uk
Thu Jun 25 09:59:43 PDT 2009
---
src/jingle-media-rtp.c | 34 +++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/src/jingle-media-rtp.c b/src/jingle-media-rtp.c
index 533351a..0ba4ef2 100644
--- a/src/jingle-media-rtp.c
+++ b/src/jingle-media-rtp.c
@@ -602,17 +602,33 @@ produce_payload_type (LmMessageNode *desc_node,
sprintf (buf, "%d", p->id);
lm_message_node_set_attribute (pt_node, "id", buf);
- if (dialect == JINGLE_DIALECT_GTALK3 && type == JINGLE_MEDIA_TYPE_AUDIO)
+ if (dialect == JINGLE_DIALECT_GTALK3)
{
- /* Gtalk 03 has either an audio or a video session, in case of a video
- * session the audio codecs need to set their namespace to
- * NS_GOOGLE_SESSION_PHONE. In the case of an audio session it doesn't
- * matter, so just always set the namespace on audio payloads.
- */
- lm_message_node_set_attribute (pt_node, "xmlns",
- NS_GOOGLE_SESSION_PHONE);
- }
+ if (type == JINGLE_MEDIA_TYPE_AUDIO)
+ {
+ /* Gtalk 03 has either an audio or a video session, in case of a
+ * video session the audio codecs need to set their namespace to
+ * NS_GOOGLE_SESSION_PHONE. In the case of an audio session it
+ * doesn't matter, so just always set the namespace on audio
+ * payloads.
+ */
+ lm_message_node_set_attribute (pt_node, "xmlns",
+ NS_GOOGLE_SESSION_PHONE);
+ }
+ else
+ {
+ /* If width, height and framerate aren't set the google server ignore
+ * our initiate.. These are a recv parameters, to it doesn't matter
+ * for what we're sending, just for what we're getting.. 320x240
+ * seems a sane enough default */
+ lm_message_node_set_attributes (pt_node,
+ "width", "320",
+ "height", "240",
+ "framerate", "30",
+ NULL);
+ }
+ }
/* name: optional */
if (*p->name != '\0')
--
1.5.6.5
More information about the telepathy-commits
mailing list