From: <wt...@ke...> - 2007-02-16 12:32:26
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: wtay Date: Fri Feb 16 2007 12:32:13 UTC Log message: * gst/rtsp/URLS: Add example H264 rtsp url. * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_media_to_caps), (gst_rtspsrc_handle_message), (gst_rtspsrc_change_state): Don't convert values to lowercase or we might mess up base64 encoded properties. Modified files: . : ChangeLog gst/rtsp : URLS gstrtspsrc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.2744&r2=1.2745 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/rtsp/URLS.diff?r1=1.3&r2=1.4 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/rtsp/gstrtspsrc.c.diff?r1=1.57&r2=1.58 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.2744 retrieving revision 1.2745 diff -u -d -r1.2744 -r1.2745 --- ChangeLog 16 Feb 2007 12:30:22 -0000 1.2744 +++ ChangeLog 16 Feb 2007 12:32:00 -0000 1.2745 @@ -1,5 +1,15 @@ 2007-02-16 Wim Taymans <wi...@fl...> + * gst/rtsp/URLS: + Add example H264 rtsp url. + + * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_media_to_caps), + (gst_rtspsrc_handle_message), (gst_rtspsrc_change_state): + Don't convert values to lowercase or we might mess up base64 encoded + properties. +2007-02-16 Wim Taymans <wi...@fl...> * gst/rtp/README: Fix case of string params. Index: URLS RCS file: /cvs/gstreamer/gst-plugins-good/gst/rtsp/URLS,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- URLS 11 Oct 2006 16:21:53 -0000 1.3 +++ URLS 16 Feb 2007 12:32:01 -0000 1.4 @@ -13,6 +13,7 @@ MP4V-ES/mpeg4-generic(ACC): rtsp://vod.nwec.jp/quicktime/505.mov rtsp://203.140.68.241:554/hirakataeizou9.mp4 + rtsp://kmdi.utoronto.ca:555/osconf/2004_may9.1.mp4 REAL: rtsp://213.254.239.61/farm/*/encoder/tagesschau/live1high.rm Index: gstrtspsrc.c RCS file: /cvs/gstreamer/gst-plugins-good/gst/rtsp/gstrtspsrc.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- gstrtspsrc.c 11 Feb 2007 12:57:47 -0000 1.57 +++ gstrtspsrc.c 16 Feb 2007 12:32:01 -0000 1.58 @@ -610,7 +610,7 @@ gchar *name = NULL; gint rate = -1; gchar *params = NULL; - gchar *tmp1, *tmp2; + gchar *tmp; GstStructure *s; /* dynamic payloads need rtpmap */ @@ -636,25 +636,27 @@ goto no_rtpmap; } - tmp1 = g_ascii_strdown (media->media, -1); + tmp = g_ascii_strdown (media->media, -1); caps = gst_caps_new_simple ("application/x-unknown", - "media", G_TYPE_STRING, tmp1, "payload", G_TYPE_INT, pt, NULL); - g_free (tmp1); + "media", G_TYPE_STRING, tmp, "payload", G_TYPE_INT, pt, NULL); + g_free (tmp); s = gst_caps_get_structure (caps, 0); if (rate != -1) gst_structure_set (s, "clock-rate", G_TYPE_INT, rate, NULL); + /* encoding name must be upper case */ if (name != NULL) { - tmp1 = g_ascii_strup (name, -1); - gst_structure_set (s, "encoding-name", G_TYPE_STRING, tmp1, NULL); - g_free (tmp1); + tmp = g_ascii_strup (name, -1); + gst_structure_set (s, "encoding-name", G_TYPE_STRING, tmp, NULL); + g_free (tmp); + /* params must be lower case */ if (params != NULL) { - tmp1 = g_ascii_strdown (params, -1); - gst_structure_set (s, "encoding-params", G_TYPE_STRING, tmp1, NULL); + tmp = g_ascii_strdown (params, -1); + gst_structure_set (s, "encoding-params", G_TYPE_STRING, tmp, NULL); /* parse optional fmtp: field */ @@ -687,13 +689,11 @@ /* simple <param>;.. is translated into <param>=1;... */ val = "1"; } - /* strip the key of spaces */ + /* strip the key of spaces, convert key to lowercase but not the value. */ key = g_strstrip (pairs[i]); - tmp1 = g_ascii_strdown (key, -1); - tmp2 = g_ascii_strdown (val, -1); - gst_structure_set (s, tmp1, G_TYPE_STRING, tmp2, NULL); - g_free (tmp1); - g_free (tmp2); + tmp = g_ascii_strdown (key, -1); + gst_structure_set (s, tmp, G_TYPE_STRING, val, NULL); + g_free (tmp); } g_strfreev (pairs); } @@ -2422,11 +2422,19 @@ gst_rtspsrc_loop_send_cmd (rtspsrc, CMD_RECONNECT); return; + GST_BIN_CLASS (parent_class)->handle_message (bin, message); + break; + } + case GST_MESSAGE_ERROR: + { - /* Fallthrough */ default: GST_BIN_CLASS (parent_class)->handle_message (bin, message); break; } @@ -2448,7 +2456,6 @@ case GST_STATE_CHANGE_PAUSED_TO_PLAYING: rtsp_connection_flush (rtspsrc->connection, FALSE); - /* copy configuerd protocols */ gst_rtspsrc_play (rtspsrc); case GST_STATE_CHANGE_PLAYING_TO_PAUSED: |