[asterisk-commits] tilghman: branch tilghman/codec_bits3 r225763 - in /team/tilghman/codec_bits3...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Oct 25 14:13:51 CDT 2009


Author: tilghman
Date: Sun Oct 25 14:13:46 2009
New Revision: 225763

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=225763
Log:
Mostly conversions to apps, codecs, and formats

Modified:
    team/tilghman/codec_bits3/apps/app_mp3.c
    team/tilghman/codec_bits3/apps/app_nbscat.c
    team/tilghman/codec_bits3/apps/app_queue.c
    team/tilghman/codec_bits3/apps/app_record.c
    team/tilghman/codec_bits3/apps/app_sms.c
    team/tilghman/codec_bits3/apps/app_speech_utils.c
    team/tilghman/codec_bits3/apps/app_talkdetect.c
    team/tilghman/codec_bits3/apps/app_test.c
    team/tilghman/codec_bits3/apps/app_url.c
    team/tilghman/codec_bits3/apps/app_waitforring.c
    team/tilghman/codec_bits3/bridges/bridge_softmix.c
    team/tilghman/codec_bits3/codecs/codec_dahdi.c
    team/tilghman/codec_bits3/codecs/ex_adpcm.h
    team/tilghman/codec_bits3/codecs/ex_alaw.h
    team/tilghman/codec_bits3/codecs/ex_g722.h
    team/tilghman/codec_bits3/codecs/ex_g726.h
    team/tilghman/codec_bits3/codecs/ex_gsm.h
    team/tilghman/codec_bits3/codecs/ex_ilbc.h
    team/tilghman/codec_bits3/codecs/ex_lpc10.h
    team/tilghman/codec_bits3/codecs/ex_speex.h
    team/tilghman/codec_bits3/codecs/ex_ulaw.h
    team/tilghman/codec_bits3/formats/format_g723.c
    team/tilghman/codec_bits3/formats/format_g726.c
    team/tilghman/codec_bits3/formats/format_g729.c
    team/tilghman/codec_bits3/formats/format_gsm.c
    team/tilghman/codec_bits3/formats/format_h263.c
    team/tilghman/codec_bits3/formats/format_h264.c
    team/tilghman/codec_bits3/formats/format_ilbc.c
    team/tilghman/codec_bits3/formats/format_jpeg.c
    team/tilghman/codec_bits3/formats/format_ogg_vorbis.c
    team/tilghman/codec_bits3/formats/format_pcm.c
    team/tilghman/codec_bits3/formats/format_siren14.c
    team/tilghman/codec_bits3/formats/format_siren7.c
    team/tilghman/codec_bits3/formats/format_sln.c
    team/tilghman/codec_bits3/formats/format_sln16.c
    team/tilghman/codec_bits3/formats/format_vox.c
    team/tilghman/codec_bits3/formats/format_wav.c
    team/tilghman/codec_bits3/formats/format_wav_gsm.c
    team/tilghman/codec_bits3/funcs/func_volume.c
    team/tilghman/codec_bits3/include/asterisk/bridging_technology.h
    team/tilghman/codec_bits3/include/asterisk/slin.h
    team/tilghman/codec_bits3/res/res_adsi.c

Modified: team/tilghman/codec_bits3/apps/app_mp3.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_mp3.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/apps/app_mp3.c (original)
+++ team/tilghman/codec_bits3/apps/app_mp3.c Sun Oct 25 14:13:46 2009
@@ -169,7 +169,7 @@
 				res = timed_read(fds[0], myf.frdata, sizeof(myf.frdata), timeout);
 				if (res > 0) {
 					myf.f.frametype = AST_FRAME_VOICE;
-					myf.f.subclass = AST_FORMAT_SLINEAR;
+					myf.f.subclass.codec = AST_FORMAT_SLINEAR;
 					myf.f.datalen = res;
 					myf.f.samples = res / 2;
 					myf.f.mallocd = 0;

Modified: team/tilghman/codec_bits3/apps/app_nbscat.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_nbscat.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/apps/app_nbscat.c (original)
+++ team/tilghman/codec_bits3/apps/app_nbscat.c Sun Oct 25 14:13:46 2009
@@ -148,7 +148,7 @@
 				res = timed_read(fds[0], myf.frdata, sizeof(myf.frdata));
 				if (res > 0) {
 					myf.f.frametype = AST_FRAME_VOICE;
-					myf.f.subclass = AST_FORMAT_SLINEAR;
+					myf.f.subclass.codec = AST_FORMAT_SLINEAR;
 					myf.f.datalen = res;
 					myf.f.samples = res / 2;
 					myf.f.mallocd = 0;

Modified: team/tilghman/codec_bits3/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_queue.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/apps/app_queue.c (original)
+++ team/tilghman/codec_bits3/apps/app_queue.c Sun Oct 25 14:13:46 2009
@@ -3215,7 +3215,7 @@
 				f = ast_read(winner);
 				if (f) {
 					if (f->frametype == AST_FRAME_CONTROL) {
-						switch (f->subclass) {
+						switch (f->subclass.integer) {
 						case AST_CONTROL_ANSWER:
 							/* This is our guy if someone answered. */
 							if (!peer) {
@@ -3305,7 +3305,7 @@
 							}
 							break;
 						default:
-							ast_debug(1, "Dunno what to do with control type %d\n", f->subclass);
+							ast_debug(1, "Dunno what to do with control type %d\n", f->subclass.integer);
 							break;
 						}
 					}
@@ -3329,7 +3329,7 @@
 		/* If we received an event from the caller, deal with it. */
 		if (winner == in) {
 			f = ast_read(in);
-			if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))) {
+			if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass.integer == AST_CONTROL_HANGUP))) {
 				/* Got hung up */
 				*to = -1;
 				if (f) {
@@ -3340,16 +3340,16 @@
 				}
 				return NULL;
 			}
-			if ((f->frametype == AST_FRAME_DTMF) && caller_disconnect && (f->subclass == '*')) {
-				ast_verb(3, "User hit %c to disconnect call.\n", f->subclass);
+			if ((f->frametype == AST_FRAME_DTMF) && caller_disconnect && (f->subclass.integer == '*')) {
+				ast_verb(3, "User hit %c to disconnect call.\n", f->subclass.integer);
 				*to = 0;
 				ast_frfree(f);
 				return NULL;
 			}
-			if ((f->frametype == AST_FRAME_DTMF) && valid_exit(qe, f->subclass)) {
-				ast_verb(3, "User pressed digit: %c\n", f->subclass);
+			if ((f->frametype == AST_FRAME_DTMF) && valid_exit(qe, f->subclass.integer)) {
+				ast_verb(3, "User pressed digit: %c\n", f->subclass.integer);
 				*to = 0;
-				*digit = f->subclass;
+				*digit = f->subclass.integer;
 				ast_frfree(f);
 				return NULL;
 			}

Modified: team/tilghman/codec_bits3/apps/app_record.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_record.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/apps/app_record.c (original)
+++ team/tilghman/codec_bits3/apps/app_record.c Sun Oct 25 14:13:46 2009
@@ -372,7 +372,7 @@
 				break;
 			}
 		} else if ((f->frametype == AST_FRAME_DTMF) &&
-		    (f->subclass == terminator)) {
+		    (f->subclass.integer == terminator)) {
 			ast_frfree(f);
 			pbx_builtin_setvar_helper(chan, "RECORD_STATUS", "DTMF");
 			break;

Modified: team/tilghman/codec_bits3/apps/app_sms.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_sms.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/apps/app_sms.c (original)
+++ team/tilghman/codec_bits3/apps/app_sms.c Sun Oct 25 14:13:46 2009
@@ -1603,7 +1603,7 @@
 	buf = alloca(len);
 
 	f.frametype = AST_FRAME_VOICE;
-	f.subclass = __OUT_FMT;
+	f.subclass.codec = __OUT_FMT;
 	f.datalen = samples * sizeof(*buf);
 	f.offset = AST_FRIENDLY_OFFSET;
 	f.mallocd = 0;

Modified: team/tilghman/codec_bits3/apps/app_speech_utils.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_speech_utils.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/apps/app_speech_utils.c (original)
+++ team/tilghman/codec_bits3/apps/app_speech_utils.c Sun Oct 25 14:13:46 2009
@@ -824,7 +824,7 @@
 			/* Free the frame we received */
 			switch (f->frametype) {
 			case AST_FRAME_DTMF:
-				if (dtmf_terminator != '\0' && f->subclass == dtmf_terminator) {
+				if (dtmf_terminator != '\0' && f->subclass.integer == dtmf_terminator) {
 					done = 1;
 				} else {
 					if (chan->stream != NULL) {
@@ -836,7 +836,7 @@
 						started = 1;
 					}
 					start = ast_tvnow();
-					snprintf(tmp, sizeof(tmp), "%c", f->subclass);
+					snprintf(tmp, sizeof(tmp), "%c", f->subclass.integer);
 					strncat(dtmf, tmp, sizeof(dtmf) - strlen(dtmf) - 1);
 					/* If the maximum length of the DTMF has been reached, stop now */
 					if (max_dtmf_len && strlen(dtmf) == max_dtmf_len)
@@ -844,7 +844,7 @@
 				}
 				break;
 			case AST_FRAME_CONTROL:
-				switch (f->subclass) {
+				switch (f->subclass.integer) {
 				case AST_CONTROL_HANGUP:
 					/* Since they hung up we should destroy the speech structure */
 					done = 3;

Modified: team/tilghman/codec_bits3/apps/app_talkdetect.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_talkdetect.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/apps/app_talkdetect.c (original)
+++ team/tilghman/codec_bits3/apps/app_talkdetect.c Sun Oct 25 14:13:46 2009
@@ -173,15 +173,15 @@
 					break;
 				} else if (fr->frametype == AST_FRAME_DTMF) {
 					char t[2];
-					t[0] = fr->subclass;
+					t[0] = fr->subclass.integer;
 					t[1] = '\0';
 					if (ast_canmatch_extension(chan, chan->context, t, 1, chan->cid.cid_num)) {
 						/* They entered a valid  extension, or might be anyhow */
-						res = fr->subclass;
+						res = fr->subclass.integer;
 						ast_frfree(fr);
 						break;
 					}
-				} else if ((fr->frametype == AST_FRAME_VOICE) && (fr->subclass == AST_FORMAT_SLINEAR) && continue_analysis) {
+				} else if ((fr->frametype == AST_FRAME_VOICE) && (fr->subclass.codec == AST_FORMAT_SLINEAR) && continue_analysis) {
 					int totalsilence;
 					int ms;
 					res = ast_dsp_silence(dsp, fr, &totalsilence);

Modified: team/tilghman/codec_bits3/apps/app_test.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_test.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/apps/app_test.c (original)
+++ team/tilghman/codec_bits3/apps/app_test.c Sun Oct 25 14:13:46 2009
@@ -106,7 +106,7 @@
 			res = -1;
 			break;
 		}
-		if ((f->frametype == AST_FRAME_VOICE) && (f->subclass == AST_FORMAT_SLINEAR)) {
+		if ((f->frametype == AST_FRAME_VOICE) && (f->subclass.codec == AST_FORMAT_SLINEAR)) {
 			foo = (short *)f->data.ptr;
 			for (x=0;x<f->samples;x++) {
 				noise += abs(foo[x]);

Modified: team/tilghman/codec_bits3/apps/app_url.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_url.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/apps/app_url.c (original)
+++ team/tilghman/codec_bits3/apps/app_url.c Sun Oct 25 14:13:46 2009
@@ -139,7 +139,7 @@
 				break;
 			}
 			if (f->frametype == AST_FRAME_HTML) {
-				switch(f->subclass) {
+				switch (f->subclass.integer) {
 				case AST_HTML_LDCOMPLETE:
 					res = 0;
 					ast_frfree(f);
@@ -154,7 +154,7 @@
 					goto out;
 					break;
 				default:
-					ast_log(LOG_WARNING, "Don't know what to do with HTML subclass %d\n", f->subclass);
+					ast_log(LOG_WARNING, "Don't know what to do with HTML subclass %d\n", f->subclass.integer);
 				};
 			}
 			ast_frfree(f);

Modified: team/tilghman/codec_bits3/apps/app_waitforring.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_waitforring.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/apps/app_waitforring.c (original)
+++ team/tilghman/codec_bits3/apps/app_waitforring.c Sun Oct 25 14:13:46 2009
@@ -78,7 +78,7 @@
 				res = -1;
 				break;
 			}
-			if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_RING)) {
+			if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass.integer == AST_CONTROL_RING)) {
 				ast_verb(3, "Got a ring but still waiting for timeout\n");
 			}
 			ast_frfree(f);
@@ -99,7 +99,7 @@
 					res = -1;
 					break;
 				}
-				if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_RING)) {
+				if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass.integer == AST_CONTROL_RING)) {
 					ast_verb(3, "Got a ring after the timeout\n");
 					ast_frfree(f);
 					break;

Modified: team/tilghman/codec_bits3/bridges/bridge_softmix.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/bridges/bridge_softmix.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/bridges/bridge_softmix.c (original)
+++ team/tilghman/codec_bits3/bridges/bridge_softmix.c Sun Oct 25 14:13:46 2009
@@ -123,9 +123,9 @@
 	/* Setup frame parameters */
 	sc->frame.frametype = AST_FRAME_VOICE;
 #ifdef SOFTMIX_16_SUPPORT
-	sc->frame.subclass = AST_FORMAT_SLINEAR16;
+	sc->frame.subclass.codec = AST_FORMAT_SLINEAR16;
 #else
-	sc->frame.subclass = AST_FORMAT_SLINEAR;
+	sc->frame.subclass.codec = AST_FORMAT_SLINEAR;
 #endif
 	sc->frame.data.ptr = sc->final_buf;
 	sc->frame.datalen = SOFTMIX_DATALEN;
@@ -168,9 +168,9 @@
 
 	/* If a frame was provided add it to the smoother */
 #ifdef SOFTMIX_16_SUPPORT
-	if (frame->frametype == AST_FRAME_VOICE && frame->subclass == AST_FORMAT_SLINEAR16) {
+	if (frame->frametype == AST_FRAME_VOICE && frame->subclass.codec == AST_FORMAT_SLINEAR16) {
 #else
-	if (frame->frametype == AST_FRAME_VOICE && frame->subclass == AST_FORMAT_SLINEAR) {
+	if (frame->frametype == AST_FRAME_VOICE && frame->subclass.codec == AST_FORMAT_SLINEAR) {
 #endif
 		ast_slinfactory_feed(&sc->factory, frame);
 	}

Modified: team/tilghman/codec_bits3/codecs/codec_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/codecs/codec_dahdi.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/codecs/codec_dahdi.c (original)
+++ team/tilghman/codec_bits3/codecs/codec_dahdi.c Sun Oct 25 14:13:46 2009
@@ -181,7 +181,7 @@
 {
 	struct codec_dahdi_pvt *dahdip = pvt->pvt;
 
-	if (!f->subclass) {
+	if (!f->subclass.codec) {
 		/* We're just faking a return for calculation purposes. */
 		dahdip->fake = 2;
 		pvt->samples = f->samples;
@@ -229,7 +229,7 @@
 	if (2 == dahdip->fake) {
 		dahdip->fake = 1;
 		pvt->f.frametype = AST_FRAME_VOICE;
-		pvt->f.subclass = 0;
+		pvt->f.subclass.codec = 0;
 		pvt->f.samples = dahdip->required_samples;
 		pvt->f.data.ptr = NULL;
 		pvt->f.offset = 0;
@@ -257,7 +257,7 @@
 		pvt->f.datalen = res;
 		pvt->f.samples = dahdip->required_samples;
 		pvt->f.frametype = AST_FRAME_VOICE;
-		pvt->f.subclass = 1 <<  (pvt->t->dstfmt);
+		pvt->f.subclass.codec = 1 <<  (pvt->t->dstfmt);
 		pvt->f.mallocd = 0;
 		pvt->f.offset = AST_FRIENDLY_OFFSET;
 		pvt->f.src = pvt->t->name;
@@ -276,7 +276,7 @@
 {
 	struct codec_dahdi_pvt *dahdip = pvt->pvt;
 
-	if (!f->subclass) {
+	if (!f->subclass.codec) {
 		/* We're just faking a return for calculation purposes. */
 		dahdip->fake = 2;
 		pvt->samples = f->samples;
@@ -302,7 +302,7 @@
 	if (2 == dahdip->fake) {
 		dahdip->fake = 1;
 		pvt->f.frametype = AST_FRAME_VOICE;
-		pvt->f.subclass = 0;
+		pvt->f.subclass.codec = 0;
 		pvt->f.samples = dahdip->required_samples;
 		pvt->f.data.ptr = NULL;
 		pvt->f.offset = 0;
@@ -340,7 +340,7 @@
 		}
 		pvt->datalen = 0;
 		pvt->f.frametype = AST_FRAME_VOICE;
-		pvt->f.subclass = 1 <<  (pvt->t->dstfmt);
+		pvt->f.subclass.codec = 1 <<  (pvt->t->dstfmt);
 		pvt->f.mallocd = 0;
 		pvt->f.offset = AST_FRIENDLY_OFFSET;
 		pvt->f.src = pvt->t->name;

Modified: team/tilghman/codec_bits3/codecs/ex_adpcm.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/codecs/ex_adpcm.h?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/codecs/ex_adpcm.h (original)
+++ team/tilghman/codec_bits3/codecs/ex_adpcm.h Sun Oct 25 14:13:46 2009
@@ -19,7 +19,7 @@
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_ADPCM,
+		.subclass.codec = AST_FORMAT_ADPCM,
 		.datalen = sizeof(ex_adpcm),
 		.samples = ARRAY_LEN(ex_adpcm) * 2,
 		.mallocd = 0,

Modified: team/tilghman/codec_bits3/codecs/ex_alaw.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/codecs/ex_alaw.h?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/codecs/ex_alaw.h (original)
+++ team/tilghman/codec_bits3/codecs/ex_alaw.h Sun Oct 25 14:13:46 2009
@@ -24,7 +24,7 @@
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_ALAW,
+		.subclass.codec = AST_FORMAT_ALAW,
 		.datalen = sizeof(ex_alaw),
 		.samples = ARRAY_LEN(ex_alaw),
 		.mallocd = 0,

Modified: team/tilghman/codec_bits3/codecs/ex_g722.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/codecs/ex_g722.h?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/codecs/ex_g722.h (original)
+++ team/tilghman/codec_bits3/codecs/ex_g722.h Sun Oct 25 14:13:46 2009
@@ -34,7 +34,7 @@
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_G722,
+		.subclass.codec = AST_FORMAT_G722,
 		.datalen = sizeof(ex_g722),
 		.samples = ARRAY_LEN(ex_g722),
 		.mallocd = 0,

Modified: team/tilghman/codec_bits3/codecs/ex_g726.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/codecs/ex_g726.h?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/codecs/ex_g726.h (original)
+++ team/tilghman/codec_bits3/codecs/ex_g726.h Sun Oct 25 14:13:46 2009
@@ -19,7 +19,7 @@
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_G726,
+		.subclass.codec = AST_FORMAT_G726,
 		.datalen = sizeof(ex_g726),
 		.samples = ARRAY_LEN(ex_g726) * 2, /* 2 samples per byte */
 		.mallocd = 0,

Modified: team/tilghman/codec_bits3/codecs/ex_gsm.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/codecs/ex_gsm.h?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/codecs/ex_gsm.h (original)
+++ team/tilghman/codec_bits3/codecs/ex_gsm.h Sun Oct 25 14:13:46 2009
@@ -18,7 +18,7 @@
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_GSM,
+		.subclass.codec = AST_FORMAT_GSM,
 		.datalen = sizeof(ex_gsm),
 		/* All frames are 20 ms long */
 		.samples = GSM_SAMPLES,

Modified: team/tilghman/codec_bits3/codecs/ex_ilbc.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/codecs/ex_ilbc.h?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/codecs/ex_ilbc.h (original)
+++ team/tilghman/codec_bits3/codecs/ex_ilbc.h Sun Oct 25 14:13:46 2009
@@ -19,7 +19,7 @@
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_ILBC,
+		.subclass.codec = AST_FORMAT_ILBC,
 		.datalen = sizeof(ex_ilbc),
 		/* All frames are 30 ms long */
 		.samples = ILBC_SAMPLES,

Modified: team/tilghman/codec_bits3/codecs/ex_lpc10.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/codecs/ex_lpc10.h?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/codecs/ex_lpc10.h (original)
+++ team/tilghman/codec_bits3/codecs/ex_lpc10.h Sun Oct 25 14:13:46 2009
@@ -15,7 +15,7 @@
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_LPC10,
+		.subclass.codec = AST_FORMAT_LPC10,
 		.datalen = sizeof(ex_lpc10),
 		/* All frames are 22 ms long (maybe a little more -- why did he choose
 		   LPC10_SAMPLES_PER_FRAME sample frames anyway?? */

Modified: team/tilghman/codec_bits3/codecs/ex_speex.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/codecs/ex_speex.h?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/codecs/ex_speex.h (original)
+++ team/tilghman/codec_bits3/codecs/ex_speex.h Sun Oct 25 14:13:46 2009
@@ -18,7 +18,7 @@
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SPEEX,
+		.subclass.codec = AST_FORMAT_SPEEX,
 		.datalen = sizeof(ex_speex),
 		/* All frames are 20 ms long */
 		.samples = SPEEX_SAMPLES,

Modified: team/tilghman/codec_bits3/codecs/ex_ulaw.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/codecs/ex_ulaw.h?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/codecs/ex_ulaw.h (original)
+++ team/tilghman/codec_bits3/codecs/ex_ulaw.h Sun Oct 25 14:13:46 2009
@@ -24,7 +24,7 @@
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_ULAW,
+		.subclass.codec = AST_FORMAT_ULAW,
 		.datalen = sizeof(ex_ulaw),
 		.samples = ARRAY_LEN(ex_ulaw),
 		.mallocd = 0,

Modified: team/tilghman/codec_bits3/formats/format_g723.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_g723.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_g723.c (original)
+++ team/tilghman/codec_bits3/formats/format_g723.c Sun Oct 25 14:13:46 2009
@@ -61,7 +61,7 @@
 	}
 	/* Read the data into the buffer */
 	s->fr.frametype = AST_FRAME_VOICE;
-	s->fr.subclass = AST_FORMAT_G723_1;
+	s->fr.subclass.codec = AST_FORMAT_G723_1;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, size);
 	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != size) {
@@ -82,7 +82,7 @@
 		ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
 		return -1;
 	}
-	if (f->subclass != AST_FORMAT_G723_1) {
+	if (f->subclass.codec != AST_FORMAT_G723_1) {
 		ast_log(LOG_WARNING, "Asked to write non-g723 frame!\n");
 		return -1;
 	}

Modified: team/tilghman/codec_bits3/formats/format_g726.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_g726.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_g726.c (original)
+++ team/tilghman/codec_bits3/formats/format_g726.c Sun Oct 25 14:13:46 2009
@@ -119,7 +119,7 @@
 
 	/* Send a frame from the file to the appropriate channel */
 	s->fr.frametype = AST_FRAME_VOICE;
-	s->fr.subclass = AST_FORMAT_G726;
+	s->fr.subclass.codec = AST_FORMAT_G726;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, frame_size[fs->rate]);
 	s->fr.samples = 8 * FRAME_TIME;
@@ -141,9 +141,9 @@
 		ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
 		return -1;
 	}
-	if (f->subclass != AST_FORMAT_G726) {
-		ast_log(LOG_WARNING, "Asked to write non-G726 frame (%d)!\n", 
-						f->subclass);
+	if (f->subclass.codec != AST_FORMAT_G726) {
+		ast_log(LOG_WARNING, "Asked to write non-G726 frame (%s)!\n", 
+						ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 	if (f->datalen % frame_size[fs->rate]) {

Modified: team/tilghman/codec_bits3/formats/format_g729.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_g729.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_g729.c (original)
+++ team/tilghman/codec_bits3/formats/format_g729.c Sun Oct 25 14:13:46 2009
@@ -46,7 +46,7 @@
 	int res;
 	/* Send a frame from the file to the appropriate channel */
 	s->fr.frametype = AST_FRAME_VOICE;
-	s->fr.subclass = AST_FORMAT_G729A;
+	s->fr.subclass.codec = AST_FORMAT_G729A;
 	s->fr.mallocd = 0;
 	s->fr.samples = G729A_SAMPLES;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
@@ -66,8 +66,8 @@
 		ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
 		return -1;
 	}
-	if (f->subclass != AST_FORMAT_G729A) {
-		ast_log(LOG_WARNING, "Asked to write non-G729 frame (%d)!\n", f->subclass);
+	if (f->subclass.codec != AST_FORMAT_G729A) {
+		ast_log(LOG_WARNING, "Asked to write non-G729 frame (%s)!\n", ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 	if (f->datalen % 10) {

Modified: team/tilghman/codec_bits3/formats/format_gsm.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_gsm.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_gsm.c (original)
+++ team/tilghman/codec_bits3/formats/format_gsm.c Sun Oct 25 14:13:46 2009
@@ -53,7 +53,7 @@
 	int res;
 
 	s->fr.frametype = AST_FRAME_VOICE;
-	s->fr.subclass = AST_FORMAT_GSM;
+	s->fr.subclass.codec = AST_FORMAT_GSM;
 	AST_FRAME_SET_BUFFER(&(s->fr), s->buf, AST_FRIENDLY_OFFSET, GSM_FRAME_SIZE)
 	s->fr.mallocd = 0;
 	if ((res = fread(s->fr.data.ptr, 1, GSM_FRAME_SIZE, s->f)) != GSM_FRAME_SIZE) {
@@ -74,8 +74,8 @@
 		ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
 		return -1;
 	}
-	if (f->subclass != AST_FORMAT_GSM) {
-		ast_log(LOG_WARNING, "Asked to write non-GSM frame (%d)!\n", f->subclass);
+	if (f->subclass.codec != AST_FORMAT_GSM) {
+		ast_log(LOG_WARNING, "Asked to write non-GSM frame (%s)!\n", ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 	if (!(f->datalen % 65)) {

Modified: team/tilghman/codec_bits3/formats/format_h263.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_h263.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_h263.c (original)
+++ team/tilghman/codec_bits3/formats/format_h263.c Sun Oct 25 14:13:46 2009
@@ -64,7 +64,7 @@
 static struct ast_frame *h263_read(struct ast_filestream *s, int *whennext)
 {
 	int res;
-	int mark;
+	format_t mark;
 	unsigned short len;
 	unsigned int ts;
 	struct h263_desc *fs = (struct h263_desc *)s->_private;
@@ -80,7 +80,7 @@
 		return NULL;
 	}
 	s->fr.frametype = AST_FRAME_VIDEO;
-	s->fr.subclass = AST_FORMAT_H263;
+	s->fr.subclass.codec = AST_FORMAT_H263;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, len);
 	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
@@ -90,7 +90,7 @@
 	}
 	s->fr.samples = fs->lastts;	/* XXX what ? */
 	s->fr.datalen = len;
-	s->fr.subclass |= mark;
+	s->fr.subclass.codec |= mark;
 	s->fr.delivery.tv_sec = 0;
 	s->fr.delivery.tv_usec = 0;
 	if ((res = fread(&ts, 1, sizeof(ts), s->f)) == sizeof(ts)) {
@@ -106,18 +106,18 @@
 	int res;
 	unsigned int ts;
 	unsigned short len;
-	int subclass;
-	int mark=0;
+	format_t subclass;
+	format_t mark=0;
 	if (f->frametype != AST_FRAME_VIDEO) {
 		ast_log(LOG_WARNING, "Asked to write non-video frame!\n");
 		return -1;
 	}
-	subclass = f->subclass;
+	subclass = f->subclass.codec;
 	if (subclass & 0x1)
 		mark=0x8000;
 	subclass &= ~0x1;
 	if (subclass != AST_FORMAT_H263) {
-		ast_log(LOG_WARNING, "Asked to write non-h263 frame (%d)!\n", f->subclass);
+		ast_log(LOG_WARNING, "Asked to write non-h263 frame (%s)!\n", ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 	ts = htonl(f->samples);

Modified: team/tilghman/codec_bits3/formats/format_h264.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_h264.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_h264.c (original)
+++ team/tilghman/codec_bits3/formats/format_h264.c Sun Oct 25 14:13:46 2009
@@ -72,7 +72,7 @@
 		len = BUF_SIZE;	/* XXX truncate */
 	}
 	s->fr.frametype = AST_FRAME_VIDEO;
-	s->fr.subclass = AST_FORMAT_H264;
+	s->fr.subclass.codec = AST_FORMAT_H264;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, len);
 	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
@@ -82,7 +82,7 @@
 	}
 	s->fr.samples = fs->lastts;
 	s->fr.datalen = len;
-	s->fr.subclass |= mark;
+	s->fr.subclass.codec |= mark;
 	s->fr.delivery.tv_sec = 0;
 	s->fr.delivery.tv_usec = 0;
 	if ((res = fread(&ts, 1, sizeof(ts), s->f)) == sizeof(ts)) {
@@ -104,9 +104,9 @@
 		ast_log(LOG_WARNING, "Asked to write non-video frame!\n");
 		return -1;
 	}
-	mark = (f->subclass & 0x1) ? 0x8000 : 0;
-	if ((f->subclass & ~0x1) != AST_FORMAT_H264) {
-		ast_log(LOG_WARNING, "Asked to write non-h264 frame (%d)!\n", f->subclass);
+	mark = (f->subclass.codec & 0x1) ? 0x8000 : 0;
+	if ((f->subclass.codec & ~0x1) != AST_FORMAT_H264) {
+		ast_log(LOG_WARNING, "Asked to write non-h264 frame (%s)!\n", ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 	ts = htonl(f->samples);

Modified: team/tilghman/codec_bits3/formats/format_ilbc.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_ilbc.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_ilbc.c (original)
+++ team/tilghman/codec_bits3/formats/format_ilbc.c Sun Oct 25 14:13:46 2009
@@ -45,7 +45,7 @@
 	int res;
 	/* Send a frame from the file to the appropriate channel */
 	s->fr.frametype = AST_FRAME_VOICE;
-	s->fr.subclass = AST_FORMAT_ILBC;
+	s->fr.subclass.codec = AST_FORMAT_ILBC;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, ILBC_BUF_SIZE);
 	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
@@ -64,8 +64,8 @@
 		ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
 		return -1;
 	}
-	if (f->subclass != AST_FORMAT_ILBC) {
-		ast_log(LOG_WARNING, "Asked to write non-iLBC frame (%d)!\n", f->subclass);
+	if (f->subclass.codec != AST_FORMAT_ILBC) {
+		ast_log(LOG_WARNING, "Asked to write non-iLBC frame (%s)!\n", ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 	if (f->datalen % 50) {

Modified: team/tilghman/codec_bits3/formats/format_jpeg.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_jpeg.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_jpeg.c (original)
+++ team/tilghman/codec_bits3/formats/format_jpeg.c Sun Oct 25 14:13:46 2009
@@ -48,7 +48,7 @@
 	}
 	memset(&fr, 0, sizeof(fr));
 	fr.frametype = AST_FRAME_IMAGE;
-	fr.subclass = AST_FORMAT_JPEG;
+	fr.subclass.codec = AST_FORMAT_JPEG;
 	fr.data.ptr = buf;
 	fr.src = "JPEG Read";
 	fr.datalen = len;
@@ -74,7 +74,7 @@
 		ast_log(LOG_WARNING, "Not an image\n");
 		return -1;
 	}
-	if (fr->subclass != AST_FORMAT_JPEG) {
+	if (fr->subclass.codec != AST_FORMAT_JPEG) {
 		ast_log(LOG_WARNING, "Not a jpeg image\n");
 		return -1;
 	}

Modified: team/tilghman/codec_bits3/formats/format_ogg_vorbis.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_ogg_vorbis.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_ogg_vorbis.c (original)
+++ team/tilghman/codec_bits3/formats/format_ogg_vorbis.c Sun Oct 25 14:13:46 2009
@@ -291,9 +291,9 @@
 		ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
 		return -1;
 	}
-	if (f->subclass != AST_FORMAT_SLINEAR) {
-		ast_log(LOG_WARNING, "Asked to write non-SLINEAR frame (%d)!\n",
-				f->subclass);
+	if (f->subclass.codec != AST_FORMAT_SLINEAR) {
+		ast_log(LOG_WARNING, "Asked to write non-SLINEAR frame (%s)!\n",
+			ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 	if (!f->datalen)

Modified: team/tilghman/codec_bits3/formats/format_pcm.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_pcm.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_pcm.c (original)
+++ team/tilghman/codec_bits3/formats/format_pcm.c Sun Oct 25 14:13:46 2009
@@ -80,7 +80,7 @@
 	/* Send a frame from the file to the appropriate channel */
 
 	s->fr.frametype = AST_FRAME_VOICE;
-	s->fr.subclass = s->fmt->format;
+	s->fr.subclass.codec = s->fmt->format;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
 	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) < 1) {
@@ -163,8 +163,8 @@
 		ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
 		return -1;
 	}
-	if (f->subclass != fs->fmt->format) {
-		ast_log(LOG_WARNING, "Asked to write incompatible format frame (%d)!\n", f->subclass);
+	if (f->subclass.codec != fs->fmt->format) {
+		ast_log(LOG_WARNING, "Asked to write incompatible format frame (%s)!\n", ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 

Modified: team/tilghman/codec_bits3/formats/format_siren14.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_siren14.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_siren14.c (original)
+++ team/tilghman/codec_bits3/formats/format_siren14.c Sun Oct 25 14:13:46 2009
@@ -41,7 +41,7 @@
 	/* Send a frame from the file to the appropriate channel */
 
 	s->fr.frametype = AST_FRAME_VOICE;
-	s->fr.subclass = AST_FORMAT_SIREN14;
+	s->fr.subclass.codec = AST_FORMAT_SIREN14;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
 	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
@@ -61,8 +61,8 @@
 		ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
 		return -1;
 	}
-	if (f->subclass != AST_FORMAT_SIREN14) {
-		ast_log(LOG_WARNING, "Asked to write non-Siren14 frame (%d)!\n", f->subclass);
+	if (f->subclass.codec != AST_FORMAT_SIREN14) {
+		ast_log(LOG_WARNING, "Asked to write non-Siren14 frame (%s)!\n", ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 	if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {

Modified: team/tilghman/codec_bits3/formats/format_siren7.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_siren7.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_siren7.c (original)
+++ team/tilghman/codec_bits3/formats/format_siren7.c Sun Oct 25 14:13:46 2009
@@ -41,7 +41,7 @@
 	/* Send a frame from the file to the appropriate channel */
 
 	s->fr.frametype = AST_FRAME_VOICE;
-	s->fr.subclass = AST_FORMAT_SIREN7;
+	s->fr.subclass.codec = AST_FORMAT_SIREN7;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
 	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
@@ -61,8 +61,8 @@
 		ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
 		return -1;
 	}
-	if (f->subclass != AST_FORMAT_SIREN7) {
-		ast_log(LOG_WARNING, "Asked to write non-Siren7 frame (%d)!\n", f->subclass);
+	if (f->subclass.codec != AST_FORMAT_SIREN7) {
+		ast_log(LOG_WARNING, "Asked to write non-Siren7 frame (%s)!\n", ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 	if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {

Modified: team/tilghman/codec_bits3/formats/format_sln.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_sln.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_sln.c (original)
+++ team/tilghman/codec_bits3/formats/format_sln.c Sun Oct 25 14:13:46 2009
@@ -39,7 +39,7 @@
 	/* Send a frame from the file to the appropriate channel */
 
 	s->fr.frametype = AST_FRAME_VOICE;
-	s->fr.subclass = AST_FORMAT_SLINEAR;
+	s->fr.subclass.codec = AST_FORMAT_SLINEAR;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
 	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) < 1) {
@@ -59,8 +59,8 @@
 		ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
 		return -1;
 	}
-	if (f->subclass != AST_FORMAT_SLINEAR) {
-		ast_log(LOG_WARNING, "Asked to write non-slinear frame (%d)!\n", f->subclass);
+	if (f->subclass.codec != AST_FORMAT_SLINEAR) {
+		ast_log(LOG_WARNING, "Asked to write non-slinear frame (%s)!\n", ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 	if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {

Modified: team/tilghman/codec_bits3/formats/format_sln16.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_sln16.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_sln16.c (original)
+++ team/tilghman/codec_bits3/formats/format_sln16.c Sun Oct 25 14:13:46 2009
@@ -40,7 +40,7 @@
 	/* Send a frame from the file to the appropriate channel */
 
 	s->fr.frametype = AST_FRAME_VOICE;
-	s->fr.subclass = AST_FORMAT_SLINEAR16;
+	s->fr.subclass.codec = AST_FORMAT_SLINEAR16;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
 	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) < 1) {
@@ -61,8 +61,8 @@
 		ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
 		return -1;
 	}
-	if (f->subclass != AST_FORMAT_SLINEAR16) {
-		ast_log(LOG_WARNING, "Asked to write non-slinear16 frame (%d)!\n", f->subclass);
+	if (f->subclass.codec != AST_FORMAT_SLINEAR16) {
+		ast_log(LOG_WARNING, "Asked to write non-slinear16 frame (%s)!\n", ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 	if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {

Modified: team/tilghman/codec_bits3/formats/format_vox.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_vox.c?view=diff&rev=225763&r1=225762&r2=225763
==============================================================================
--- team/tilghman/codec_bits3/formats/format_vox.c (original)
+++ team/tilghman/codec_bits3/formats/format_vox.c Sun Oct 25 14:13:46 2009
@@ -41,7 +41,7 @@
 
 	/* Send a frame from the file to the appropriate channel */
 	s->fr.frametype = AST_FRAME_VOICE;
-	s->fr.subclass = AST_FORMAT_ADPCM;
+	s->fr.subclass.codec = AST_FORMAT_ADPCM;
 	s->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
 	if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) < 1) {
@@ -61,8 +61,8 @@
 		ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
 		return -1;
 	}
-	if (f->subclass != AST_FORMAT_ADPCM) {
-		ast_log(LOG_WARNING, "Asked to write non-ADPCM frame (%d)!\n", f->subclass);
+	if (f->subclass.codec != AST_FORMAT_ADPCM) {
+		ast_log(LOG_WARNING, "Asked to write non-ADPCM frame (%s)!\n", ast_getformatname(f->subclass.codec));
 		return -1;
 	}
 	if ((res = fwrite(f->data.ptr, 1, f->datalen, s->f)) != f->datalen) {

Modified: team/tilghman/codec_bits3/formats/format_wav.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/formats/format_wav.c?view=diff&rev=225763&r1=225762&r2=225763

[... 170 lines stripped ...]



More information about the asterisk-commits mailing list