Commit 30410626 authored by Laurent Aimar's avatar Laurent Aimar

* rtp: removed a annoying debug message

 * announce.c: fixed a warning.
parent 2d0e1f20
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include <errno.h> /* ENOMEM */
#include <stdlib.h> /* free() */ #include <stdlib.h> /* free() */
#include <errno.h> /* ENOMEM */
#include <stdio.h> /* sprintf() */ #include <stdio.h> /* sprintf() */
#include <string.h> /* strerror() */
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/sout.h> #include <vlc/sout.h>
...@@ -396,8 +396,7 @@ void sout_SAPSend( sout_instance_t *p_sout, sap_session_t * p_sap ) ...@@ -396,8 +396,7 @@ void sout_SAPSend( sout_instance_t *p_sout, sap_session_t * p_sap )
free( psz_head ); free( psz_head );
} }
#ifdef HAVE_SLP_H
/***************************************************************************** /*****************************************************************************
* sout_SLPBuildName: Builds a service name according to SLP standard * sout_SLPBuildName: Builds a service name according to SLP standard
*****************************************************************************/ *****************************************************************************/
...@@ -412,24 +411,23 @@ static char * sout_SLPBuildName(char *psz_url,char *psz_name) ...@@ -412,24 +411,23 @@ static char * sout_SLPBuildName(char *psz_url,char *psz_name)
psz_service=(char *)malloc(i_size * sizeof(char)); psz_service=(char *)malloc(i_size * sizeof(char));
snprintf( psz_service , i_size, snprintf( psz_service , i_size,
"service:vlc.services.videolan://udp:@%s", "service:vlc.services.videolan://udp:@%s",
psz_url); psz_url);
/* How piggy ! */ /* How piggy ! */
psz_service[i_size]='\0'; /* Just to make sure */ psz_service[i_size]='\0'; /* Just to make sure */
return psz_service; return psz_service;
} }
/***************************************************************************** /*****************************************************************************
* sout_SLPReport: Reporting function. Unused at the moment but needed * sout_SLPReport: Reporting function. Unused at the moment but needed
*****************************************************************************/ *****************************************************************************/
#ifdef HAVE_SLP_H
static void sout_SLPReport(SLPHandle slp_handle,SLPError slp_error,void* cookie) static void sout_SLPReport(SLPHandle slp_handle,SLPError slp_error,void* cookie)
{ {
} }
#endif #endif
/***************************************************************************** /*****************************************************************************
...@@ -439,19 +437,19 @@ int sout_SLPReg( sout_instance_t *p_sout, char * psz_url, ...@@ -439,19 +437,19 @@ int sout_SLPReg( sout_instance_t *p_sout, char * psz_url,
char * psz_name) char * psz_name)
{ {
#ifdef HAVE_SLP_H #ifdef HAVE_SLP_H
SLPHandle slp_handle; SLPHandle slp_handle;
SLPError slp_res; SLPError slp_res;
char *psz_service= sout_SLPBuildName(psz_url,psz_name); char *psz_service= sout_SLPBuildName(psz_url,psz_name);
if( SLPOpen( NULL, SLP_FALSE, &slp_handle ) != SLP_OK) if( SLPOpen( NULL, SLP_FALSE, &slp_handle ) != SLP_OK)
{ {
msg_Warn(p_sout,"Unable to initialize SLP"); msg_Warn(p_sout,"Unable to initialize SLP");
return -1; return -1;
} }
msg_Info(p_sout , "Registering %s (name: %s) in SLP", msg_Info(p_sout , "Registering %s (name: %s) in SLP",
psz_service , psz_name); psz_service , psz_name);
slp_res = SLPReg ( slp_handle, slp_res = SLPReg ( slp_handle,
psz_service, psz_service,
SLP_LIFETIME_MAXIMUM, SLP_LIFETIME_MAXIMUM,
...@@ -460,7 +458,7 @@ int sout_SLPReg( sout_instance_t *p_sout, char * psz_url, ...@@ -460,7 +458,7 @@ int sout_SLPReg( sout_instance_t *p_sout, char * psz_url,
SLP_TRUE, SLP_TRUE,
sout_SLPReport, sout_SLPReport,
NULL ); NULL );
if( slp_res != SLP_OK ) if( slp_res != SLP_OK )
{ {
msg_Warn(p_sout,"Error while registering service: %i", slp_res ); msg_Warn(p_sout,"Error while registering service: %i", slp_res );
...@@ -483,24 +481,24 @@ int sout_SLPDereg( sout_instance_t *p_sout, char * psz_url, ...@@ -483,24 +481,24 @@ int sout_SLPDereg( sout_instance_t *p_sout, char * psz_url,
{ {
#ifdef HAVE_SLP_H #ifdef HAVE_SLP_H
SLPHandle slp_handle; SLPHandle slp_handle;
SLPError slp_res; SLPError slp_res;
char *psz_service= sout_SLPBuildName(psz_url,psz_name); char *psz_service= sout_SLPBuildName(psz_url,psz_name);
if( SLPOpen( NULL, SLP_FALSE, &slp_handle ) != SLP_OK) if( SLPOpen( NULL, SLP_FALSE, &slp_handle ) != SLP_OK)
{ {
msg_Warn(p_sout,"Unable to initialize SLP"); msg_Warn(p_sout,"Unable to initialize SLP");
return -1; return -1;
} }
msg_Info(p_sout , "Unregistering %s from SLP", msg_Info(p_sout , "Unregistering %s from SLP",
psz_service); psz_service);
slp_res = SLPDereg ( slp_handle, slp_res = SLPDereg ( slp_handle,
psz_service, psz_service,
sout_SLPReport, sout_SLPReport,
NULL ); NULL );
if( slp_res != SLP_OK ) if( slp_res != SLP_OK )
{ {
msg_Warn(p_sout,"Error while registering service: %i", slp_res ); msg_Warn(p_sout,"Error while registering service: %i", slp_res );
...@@ -510,6 +508,6 @@ int sout_SLPDereg( sout_instance_t *p_sout, char * psz_url, ...@@ -510,6 +508,6 @@ int sout_SLPDereg( sout_instance_t *p_sout, char * psz_url,
return 0; return 0;
#else /* This function should never be called if this is false */ #else /* This function should never be called if this is false */
return -1; return -1;
#endif #endif
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* rtp.c * rtp.c
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: rtp.c,v 1.5 2003/11/07 17:43:42 fenrir Exp $ * $Id: rtp.c,v 1.6 2003/11/07 18:32:24 fenrir Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -764,9 +764,8 @@ static int AccessOutGrabberWrite( sout_access_out_t *p_access, sout_buffer_t *p_ ...@@ -764,9 +764,8 @@ static int AccessOutGrabberWrite( sout_access_out_t *p_access, sout_buffer_t *p_
{ {
sout_stream_t *p_stream = (sout_stream_t*)p_access->p_sys; sout_stream_t *p_stream = (sout_stream_t*)p_access->p_sys;
fprintf( stderr, "received buffer size=%d\n", p_buffer->i_size ); //fprintf( stderr, "received buffer size=%d\n", p_buffer->i_size );
//
while( p_buffer ) while( p_buffer )
{ {
sout_buffer_t *p_next; sout_buffer_t *p_next;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment