[vlc-devel] Re: [Fwd: [PATCH] Remove old announce and create new when attributes change]

Dermot McGahon dermot at dspsrv.com
Thu Nov 30 10:12:06 CET 2006


Hi,

Still waiting for SAP and xvideo patches to be reviewed when you can.

[vlc-devel] [PATCH] Remove old announce and create new when attributes 
change (not considered)
[vlc-devel] [PATCH] Hide/Show video output window (not considered)


Regards,

Dermot.

Dermot McGahon wrote:
> No comment on this patch with respect to trunk or 0.8.6 yet. That
> means that patches being submitted are not being considered for
> inclusion (or at least that feedback isn't being given to submitters).
>
> This is a summary of the patches submitted by me recently. I am
> hopeful that I can get them into a stable release which trunk definitely
> isn't at the moment,
>
> [vlc-devel] [PATCH] Remove old announce and create new when attributes 
> change (not considered)
> [vlc-devel] [PATCH] retry on failure to connect to rc-unix socket (not 
> considered)
> [vlc-devel] [PATCH] Hide/Show video output window (not considered)
>
> [vlc-devel] [PATCH] Repeat and Loop - Remote Control Interface 
> (included in trunk)
> [vlc-devel] [PATCH] marquee crash fix (included in trunk)
>
>
> Dermot.
>
> ------------------------------------------------------------------------
>
>
> >From dermot  Thu Oct 12 10:00:26 2006
> Return-path: <vlc-devel-bounce at videolan.org>
> Envelope-to: dermot at dspsrv.com
> 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 <vlc-devel-bounce at videolan.org>)
> 	id 1GXwQR-0007EQ-GC
> 	for dermot at dspsrv.com; 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: vlc-devel at krishna.via.ecp.fr
> Delivered-To: vlc-devel at krishna.via.ecp.fr
> Received: from localhost (localhost [127.0.0.1])
> 	by krishna.via.ecp.fr (Postfix) with ESMTP id 23140B9A2
> 	for <vlc-devel at krishna.via.ecp.fr>; 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 <vlc-devel at krishna.via.ecp.fr>;
> 	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 <vlc-devel at videolan.org>; 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 <vlc-devel at videolan.org>; Thu, 12 Oct 2006 10:00:49 +0100 (envelope-from <dermot at dspsrv.com>)
> 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 <vlc-devel at videolan.org>; Thu, 12 Oct 2006 10:00:03 +0100
> Message-ID: <452E040D.5090901 at dspsrv.com>
> Date: Thu, 12 Oct 2006 09:59:57 +0100
> From: Dermot McGahon <dermot at dspsrv.com>
> User-Agent: Thunderbird 1.5.0.7 (X11/20060922)
> MIME-Version: 1.0
> To: vlc-devel at videolan.org
> 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: vlc-devel-bounce at videolan.org
> Errors-To: vlc-devel-bounce at videolan.org
> X-original-sender: dermot at dspsrv.com
> Precedence: bulk
> Reply-To: vlc-devel at videolan.org
> 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--
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20061130/7279e0bb/attachment.html>


More information about the vlc-devel mailing list