Handling sources with strange 'Transport: ' definitions
by Michael Olbrich
Hi,
Some Devices (I've seen this with a Dell Windows 10 tablet) send messages
like this:
----------------------------------->8---------------------------------
RTSP/1.0 200 OK
Transport: RTP/AVP/UDP;unicast;client_port=1990;server_port=50004;ssrc=3ea8613d;rtcp-fb-ssrc=dae4bde4
Server: MSMiracastSource/10.00.10011.16485 guid/40662FBB-9420-11E5-8275-0023545C6497
Blocksize: 1450
Session: 431521898
CSeq: 2
----------------------------------->8---------------------------------
The parser fails to parse the 'Transport:' line because of the extra stuff
at the end, and the state machine stops there.
I've worked around this with the diff below. However, this does not handle
port ranges, or if the server port is missing. I don't know much about
yacc. Is there a better way to handle this, than duplicating each version
with and without the extra part?
Regards,
Michael
diff --git a/libwds/rtsp/headerlexer.l b/libwds/rtsp/headerlexer.l
index bfc0fb957e18..79d592950b61 100644
--- a/libwds/rtsp/headerlexer.l
+++ b/libwds/rtsp/headerlexer.l
@@ -76,6 +76,7 @@ ERROR ({DIGIT}){3}
";timeout=" return token::WFD_TIMEOUT;
";server_port=" return token::WFD_SERVER_PORT;
+";ssrc=".* return token::WFD_TRANSPORT_OTHER;
^(?-i:"OPTIONS") {
BEGIN(INITIAL);
diff --git a/libwds/rtsp/parser.ypp b/libwds/rtsp/parser.ypp
index 1eaea890dba5..95e2607a66d1 100644
--- a/libwds/rtsp/parser.ypp
+++ b/libwds/rtsp/parser.ypp
@@ -251,6 +251,7 @@
%token <sval> WFD_SESSION_ID
%token WFD_TIMEOUT
%token WFD_TRANSPORT
+%token WFD_TRANSPORT_OTHER
%token WFD_SERVER_PORT
%type <message> options set_parameter get_parameter setup play teardown pause
@@ -488,6 +489,11 @@ wfd_transport:
$$->set_client_port ($2);
$$->set_server_port ($4);
}
+ | WFD_TRANSPORT WFD_NUM WFD_SERVER_PORT WFD_NUM WFD_TRANSPORT_OTHER {
+ $$ = new TransportHeader();
+ $$->set_client_port ($2);
+ $$->set_server_port ($4);
+ }
| WFD_TRANSPORT WFD_NUM '-' WFD_NUM WFD_SERVER_PORT WFD_NUM {
$$ = new TransportHeader();
$$->set_client_port ($2);
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
5 years, 1 month
Re: [wysiwidi-dev] wysiwidi-dev Digest, Vol 4, Issue 1
by 信步
I solve this problem by install glib2.0 package ,thanks!
------------------
贝莱特集成电路(福州)有限公司
技术中心 经理 潘光辉
TEL:0591-87866138-810/18959173815
地址:福州市铜盘路福州软件园A区31座2楼
邮编:350002
------------------ Original ------------------
From: "wysiwidi-dev-request"<wysiwidi-dev-request(a)lists.01.org>;
Date: 2015年11月27日(星期五) 凌晨4:00
To: "wysiwidi-dev"<wysiwidi-dev(a)lists.01.org>;
Subject: wysiwidi-dev Digest, Vol 4, Issue 1
Send wysiwidi-dev mailing list submissions to
wysiwidi-dev(a)lists.01.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/wysiwidi-dev
or, via email, send a message with subject or body 'help' to
wysiwidi-dev-request(a)lists.01.org
You can reach the person managing the list at
wysiwidi-dev-owner(a)lists.01.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of wysiwidi-dev digest..."
Today's Topics:
1. wds complie in deepin linux(ubuntu) (=?gb18030?B?0MWyvQ==?=)
2. Re: wds complie in deepin linux(ubuntu) (Alexander Kanavin)
----------------------------------------------------------------------
Message: 1
Date: Thu, 26 Nov 2015 11:08:53 +0800
From: "=?gb18030?B?0MWyvQ==?=" <shinep(a)foxmail.com>
To: "=?gb18030?B?d3lzaXdpZGktZGV2?=" <wysiwidi-dev(a)lists.01.org>
Subject: [wysiwidi-dev] wds complie in deepin linux(ubuntu)
Message-ID: <tencent_3970031B2C5C76ED6468D3C2(a)qq.com>
Content-Type: text/plain; charset="gb18030"
hi wds maintainers:
I want to complile wds in deepin linux, after command: cmake . it hint don't find gio-2.0 .
after I install the libgio-2.0 ( apt-get install libgio-2.0 ) ,the hint remain the same.
Did you know what can I do.
or, Please tell me which OS did you use for developping this software.
thanks a lot!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.01.org/pipermail/wysiwidi-dev/attachments/20151126/54c8a829/...>;
------------------------------
Message: 2
Date: Thu, 26 Nov 2015 14:31:20 +0200
From: Alexander Kanavin <alexander.kanavin(a)intel.com>
To: wysiwidi-dev(a)lists.01.org
Subject: Re: [wysiwidi-dev] wds complie in deepin linux(ubuntu)
Message-ID: <5656FB98.9050906(a)intel.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
On 11/26/2015 05:08 AM, ?? wrote:
> I want to complile wds in deepin linux, after command: cmake . it
> hint don't find gio-2.0 .
> after I install the libgio-2.0 ( apt-get install libgio-2.0 ) ,the
> hint remain the same.
> Did you know what can I do.
> or, Please tell me which OS did you use for developping this software.
You need to install the development package for libgio, which should be
called libgio-2.0-dev. You can also use 'apt-cache pkgnames' to list all
packages, and find out which of them you need to install.
Alex
------------------------------
Subject: Digest Footer
_______________________________________________
wysiwidi-dev mailing list
wysiwidi-dev(a)lists.01.org
https://lists.01.org/mailman/listinfo/wysiwidi-dev
------------------------------
End of wysiwidi-dev Digest, Vol 4, Issue 1
******************************************
5 years, 1 month
wds complie in deepin linux(ubuntu)
by 信步
hi wds maintainers:
I want to complile wds in deepin linux, after command: cmake . it hint don't find gio-2.0 .
after I install the libgio-2.0 ( apt-get install libgio-2.0 ) ,the hint remain the same.
Did you know what can I do.
or, Please tell me which OS did you use for developping this software.
thanks a lot!
5 years, 1 month