<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
Still waiting for SAP and xvideo patches to be reviewed when you can.<br>
<br>
[vlc-devel] [PATCH] Remove old announce and create new when attributes
change (not considered)
<br>
[vlc-devel] [PATCH] Hide/Show video output window (not considered)
<br>
<br>
<br>
Regards,<br>
<br>
Dermot.<br>
<br>
Dermot McGahon wrote:
<blockquote cite="mid4552E741.6090206@dspsrv.com" type="cite">No
comment on this patch with respect to trunk or 0.8.6 yet. That
  <br>
means that patches being submitted are not being considered for
  <br>
inclusion (or at least that feedback isn't being given to submitters).
  <br>
  <br>
This is a summary of the patches submitted by me recently. I am
  <br>
hopeful that I can get them into a stable release which trunk
definitely
  <br>
isn't at the moment,
  <br>
  <br>
[vlc-devel] [PATCH] Remove old announce and create new when attributes
change (not considered)
  <br>
[vlc-devel] [PATCH] retry on failure to connect to rc-unix socket (not
considered)
  <br>
[vlc-devel] [PATCH] Hide/Show video output window (not considered)
  <br>
  <br>
[vlc-devel] [PATCH] Repeat and Loop - Remote Control Interface
(included in trunk)
  <br>
[vlc-devel] [PATCH] marquee crash fix (included in trunk)
  <br>
  <br>
  <br>
Dermot.
  <br>
  <br>
  <hr size="4" width="90%"><br>
  <table class="header-part1" border="0" cellpadding="0" cellspacing="0"
 width="100%">
  </table>
  <br>
  <pre wrap="">>From dermot  Thu Oct 12 10:00:26 2006
Return-path: <a class="moz-txt-link-rfc2396E" href="mailto:vlc-devel-bounce@videolan.org"><vlc-devel-bounce@videolan.org></a>
Envelope-to: <a class="moz-txt-link-abbreviated" href="mailto:dermot@dspsrv.com">dermot@dspsrv.com</a>
Delivery-date: Thu, 12 Oct 2006 10:00:26 +0100
Received: from krishna.via.ecp.fr ([2002:8ac3:802d:1243:204:e2ff:fe10:5c44])
        by dspsrv.com with esmtp (Exim 4.63)
        (envelope-from <a class="moz-txt-link-rfc2396E" href="mailto:vlc-devel-bounce@videolan.org"><vlc-devel-bounce@videolan.org></a>)
        id 1GXwQR-0007EQ-GC
        for <a class="moz-txt-link-abbreviated" href="mailto:dermot@dspsrv.com">dermot@dspsrv.com</a>; Thu, 12 Oct 2006 10:00:26 +0100
Received: from localhost (localhost [127.0.0.1])
        by krishna.via.ecp.fr (Postfix) with ESMTP id BC1FFB9B8;
        Thu, 12 Oct 2006 11:00:21 +0200 (CEST)
Received: from krishna.via.ecp.fr ([127.0.0.1])
        by localhost (krishna [127.0.0.1]) (amavisd-new, port 10024)
        with ESMTP id 25906-92; Thu, 12 Oct 2006 11:00:21 +0200 (CEST)
Received: from krishna (krishna.via.ecp.fr [138.195.130.71])
        by krishna.via.ecp.fr (Postfix) with ESMTP id 6C739B9AC;
        Thu, 12 Oct 2006 11:00:12 +0200 (CEST)
Received: with ECARTIS (v1.0.0; list vlc-devel); Thu, 12 Oct 2006 11:00:12 +0200 (CEST)
X-Original-To: <a class="moz-txt-link-abbreviated" href="mailto:vlc-devel@krishna.via.ecp.fr">vlc-devel@krishna.via.ecp.fr</a>
Delivered-To: <a class="moz-txt-link-abbreviated" href="mailto:vlc-devel@krishna.via.ecp.fr">vlc-devel@krishna.via.ecp.fr</a>
Received: from localhost (localhost [127.0.0.1])
        by krishna.via.ecp.fr (Postfix) with ESMTP id 23140B9A2
        for <a class="moz-txt-link-rfc2396E" href="mailto:vlc-devel@krishna.via.ecp.fr"><vlc-devel@krishna.via.ecp.fr></a>; Thu, 12 Oct 2006 11:00:08 +0200 (CEST)
Received: from krishna.via.ecp.fr ([127.0.0.1])
        by localhost (krishna [127.0.0.1]) (amavisd-new, port 10024)
        with ESMTP id 12024-42 for <a class="moz-txt-link-rfc2396E" href="mailto:vlc-devel@krishna.via.ecp.fr"><vlc-devel@krishna.via.ecp.fr></a>;
        Thu, 12 Oct 2006 11:00:07 +0200 (CEST)
Received-SPF: spf-none
Received: from red.mxsweep.com (120.eimlf01.mxsweep.com [82.195.154.120])
        by krishna.via.ecp.fr (Postfix) with ESMTP id DE372B49B
        for <a class="moz-txt-link-rfc2396E" href="mailto:vlc-devel@videolan.org"><vlc-devel@videolan.org></a>; Thu, 12 Oct 2006 11:00:05 +0200 (CEST)
Received: from red.mxsweep.com (127.0.0.1) by red.mxsweep.com (MlfMTA v3.2r1b3) id h5o24a0171sr for <a class="moz-txt-link-rfc2396E" href="mailto:vlc-devel@videolan.org"><vlc-devel@videolan.org></a>; Thu, 12 Oct 2006 10:00:49 +0100 (envelope-from <a class="moz-txt-link-rfc2396E" href="mailto:dermot@dspsrv.com"><dermot@dspsrv.com></a>)
Received: from yzordderrex.lincor.com ([212.17.35.167])
        by red.mxsweep.com (mxsweep)
        with ESMTP; Thu, 12 Oct 2006 10:00:49 +0100
Received: from jumpgate3.cork.lincor.com ([87.192.212.66] helo=[192.168.3.42])
        by yzordderrex.lincor.com with asmtp (Exim 3.35 #1 (Debian))
        id 1GXwQ7-00051p-00
        for <a class="moz-txt-link-rfc2396E" href="mailto:vlc-devel@videolan.org"><vlc-devel@videolan.org></a>; Thu, 12 Oct 2006 10:00:03 +0100
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:452E040D.5090901@dspsrv.com"><452E040D.5090901@dspsrv.com></a>
Date: Thu, 12 Oct 2006 09:59:57 +0100
From: Dermot McGahon <a class="moz-txt-link-rfc2396E" href="mailto:dermot@dspsrv.com"><dermot@dspsrv.com></a>
User-Agent: Thunderbird 1.5.0.7 (X11/20060922)
MIME-Version: 1.0
To: <a class="moz-txt-link-abbreviated" href="mailto:vlc-devel@videolan.org">vlc-devel@videolan.org</a>
Subject: [vlc-devel] [PATCH] Remove old announce and create new when attributes change
Content-Type: multipart/mixed;
 boundary="------------070804020706060204030908"
X-Mlf-Version: 5.0.0.8233
X-Mlf-UniqueId: o200610120900490155667
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at via.ecp.fr
X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on krishna.via.ecp.fr
X-Spam-Level: 
X-Spam-Status: No, score=-5.0 required=5.0 tests=FORGED_RCVD_HELO,
        UNIFIED_PATCH autolearn=failed version=3.0.3
X-archive-position: 14220
X-ecartis-version: Ecartis v1.0.0
Sender: <a class="moz-txt-link-abbreviated" href="mailto:vlc-devel-bounce@videolan.org">vlc-devel-bounce@videolan.org</a>
Errors-To: <a class="moz-txt-link-abbreviated" href="mailto:vlc-devel-bounce@videolan.org">vlc-devel-bounce@videolan.org</a>
X-original-sender: <a class="moz-txt-link-abbreviated" href="mailto:dermot@dspsrv.com">dermot@dspsrv.com</a>
Precedence: bulk
Reply-To: <a class="moz-txt-link-abbreviated" href="mailto:vlc-devel@videolan.org">vlc-devel@videolan.org</a>
X-list: vlc-devel
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at via.ecp.fr

This is a multi-part message in MIME format.
--------------070804020706060204030908
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

Patch against trunk to allow SAP announcement attribute changes.

Without the patch VLC does not pick up on attribute changes.

Please apply and could you consider also applying against 0.8.6?


Regards,

Dermot.




--------------070804020706060204030908
Content-Type: text/x-patch;
 name="attributes.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="attributes.diff"

Index: sap.c
===================================================================
--- sap.c       (revision 17018)
+++ sap.c       (working copy)
@@ -265,7 +265,7 @@
     static void CacheSave( services_discovery_t *p_sd );
 /* Helper functions */
     static char *GetAttribute( sdp_t *p_sdp, const char *psz_search );
-    static vlc_bool_t IsSameSession( sdp_t *p_sdp1, sdp_t *p_sdp2 );
+    static vlc_bool_t IsSameSession( services_discovery_t *p_sd, sdp_t *p_sdp1, sdp_t *p_sdp2 );
     static int InitSocket( services_discovery_t *p_sd, char *psz_address, int i_port );
 #ifdef HAVE_ZLIB_H
     static int Decompress( unsigned char *psz_src, unsigned char **_dst, int i_len );
@@ -760,7 +760,7 @@
     {
         /* FIXME: slow */
         /* FIXME: we create a new announce each time the sdp changes */
-        if( IsSameSession( p_sd->p_sys->pp_announces[i]->p_sdp, p_sdp ) )
+        if( IsSameSession( p_sd, p_sd->p_sys->pp_announces[i]->p_sdp, p_sdp ) )
         {
             if( b_need_delete )
             {
@@ -773,7 +773,16 @@
             FreeSDP( p_sdp ); p_sdp = NULL;
             return VLC_SUCCESS;
         }
+        else
+       {
+           // if sessionname is the same but attributes have changed, delete old sdp
+            if (!strcmp(p_sdp->psz_sessionname,  p_sd->p_sys->pp_announces[i]->p_sdp->psz_sessionname))
+           {
+               RemoveAnnounce( p_sd, p_sd->p_sys->pp_announces[i]);
+           }
+        }
     }
+    
     /* Add item */
     if( p_sdp->i_media > 1 )
     {
@@ -1378,10 +1387,12 @@
     return VLC_SUCCESS;
 }
 
-static vlc_bool_t IsSameSession( sdp_t *p_sdp1, sdp_t *p_sdp2 )
+static vlc_bool_t IsSameSession( services_discovery_t *p_sd, sdp_t *p_sdp1, sdp_t *p_sdp2 )
 {
+    int i;
+       
     /* A session is identified by
-     * username, session_id, network type, address type and address */
+     * username, session_id, session_name, network type, address type and address */
     if( p_sdp1->psz_username && p_sdp2->psz_username &&
         p_sdp1->psz_network_type && p_sdp2->psz_network_type &&
         p_sdp1->psz_address_type && p_sdp2->psz_address_type &&
@@ -1391,8 +1402,25 @@
            !strcmp( p_sdp1->psz_network_type , p_sdp2->psz_network_type ) &&
            !strcmp( p_sdp1->psz_address_type , p_sdp2->psz_address_type ) &&
            !strcmp( p_sdp1->psz_address , p_sdp2->psz_address ) &&
+          !strcmp( p_sdp1->psz_sessionname , p_sdp2->psz_sessionname ) &&
            p_sdp1->i_session_id == p_sdp2->i_session_id )
         {
+           for (i = p_sdp1->i_attributes - 1; i >= 0; i--)
+            {
+                struct attribute_t *p_attr1 = p_sdp1->pp_attributes[i];
+               struct attribute_t *p_attr2 = p_sdp2->pp_attributes[i];
+
+               if (!strcmp(p_attr1->psz_field, p_attr2->psz_field) &&
+                    strcmp(p_attr1->psz_value, p_attr2->psz_value))
+               {
+                   // Attribute value change
+                   msg_Warn( p_sd, "Attribute change (%s): (%s) != (%s)",
+                                      p_attr1->psz_field,
+                                      p_attr1->psz_value, p_attr2->psz_value);
+
+                    return VLC_FALSE;
+               }
+           }
             return VLC_TRUE;
         }
         else

--------------070804020706060204030908--

  </pre>
</blockquote>
<br>
</body>
</html>