[svn-commits] branch oej/test-this-branch r17778 - in /team/oej/test-this-branch: ./ formats/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Apr 6 01:41:13 MST 2006


Author: oej
Date: Thu Apr  6 03:41:09 2006
New Revision: 17778

URL: http://svn.digium.com/view/asterisk?rev=17778&view=rev
Log:
- Fix conflict
- Implement G.722 in another way (mithraen)

Modified:
    team/oej/test-this-branch/   (props changed)
    team/oej/test-this-branch/Makefile
    team/oej/test-this-branch/formats/format_pcm.c

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
    automerge = http://edvina.net/

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Apr  6 03:41:09 2006
@@ -1,1 +1,1 @@
-/trunk:1-17729
+/trunk:1-17739

Modified: team/oej/test-this-branch/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/Makefile?rev=17778&r1=17777&r2=17778&view=diff
==============================================================================
--- team/oej/test-this-branch/Makefile (original)
+++ team/oej/test-this-branch/Makefile Thu Apr  6 03:41:09 2006
@@ -28,6 +28,7 @@
 ifeq ($(CROSS_COMPILE),)
   OSARCH=$(shell uname -s)
   OSREV=$(shell uname -r)
+  MARCH=$(shell uname -m)
 else
   OSARCH=$(CROSS_ARCH)
   OSREV=$(CROSS_REV)
@@ -401,8 +402,11 @@
   AUDIO_LIBS=-framework CoreAudio
   ASTLINK=-Wl,-dynamic
   SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
-  #OBJS+=poll.o
-  #ASTCFLAGS+=-DPOLLCOMPAT
+  # Mac on Intel CoreDuo does not need poll compatibility layer
+  ifneq ($(MARCH),i386)
+    OBJS+=poll.o
+    ASTCFLAGS+=-DPOLLCOMPAT
+  endif
 else
 #These are used for all but Darwin
   ASTLINK=-Wl,-E 

Modified: team/oej/test-this-branch/formats/format_pcm.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/formats/format_pcm.c?rev=17778&r1=17777&r2=17778&view=diff
==============================================================================
--- team/oej/test-this-branch/formats/format_pcm.c (original)
+++ team/oej/test-this-branch/formats/format_pcm.c Thu Apr  6 03:41:09 2006
@@ -447,6 +447,19 @@
 	.lockp = &me,
 };
 
+static const struct ast_format g722_f = {
+	.name = "g722",
+	.exts = "g722",
+	.format = AST_FORMAT_G722,
+	.write = pcm_write,
+	.seek = pcm_seek,
+	.trunc = pcm_trunc,
+	.tell = pcm_tell,
+	.read = pcm_read,
+	.buf_size = (BUF_SIZE * 2) + AST_FRIENDLY_OFFSET,
+	.lockp = &me,
+};
+
 static const struct ast_format au_f = {
 	.name = "au",
 	.exts = "au",
@@ -472,14 +485,18 @@
 	for (index = 0; index < (sizeof(alaw_silence) / sizeof(alaw_silence[0])); index++)
 		alaw_silence[index] = AST_LIN2A(0);
 
-	return ast_format_register(&pcm_f) || ast_format_register(&alaw_f)
-		|| ast_format_register(&au_f);
+	return ast_format_register(&pcm_f)
+		|| ast_format_register(&alaw_f)
+		|| ast_format_register(&au_f)
+		|| ast_foramt_register(&g722_f);
 }
 
 int unload_module()
 {
-	return ast_format_unregister(pcm_f.name) || ast_format_unregister(alaw_f.name)
-		|| ast_format_unregister(au_f.name);
+	return ast_format_unregister(pcm_f.name)
+		|| ast_format_unregister(alaw_f.name)
+		|| ast_format_unregister(au_f.name)
+		|| ast_format_unregister(g722_f.name);
 }	
 
 int usecount()



More information about the svn-commits mailing list