[xiph-cvs] cvs commit: thread thread.c
Michael Smith
msmith at xiph.org
Sat Aug 3 01:14:57 PDT 2002
msmith 02/08/03 01:14:56
Modified: . TODO
conf ices-live.xml
src Makefile.am config.c config.h encode.c input.h
logging.h stream.c stream_shared.c
. log.c log.h
. thread.c
Log:
Lots of patches committable now that my sound card works properly again.
logging API changed slightly (I got sick of gcc warnings about deprecated
features).
resampling (for live input, not yet for reencoding) is in there.
several patches from Karl Heyes have been incorporated.
Revision Changes Path
1.3 +2 -0 ices/TODO
Index: TODO
===================================================================
RCS file: /usr/local/cvsroot/ices/TODO,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TODO 2002/07/20 12:52:05 1.2
+++ TODO 2002/08/03 08:14:53 1.3
@@ -3,6 +3,8 @@
- stream rewriting for serial number increment, etc.
- DOCUMENTATION!
- resampling.
+- graceful shutdown is broken (at least for resampling/live input, possibly
+ others)
<p><p>1.5 +13 -5 ices/conf/ices-live.xml
Index: ices-live.xml
===================================================================
RCS file: /usr/local/cvsroot/ices/conf/ices-live.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ices-live.xml 2002/07/20 12:52:05 1.4
+++ ices-live.xml 2002/08/03 08:14:54 1.5
@@ -5,7 +5,7 @@
<logpath>/tmp</logpath> <!-- where logs, etc go. -->
<logfile>ices.log</logfile>
<loglevel>4</loglevel> <!-- 1=error,2=warn,3=info,4=debug -->
- <consolelog>0</consolelog> <!-- logfile is ignored if this is set to 1 -->
+ <consolelog>1</consolelog> <!-- logfile is ignored if this is set to 1 -->
<stream>
<!-- metadata used for stream listing (not currently used) -->
@@ -22,7 +22,7 @@
-->
<input>
<module>oss</module>
- <param name="rate">22050</param> <!-- samplerate -->
+ <param name="rate">44100</param> <!-- samplerate -->
<param name="channels">2</param> <!-- number of channels -->
<param name="device">/dev/dsp</param> <!-- audio device -->
<param name="metadata">1</param> <!-- Read metadata (from stdin by default, or filename defined below (if the latter, only on SIGUSR1) -->
@@ -58,13 +58,21 @@
-->
<encode>
- <quality>3</quality>
+ <quality>0</quality>
<samplerate>22050</samplerate>
- <channels>2</channels>
+ <channels>1</channels>
</encode>
<!-- stereo->mono downmixing, enabled by setting this to 1 -->
- <downmix>0</downmix>
+ <downmix>1</downmix>
+
+ <!-- resampling. Set to the frequency (in Hz) you wish to resample
+ to, or 0 to disable -->
+
+ <resample>
+ <in-rate>44100</in-rate>
+ <out-rate>22050</out-rate>
+ </resample>
</instance>
</stream>
<p><p>1.8 +2 -2 ices/src/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ices/src/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Makefile.am 2002/07/20 12:52:06 1.7
+++ Makefile.am 2002/08/03 08:14:54 1.8
@@ -20,8 +20,8 @@
bin_PROGRAMS = ices
-noinst_HEADERS = config.h input.h inputmodule.h im_playlist.h signals.h stream.h reencode.h encode.h playlist_basic.h logging.h im_stdinpcm.h $(ossheaders) $(sunheaders) event.h stream_shared.h metadata.h downmix.h
-ices_SOURCES = input.c config.c stream.c ices.c signals.c im_playlist.c reencode.c encode.c playlist_basic.c im_stdinpcm.c $(osssources) $(sunsources) stream_shared.c savefile.c metadata.c stream_rewrite.c playlist_script.c downmix.c
+noinst_HEADERS = config.h input.h inputmodule.h im_playlist.h signals.h stream.h reencode.h encode.h playlist_basic.h logging.h im_stdinpcm.h $(ossheaders) $(sunheaders) event.h stream_shared.h metadata.h audio.h resample.h
+ices_SOURCES = input.c config.c stream.c ices.c signals.c im_playlist.c reencode.c encode.c playlist_basic.c im_stdinpcm.c $(osssources) $(sunsources) stream_shared.c savefile.c metadata.c stream_rewrite.c playlist_script.c audio.c resample.c
ices_LDADD = net/libicenet.la thread/libicethread.la log/libicelog.la\
avl/libiceavl.la timing/libicetiming.la
<p><p>1.10 +19 -1 ices/src/config.c
Index: config.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/config.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- config.c 2002/07/20 12:52:06 1.9
+++ config.c 2002/08/03 08:14:54 1.10
@@ -1,7 +1,7 @@
/* config.c
* - config file reading code, plus default settings.
*
- * $Id: config.c,v 1.9 2002/07/20 12:52:06 msmith Exp $
+ * $Id: config.c,v 1.10 2002/08/03 08:14:54 msmith Exp $
*
* Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
*
@@ -46,6 +46,7 @@
#define DEFAULT_QUALITY 3
#define DEFAULT_REENCODE 0
#define DEFAULT_DOWNMIX 0
+#define DEFAULT_RESAMPLE 0
#define DEFAULT_RECONN_DELAY 2
#define DEFAULT_RECONN_ATTEMPTS 10
#define DEFAULT_MAXQUEUELENGTH 100 /* Make it _BIG_ by default */
@@ -126,6 +127,8 @@
instance->quality = DEFAULT_QUALITY;
instance->encode = DEFAULT_REENCODE;
instance->downmix = DEFAULT_DOWNMIX;
+ instance->resampleinrate = DEFAULT_RESAMPLE;
+ instance->resampleoutrate = DEFAULT_RESAMPLE;
instance->reconnect_delay = DEFAULT_RECONN_DELAY;
instance->reconnect_attempts = DEFAULT_RECONN_ATTEMPTS;
instance->max_queue_length = DEFAULT_MAXQUEUELENGTH;
@@ -138,6 +141,19 @@
instance->next = NULL;
}
+static void _parse_resample(instance_t *instance,xmlDocPtr doc, xmlNodePtr node)
+{
+ do {
+ if (node == NULL) break;
+ if (xmlIsBlankNode(node)) continue;
+
+ if(strcmp(node->name, "in-rate") == 0)
+ SET_INT(instance->resampleinrate);
+ else if(strcmp(node->name, "out-rate") == 0)
+ SET_INT(instance->resampleoutrate);
+ } while((node = node->next));
+}
+
static void _parse_encode(instance_t *instance,xmlDocPtr doc, xmlNodePtr node)
{
instance->encode = 1;
@@ -194,6 +210,8 @@
SET_INT(instance->max_queue_length);
else if(strcmp(node->name, "downmix") == 0)
SET_INT(instance->downmix);
+ else if(strcmp(node->name, "resample") == 0)
+ _parse_resample(instance, doc, node->xmlChildrenNode);
else if (strcmp(node->name, "encode") == 0)
_parse_encode(instance, doc, node->xmlChildrenNode);
} while ((node = node->next));
<p><p>1.12 +3 -1 ices/src/config.h
Index: config.h
===================================================================
RCS file: /usr/local/cvsroot/ices/src/config.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- config.h 2002/07/20 12:52:06 1.11
+++ config.h 2002/08/03 08:14:54 1.12
@@ -1,7 +1,7 @@
/* config.h
* - configuration, and global structures built from config
*
- * $Id: config.h,v 1.11 2002/07/20 12:52:06 msmith Exp $
+ * $Id: config.h,v 1.12 2002/08/03 08:14:54 msmith Exp $
*
* Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
*
@@ -38,6 +38,8 @@
int reconnect_attempts;
int encode;
int downmix;
+ int resampleinrate;
+ int resampleoutrate;
int max_queue_length;
char *savefilename;
<p><p>1.9 +3 -3 ices/src/encode.c
Index: encode.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/encode.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- encode.c 2002/07/05 07:55:02 1.8
+++ encode.c 2002/08/03 08:14:54 1.9
@@ -1,7 +1,7 @@
/* encode.c
* - runtime encoding of PCM data.
*
- * $Id: encode.c,v 1.8 2002/07/05 07:55:02 msmith Exp $
+ * $Id: encode.c,v 1.9 2002/08/03 08:14:54 msmith Exp $
*
* Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
*
@@ -184,8 +184,8 @@
*/
if(s->samples_in_current_page > s->samplerate * 2)
{
- LOG_DEBUG1("Forcing flush: Too many samples in current page (%d)",
- s->samples_in_current_page);
+ /*LOG_DEBUG1("Forcing flush: Too many samples in current page (%d)",
+ s->samples_in_current_page); */
result = ogg_stream_flush(&s->os, og);
}
else
<p><p>1.6 +3 -2 ices/src/input.h
Index: input.h
===================================================================
RCS file: /usr/local/cvsroot/ices/src/input.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- input.h 2002/07/20 12:52:06 1.5
+++ input.h 2002/08/03 08:14:54 1.6
@@ -1,7 +1,7 @@
/* input.h
* - Input functions
*
- * $Id: input.h,v 1.5 2002/07/20 12:52:06 msmith Exp $
+ * $Id: input.h,v 1.6 2002/08/03 08:14:54 msmith Exp $
*
* Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
*
@@ -22,7 +22,7 @@
#include "stream.h"
#include "reencode.h"
#include "encode.h"
-#include "downmix.h"
+#include "audio.h"
typedef struct {
instance_t *stream;
@@ -30,6 +30,7 @@
reencode_state *reenc;
encoder_state *enc;
downmix_state *downmix;
+ resample_state *resamp;
shout_t *shout;
vorbis_comment vc;
} stream_description;
<p><p>1.4 +25 -25 ices/src/logging.h
Index: logging.h
===================================================================
RCS file: /usr/local/cvsroot/ices/src/logging.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- logging.h 2002/01/28 00:19:15 1.3
+++ logging.h 2002/08/03 08:14:54 1.4
@@ -1,7 +1,7 @@
/* logging.h
* - macros used for logging. #define MODULE before including
*
- * $Id: logging.h,v 1.3 2002/01/28 00:19:15 msmith Exp $
+ * $Id: logging.h,v 1.4 2002/08/03 08:14:54 msmith Exp $
*
* Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
*
@@ -21,30 +21,30 @@
#endif
-#define LOG_ERROR0(x) log_write(ices_config->log_id,1, MODULE __FUNCTION__,x)
-#define LOG_ERROR1(x,a) log_write(ices_config->log_id,1, MODULE __FUNCTION__,x, a)
-#define LOG_ERROR2(x,a,b) log_write(ices_config->log_id,1, MODULE __FUNCTION__,x, a,b)
-#define LOG_ERROR3(x,a,b,c) log_write(ices_config->log_id,1, MODULE __FUNCTION__,x, a,b,c)
-#define LOG_ERROR4(x,a,b,c,d) log_write(ices_config->log_id,1, MODULE __FUNCTION__,x, a,b,c,d)
-
-#define LOG_WARN0(x) log_write(ices_config->log_id,2, MODULE __FUNCTION__,x)
-#define LOG_WARN1(x,a) log_write(ices_config->log_id,2, MODULE __FUNCTION__,x, a)
-#define LOG_WARN2(x,a,b) log_write(ices_config->log_id,2, MODULE __FUNCTION__,x, a,b)
-#define LOG_WARN3(x,a,b,c) log_write(ices_config->log_id,2, MODULE __FUNCTION__,x, a,b,c)
-#define LOG_WARN4(x,a,b,c,d) log_write(ices_config->log_id,2, MODULE __FUNCTION__,x, a,b,c,d)
-
-#define LOG_INFO0(x) log_write(ices_config->log_id,3, MODULE __FUNCTION__,x)
-#define LOG_INFO1(x,a) log_write(ices_config->log_id,3, MODULE __FUNCTION__,x, a)
-#define LOG_INFO2(x,a,b) log_write(ices_config->log_id,3, MODULE __FUNCTION__,x, a,b)
-#define LOG_INFO3(x,a,b,c) log_write(ices_config->log_id,3, MODULE __FUNCTION__,x, a,b,c)
-#define LOG_INFO4(x,a,b,c,d) log_write(ices_config->log_id,3, MODULE __FUNCTION__,x, a,b,c,d)
-#define LOG_INFO5(x,a,b,c,d,e) log_write(ices_config->log_id,3, MODULE __FUNCTION__,x, a,b,c,d,e)
-
-#define LOG_DEBUG0(x) log_write(ices_config->log_id,4, MODULE __FUNCTION__,x)
-#define LOG_DEBUG1(x,a) log_write(ices_config->log_id,4, MODULE __FUNCTION__,x, a)
-#define LOG_DEBUG2(x,a,b) log_write(ices_config->log_id,4, MODULE __FUNCTION__,x, a,b)
-#define LOG_DEBUG3(x,a,b,c) log_write(ices_config->log_id,4, MODULE __FUNCTION__,x, a,b,c)
-#define LOG_DEBUG4(x,a,b,c,d) log_write(ices_config->log_id,4, MODULE __FUNCTION__,x, a,b,c,d)
+#define LOG_ERROR0(x) log_write(ices_config->log_id,1, MODULE, __FUNCTION__,x)
+#define LOG_ERROR1(x,a) log_write(ices_config->log_id,1, MODULE, __FUNCTION__,x, a)
+#define LOG_ERROR2(x,a,b) log_write(ices_config->log_id,1, MODULE, __FUNCTION__,x, a,b)
+#define LOG_ERROR3(x,a,b,c) log_write(ices_config->log_id,1, MODULE, __FUNCTION__,x, a,b,c)
+#define LOG_ERROR4(x,a,b,c,d) log_write(ices_config->log_id,1, MODULE, __FUNCTION__,x, a,b,c,d)
+
+#define LOG_WARN0(x) log_write(ices_config->log_id,2, MODULE, __FUNCTION__,x)
+#define LOG_WARN1(x,a) log_write(ices_config->log_id,2, MODULE, __FUNCTION__,x, a)
+#define LOG_WARN2(x,a,b) log_write(ices_config->log_id,2, MODULE, __FUNCTION__,x, a,b)
+#define LOG_WARN3(x,a,b,c) log_write(ices_config->log_id,2, MODULE, __FUNCTION__,x, a,b,c)
+#define LOG_WARN4(x,a,b,c,d) log_write(ices_config->log_id,2, MODULE, __FUNCTION__,x, a,b,c,d)
+
+#define LOG_INFO0(x) log_write(ices_config->log_id,3, MODULE, __FUNCTION__,x)
+#define LOG_INFO1(x,a) log_write(ices_config->log_id,3, MODULE, __FUNCTION__,x, a)
+#define LOG_INFO2(x,a,b) log_write(ices_config->log_id,3, MODULE, __FUNCTION__,x, a,b)
+#define LOG_INFO3(x,a,b,c) log_write(ices_config->log_id,3, MODULE, __FUNCTION__,x, a,b,c)
+#define LOG_INFO4(x,a,b,c,d) log_write(ices_config->log_id,3, MODULE, __FUNCTION__,x, a,b,c,d)
+#define LOG_INFO5(x,a,b,c,d,e) log_write(ices_config->log_id,3, MODULE, __FUNCTION__,x, a,b,c,d,e)
+
+#define LOG_DEBUG0(x) log_write(ices_config->log_id,4, MODULE, __FUNCTION__,x)
+#define LOG_DEBUG1(x,a) log_write(ices_config->log_id,4, MODULE, __FUNCTION__,x, a)
+#define LOG_DEBUG2(x,a,b) log_write(ices_config->log_id,4, MODULE, __FUNCTION__,x, a,b)
+#define LOG_DEBUG3(x,a,b,c) log_write(ices_config->log_id,4, MODULE, __FUNCTION__,x, a,b,c)
+#define LOG_DEBUG4(x,a,b,c,d) log_write(ices_config->log_id,4, MODULE, __FUNCTION__,x, a,b,c,d)
#endif /* __LOGGING_H */
<p><p>1.13 +9 -3 ices/src/stream.c
Index: stream.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/stream.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- stream.c 2002/07/20 12:52:06 1.12
+++ stream.c 2002/08/03 08:14:54 1.13
@@ -1,7 +1,7 @@
/* stream.c
* - Core streaming functions/main loop.
*
- * $Id: stream.c,v 1.12 2002/07/20 12:52:06 msmith Exp $
+ * $Id: stream.c,v 1.13 2002/08/03 08:14:54 msmith Exp $
*
* Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
*
@@ -28,7 +28,7 @@
#include "thread/thread.h"
#include "reencode.h"
#include "encode.h"
-#include "downmix.h"
+#include "audio.h"
#include "inputmodule.h"
#include "stream_shared.h"
#include "stream.h"
@@ -125,6 +125,11 @@
sdsc->downmix = downmix_initialise();
}
+ if(stream->resampleinrate && stream->resampleoutrate && encoding) {
+ sdsc->resamp = resample_initialise(stream->channels,
+ stream->resampleinrate, stream->resampleoutrate);
+ }
+
if(encoding)
{
if(inmod->metadata_update)
@@ -208,7 +213,7 @@
{
LOG_ERROR1("Send error: %s",
shout_get_error(sdsc->shout));
- if(shouterr == SHOUTERR_SOCKET)
+ if(shout_get_errno(sdsc->shout) == SHOUTERR_SOCKET)
{
int i=0;
@@ -275,6 +280,7 @@
encode_clear(sdsc->enc);
reencode_clear(sdsc->reenc);
downmix_clear(sdsc->downmix);
+ resample_clear(sdsc->resamp);
vorbis_comment_clear(&sdsc->vc);
stream->died = 1;
<p><p>1.9 +31 -5 ices/src/stream_shared.c
Index: stream_shared.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/stream_shared.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- stream_shared.c 2002/07/20 12:52:06 1.8
+++ stream_shared.c 2002/08/03 08:14:54 1.9
@@ -1,7 +1,7 @@
/* stream_shared.c
* - Stream utility functions.
*
- * $Id: stream_shared.c,v 1.8 2002/07/20 12:52:06 msmith Exp $
+ * $Id: stream_shared.c,v 1.9 2002/08/03 08:14:54 msmith Exp $
*
* Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
*
@@ -23,7 +23,7 @@
#include "stream.h"
#include "reencode.h"
#include "encode.h"
-#include "downmix.h"
+#include "audio.h"
#define MODULE "stream-shared/"
#include "logging.h"
@@ -31,6 +31,8 @@
int stream_send_data(stream_description *s, unsigned char *buf,
unsigned long len)
{
+ int ret;
+
if(s->stream->savefile)
{
int ret = fwrite(buf, 1, len, s->stream->savefile);
@@ -38,7 +40,11 @@
LOG_ERROR1("Failed to write %d bytes to savefile", len);
}
- return shout_send_raw(s->shout, buf, len);
+ ret = shout_send_raw(s->shout, buf, len);
+ if(ret < 0)
+ return 0; /* Force server-reconnect */
+ else
+ return ret;
}
void stream_release_buffer(ref_buffer *buf)
@@ -132,6 +138,11 @@
/* We use critical as a flag to say 'start a new stream' */
if(buffer->critical)
{
+ if(sdsc->resamp) {
+ resample_finish(sdsc->resamp);
+ encode_data_float(sdsc->enc, sdsc->resamp->buffers,
+ sdsc->resamp->buffill);
+ }
encode_finish(sdsc->enc);
while(encode_flush(sdsc->enc, &og) != 0)
{
@@ -157,11 +168,26 @@
if(sdsc->downmix) {
downmix_buffer(sdsc->downmix, buffer->buf, buffer->len, be);
- encode_data_float(sdsc->enc, &sdsc->downmix->buffer, buffer->len/4);
+ if(sdsc->resamp) {
+ resample_buffer_float(sdsc->resamp, &sdsc->downmix->buffer,
+ buffer->len/4);
+ encode_data_float(sdsc->enc, sdsc->resamp->buffers,
+ sdsc->resamp->buffill);
+ }
+ else
+ encode_data_float(sdsc->enc, &sdsc->downmix->buffer,
+ buffer->len/4);
+ }
+ else if(sdsc->resamp) {
+ resample_buffer(sdsc->resamp, (signed char *)buffer->buf,
+ buffer->len, be);
+ encode_data_float(sdsc->enc, sdsc->resamp->buffers,
+ sdsc->resamp->buffill);
}
- else
+ else {
encode_data(sdsc->enc, (signed char *)(buffer->buf),
buffer->len, be);
+ }
while(encode_dataout(sdsc->enc, &og) > 0)
{
<p><p>1.8 +3 -2 log/log.c
Index: log.c
===================================================================
RCS file: /usr/local/cvsroot/log/log.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- log.c 2002/04/05 09:28:26 1.7
+++ log.c 2002/08/03 08:14:56 1.8
@@ -160,7 +160,8 @@
_initialized = 0;
}
-void log_write(int log_id, int priority, const char *cat, const char *fmt, ...)
+void log_write(int log_id, int priority, const char *cat, const char *func,
+ const char *fmt, ...)
{
static char prior[4][5] = { "EROR\0", "WARN\0", "INFO\0", "DBUG\0" };
char tyme[128];
@@ -181,7 +182,7 @@
now = time(NULL);
strftime(tyme, 128, "[%Y-%m-%d %H:%M:%S]", localtime(&now));
- snprintf(pre, 256, "%s %s", prior[priority-1], cat);
+ snprintf(pre, 256, "%s %s%s", prior[priority-1], cat, func);
fprintf(loglist[log_id].logfile, "%s %s %s\n", tyme, pre, line);
<p><p>1.4 +2 -1 log/log.h
Index: log.h
===================================================================
RCS file: /usr/local/cvsroot/log/log.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- log.h 2002/01/29 09:20:28 1.3
+++ log.h 2002/08/03 08:14:56 1.4
@@ -20,7 +20,8 @@
void log_close(int log_id);
void log_shutdown();
-void log_write(int log_id, int priority, const char *cat, const char *fmt, ...);
+void log_write(int log_id, int priority, const char *cat, const char *func,
+ const char *fmt, ...);
void log_write_direct(int log_id, const char *fmt, ...);
#endif /* __LOG_H__ */
<p><p>1.10 +16 -17 thread/thread.c
Index: thread.c
===================================================================
RCS file: /usr/local/cvsroot/thread/thread.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- thread.c 2002/04/30 06:50:47 1.9
+++ thread.c 2002/08/03 08:14:56 1.10
@@ -47,22 +47,22 @@
#endif
#define CATMODULE "thread"
-#define LOG_ERROR(y) log_write(_logid, 1, CATMODULE "/" __FUNCTION__, y)
-#define LOG_ERROR3(y, z1, z2, z3) log_write(_logid, 1, CATMODULE "/" __FUNCTION__, y, z1, z2, z3)
-#define LOG_ERROR7(y, z1, z2, z3, z4, z5, z6, z7) log_write(_logid, 1, CATMODULE "/" __FUNCTION__, y, z1, z2, z3, z4, z5, z6, z7)
-
-#define LOG_WARN(y) log_write(_logid, 2, CATMODULE "/" __FUNCTION__, y)
-#define LOG_WARN3(y, z1, z2, z3) log_write(_logid, 2, CATMODULE "/" __FUNCTION__, y, z1, z2, z3)
-#define LOG_WARN5(y, z1, z2, z3, z4, z5) log_write(_logid, 2, CATMODULE "/" __FUNCTION__, y, z1, z2, z3, z4, z5)
-#define LOG_WARN7(y, z1, z2, z3, z4, z5, z6, z7) log_write(_logid, 2, CATMODULE "/" __FUNCTION__, y, z1, z2, z3, z4, z5, z6, z7)
-
-#define LOG_INFO(y) log_write(_logid, 3, CATMODULE "/" __FUNCTION__, y)
-#define LOG_INFO4(y, z1, z2, z3, z4) log_write(_logid, 3, CATMODULE "/" __FUNCTION__, y, z1, z2, z3, z4)
-#define LOG_INFO5(y, z1, z2, z3, z4, z5) log_write(_logid, 3, CATMODULE "/" __FUNCTION__, y, z1, z2, z3, z4, z5)
-
-#define LOG_DEBUG(y) log_write(_logid, 4, CATMODULE "/" __FUNCTION__, y)
-#define LOG_DEBUG2(y, z1, z2) log_write(_logid, 4, CATMODULE "/" __FUNCTION__, y, z1, z2)
-#define LOG_DEBUG5(y, z1, z2, z3, z4, z5) log_write(_logid, 4, CATMODULE "/" __FUNCTION__, y, z1, z2, z3, z4, z5)
+#define LOG_ERROR(y) log_write(_logid, 1, CATMODULE "/", __FUNCTION__, y)
+#define LOG_ERROR3(y, z1, z2, z3) log_write(_logid, 1, CATMODULE "/", __FUNCTION__, y, z1, z2, z3)
+#define LOG_ERROR7(y, z1, z2, z3, z4, z5, z6, z7) log_write(_logid, 1, CATMODULE "/", __FUNCTION__, y, z1, z2, z3, z4, z5, z6, z7)
+
+#define LOG_WARN(y) log_write(_logid, 2, CATMODULE "/", __FUNCTION__, y)
+#define LOG_WARN3(y, z1, z2, z3) log_write(_logid, 2, CATMODULE "/", __FUNCTION__, y, z1, z2, z3)
+#define LOG_WARN5(y, z1, z2, z3, z4, z5) log_write(_logid, 2, CATMODULE "/", __FUNCTION__, y, z1, z2, z3, z4, z5)
+#define LOG_WARN7(y, z1, z2, z3, z4, z5, z6, z7) log_write(_logid, 2, CATMODULE "/", __FUNCTION__, y, z1, z2, z3, z4, z5, z6, z7)
+
+#define LOG_INFO(y) log_write(_logid, 3, CATMODULE "/", __FUNCTION__, y)
+#define LOG_INFO4(y, z1, z2, z3, z4) log_write(_logid, 3, CATMODULE "/", __FUNCTION__, y, z1, z2, z3, z4)
+#define LOG_INFO5(y, z1, z2, z3, z4, z5) log_write(_logid, 3, CATMODULE "/", __FUNCTION__, y, z1, z2, z3, z4, z5)
+
+#define LOG_DEBUG(y) log_write(_logid, 4, CATMODULE "/", __FUNCTION__, y)
+#define LOG_DEBUG2(y, z1, z2) log_write(_logid, 4, CATMODULE "/", __FUNCTION__, y, z1, z2)
+#define LOG_DEBUG5(y, z1, z2, z3, z4, z5) log_write(_logid, 4, CATMODULE "/", __FUNCTION__, y, z1, z2, z3, z4, z5)
/* thread starting structure */
typedef struct thread_start_tag {
@@ -255,7 +255,6 @@
start->arg = arg;
start->thread = thread;
start->detached = detached;
-
created = 0;
if (pthread_create(&thread->sys_thread, NULL, _start_routine, start) == 0)
<p><p><p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list