[svn-commits] tilghman: branch tilghman/codec_bits3 r226186 - in /team/tilghman/codec_bits3...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Oct 27 16:15:54 CDT 2009


Author: tilghman
Date: Tue Oct 27 16:15:49 2009
New Revision: 226186

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=226186
Log:
More libraries that I did not have on my laptop.

Modified:
    team/tilghman/codec_bits3/apps/app_dahdibarge.c
    team/tilghman/codec_bits3/apps/app_fax.c
    team/tilghman/codec_bits3/apps/app_meetme.c
    team/tilghman/codec_bits3/channels/chan_alsa.c
    team/tilghman/codec_bits3/channels/chan_console.c
    team/tilghman/codec_bits3/channels/chan_dahdi.c
    team/tilghman/codec_bits3/channels/chan_gtalk.c
    team/tilghman/codec_bits3/channels/chan_jingle.c
    team/tilghman/codec_bits3/channels/chan_misdn.c
    team/tilghman/codec_bits3/channels/chan_vpb.cc
    team/tilghman/codec_bits3/channels/sig_analog.c
    team/tilghman/codec_bits3/channels/sig_pri.c
    team/tilghman/codec_bits3/formats/format_ogg_vorbis.c

Modified: team/tilghman/codec_bits3/apps/app_dahdibarge.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_dahdibarge.c?view=diff&rev=226186&r1=226185&r2=226186
==============================================================================
--- team/tilghman/codec_bits3/apps/app_dahdibarge.c (original)
+++ team/tilghman/codec_bits3/apps/app_dahdibarge.c Tue Oct 27 16:15:49 2009
@@ -208,17 +208,17 @@
 			f = ast_read(c);
 			if (!f) 
 				break;
-			if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#')) {
+			if ((f->frametype == AST_FRAME_DTMF) && (f->subclass.integer == '#')) {
 				ret = 0;
 				ast_frfree(f);
 				break;
 			} else if (fd != chan->fds[0]) {
 				if (f->frametype == AST_FRAME_VOICE) {
-					if (f->subclass == AST_FORMAT_ULAW) {
+					if (f->subclass.codec == AST_FORMAT_ULAW) {
 						/* Carefully write */
 						careful_write(fd, f->data.ptr, f->datalen);
 					} else
-						ast_log(LOG_WARNING, "Huh?  Got a non-ulaw (%d) frame in the conference\n", f->subclass);
+						ast_log(LOG_WARNING, "Huh?  Got a non-ulaw (%s) frame in the conference\n", ast_getformatname(f->subclass.codec));
 				}
 			}
 			ast_frfree(f);
@@ -227,7 +227,7 @@
 			if (res > 0) {
 				memset(&fr, 0, sizeof(fr));
 				fr.frametype = AST_FRAME_VOICE;
-				fr.subclass = AST_FORMAT_ULAW;
+				fr.subclass.codec = AST_FORMAT_ULAW;
 				fr.datalen = res;
 				fr.samples = res;
 				fr.data.ptr = buf;

Modified: team/tilghman/codec_bits3/apps/app_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_fax.c?view=diff&rev=226186&r1=226185&r2=226186
==============================================================================
--- team/tilghman/codec_bits3/apps/app_fax.c (original)
+++ team/tilghman/codec_bits3/apps/app_fax.c Tue Oct 27 16:15:49 2009
@@ -180,7 +180,7 @@
 
 	struct ast_frame outf = {
 		.frametype = AST_FRAME_MODEM,
-		.subclass = AST_MODEM_T38,
+		.subclass.integer = AST_MODEM_T38,
 		.src = __FUNCTION__,
 	};
 
@@ -327,7 +327,7 @@
     
 	struct ast_frame outf = {
 		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SLINEAR,
+		.subclass.codec = AST_FORMAT_SLINEAR,
 		.src = __FUNCTION__,
 	};
 
@@ -413,7 +413,7 @@
 					return -1;
 				}
 				if ((inf->frametype == AST_FRAME_CONTROL) &&
-				    (inf->subclass == AST_CONTROL_T38_PARAMETERS) &&
+				    (inf->subclass.integer == AST_CONTROL_T38_PARAMETERS) &&
 				    (inf->datalen == sizeof(t38_parameters))) {
 					struct ast_control_t38_parameters *parameters = inf->data.ptr;
 					
@@ -517,12 +517,12 @@
 			break;
 		}
 
-		ast_debug(10, "frame %d/%d, len=%d\n", inf->frametype, inf->subclass, inf->datalen);
+		ast_debug(10, "frame %d/%llu, len=%d\n", inf->frametype, (unsigned long long) inf->subclass.codec, inf->datalen);
 
 		/* Check the frame type. Format also must be checked because there is a chance
 		   that a frame in old format was already queued before we set channel format
 		   to slinear so it will still be received by ast_read */
-		if (inf->frametype == AST_FRAME_VOICE && inf->subclass == AST_FORMAT_SLINEAR) {
+		if (inf->frametype == AST_FRAME_VOICE && inf->subclass.codec == AST_FORMAT_SLINEAR) {
 			if (fax_rx(&fax, inf->data.ptr, inf->samples) < 0) {
 				/* I know fax_rx never returns errors. The check here is for good style only */
 				ast_log(LOG_WARNING, "fax_rx returned error\n");
@@ -534,7 +534,7 @@
 				last_state = t30state->state;
 			}
 		} else if ((inf->frametype == AST_FRAME_CONTROL) &&
-			   (inf->subclass == AST_CONTROL_T38_PARAMETERS)) {
+			   (inf->subclass.integer == AST_CONTROL_T38_PARAMETERS)) {
 			struct ast_control_t38_parameters *parameters = inf->data.ptr;
 
 			if (parameters->request_response == AST_T38_NEGOTIATED) {
@@ -678,15 +678,15 @@
 			break;
 		}
 
-		ast_debug(10, "frame %d/%d, len=%d\n", inf->frametype, inf->subclass, inf->datalen);
-
-		if (inf->frametype == AST_FRAME_MODEM && inf->subclass == AST_MODEM_T38) {
+		ast_debug(10, "frame %d/%d, len=%d\n", inf->frametype, inf->subclass.integer, inf->datalen);
+
+		if (inf->frametype == AST_FRAME_MODEM && inf->subclass.integer == AST_MODEM_T38) {
 			t38_core_rx_ifp_packet(t38state, inf->data.ptr, inf->datalen, inf->seqno);
 			if (last_state != t30state->state) {
 				state_change = ast_tvnow();
 				last_state = t30state->state;
 			}
-		} else if (inf->frametype == AST_FRAME_CONTROL && inf->subclass == AST_CONTROL_T38_PARAMETERS) {
+		} else if (inf->frametype == AST_FRAME_CONTROL && inf->subclass.integer == AST_CONTROL_T38_PARAMETERS) {
 			struct ast_control_t38_parameters *parameters = inf->data.ptr;
 			if (parameters->request_response == AST_T38_TERMINATED) {
 				ast_debug(1, "T38 down, finishing\n");
@@ -733,7 +733,7 @@
 					return -1;
 				}
 				if ((inf->frametype == AST_FRAME_CONTROL) &&
-				    (inf->subclass == AST_CONTROL_T38_PARAMETERS) &&
+				    (inf->subclass.integer == AST_CONTROL_T38_PARAMETERS) &&
 				    (inf->datalen == sizeof(t38_parameters))) {
 					struct ast_control_t38_parameters *parameters = inf->data.ptr;
 					

Modified: team/tilghman/codec_bits3/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/apps/app_meetme.c?view=diff&rev=226186&r1=226185&r2=226186
==============================================================================
--- team/tilghman/codec_bits3/apps/app_meetme.c (original)
+++ team/tilghman/codec_bits3/apps/app_meetme.c Tue Oct 27 16:15:49 2009
@@ -2931,11 +2931,11 @@
 					break;
 				}
 				if (f->frametype == AST_FRAME_DTMF) {
-					dtmfstr[0] = f->subclass;
+					dtmfstr[0] = f->subclass.integer;
 					dtmfstr[1] = '\0';
 				}
 
-				if ((f->frametype == AST_FRAME_VOICE) && (f->subclass == AST_FORMAT_SLINEAR)) {
+				if ((f->frametype == AST_FRAME_VOICE) && (f->subclass.codec == AST_FORMAT_SLINEAR)) {
 					if (user->talk.actual) {
 						ast_frame_adjust_volume(f, user->talk.actual);
 					}
@@ -2987,7 +2987,7 @@
 							careful_write(fd, f->data.ptr, f->datalen, 0);
 						}
 					}
-				} else if (((f->frametype == AST_FRAME_DTMF) && (f->subclass == '*') && (confflags & CONFFLAG_STARMENU)) || ((f->frametype == AST_FRAME_DTMF) && menu_active)) {
+				} else if (((f->frametype == AST_FRAME_DTMF) && (f->subclass.integer == '*') && (confflags & CONFFLAG_STARMENU)) || ((f->frametype == AST_FRAME_DTMF) && menu_active)) {
 					if (confflags & CONFFLAG_PASS_DTMF) {
 						conf_queue_dtmf(conf, user, f);
 					}
@@ -3020,7 +3020,7 @@
 								dtmf = 0;
 							}
 						} else {
-							dtmf = f->subclass;
+							dtmf = f->subclass.integer;
 						}
 						if (dtmf) {
 							switch(dtmf) {
@@ -3121,7 +3121,7 @@
 								dtmf = 0;
 							}
 						} else {
-							dtmf = f->subclass;
+							dtmf = f->subclass.integer;
 						}
 						if (dtmf) {
 							switch (dtmf) {
@@ -3211,7 +3211,7 @@
 					} else {
 						ast_debug(2, "Exit by single digit did not work in meetme. Extension %s does not exist in context %s\n", dtmfstr, exitcontext);
 					}
-				} else if ((f->frametype == AST_FRAME_DTMF) && (confflags & CONFFLAG_KEYEXIT) && (strchr(exitkeys, f->subclass))) {
+				} else if ((f->frametype == AST_FRAME_DTMF) && (confflags & CONFFLAG_KEYEXIT) && (strchr(exitkeys, f->subclass.integer))) {
 					pbx_builtin_setvar_helper(chan, "MEETME_EXIT_KEY", dtmfstr);
 						
 					if (confflags & CONFFLAG_PASS_DTMF) {
@@ -3224,7 +3224,7 @@
 					&& confflags & CONFFLAG_PASS_DTMF) {
 					conf_queue_dtmf(conf, user, f);
 				} else if ((confflags & CONFFLAG_SLA_STATION) && f->frametype == AST_FRAME_CONTROL) {
-					switch (f->subclass) {
+					switch (f->subclass.integer) {
 					case AST_CONTROL_HOLD:
 						sla_queue_event_conf(SLA_EVENT_HOLD, chan, conf);
 						break;
@@ -3236,7 +3236,7 @@
 				} else {
 					ast_debug(1, 
 						"Got unrecognized frame on channel %s, f->frametype=%d,f->subclass=%d\n",
-						chan->name, f->frametype, f->subclass);
+						chan->name, f->frametype, f->subclass.integer);
 				}
 				ast_frfree(f);
 			} else if (outfd > -1) {
@@ -3244,7 +3244,7 @@
 				if (res > 0) {
 					memset(&fr, 0, sizeof(fr));
 					fr.frametype = AST_FRAME_VOICE;
-					fr.subclass = AST_FORMAT_SLINEAR;
+					fr.subclass.codec = AST_FORMAT_SLINEAR;
 					fr.datalen = res;
 					fr.samples = res / 2;
 					fr.data.ptr = buf;

Modified: team/tilghman/codec_bits3/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/channels/chan_alsa.c?view=diff&rev=226186&r1=226185&r2=226186
==============================================================================
--- team/tilghman/codec_bits3/channels/chan_alsa.c (original)
+++ team/tilghman/codec_bits3/channels/chan_alsa.c Tue Oct 27 16:15:49 2009
@@ -312,7 +312,7 @@
 		ast_verbose(" << Auto-answered >> \n");
 		grab_owner();
 		if (alsa.owner) {
-			f.subclass = AST_CONTROL_ANSWER;
+			f.subclass.integer = AST_CONTROL_ANSWER;
 			ast_queue_frame(alsa.owner, &f);
 			ast_channel_unlock(alsa.owner);
 		}
@@ -320,7 +320,7 @@
 		ast_verbose(" << Type 'answer' to answer, or use 'autoanswer' for future calls >> \n");
 		grab_owner();
 		if (alsa.owner) {
-			f.subclass = AST_CONTROL_RINGING;
+			f.subclass.integer = AST_CONTROL_RINGING;
 			ast_queue_frame(alsa.owner, &f);
 			ast_channel_unlock(alsa.owner);
 			ast_indicate(alsa.owner, AST_CONTROL_RINGING);
@@ -426,7 +426,7 @@
 
 	ast_mutex_lock(&alsalock);
 	f.frametype = AST_FRAME_NULL;
-	f.subclass = 0;
+	f.subclass.integer = 0;
 	f.samples = 0;
 	f.datalen = 0;
 	f.data.ptr = NULL;
@@ -471,7 +471,7 @@
 			return &f;
 		}
 		f.frametype = AST_FRAME_VOICE;
-		f.subclass = AST_FORMAT_SLINEAR;
+		f.subclass.codec = AST_FORMAT_SLINEAR;
 		f.samples = FRAME_SIZE;
 		f.datalen = FRAME_SIZE * 2;
 		f.data.ptr = buf;
@@ -670,9 +670,7 @@
 		hookstate = 1;
 		grab_owner();
 		if (alsa.owner) {
-			struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_ANSWER };
-
-			ast_queue_frame(alsa.owner, &f);
+			ast_queue_control(alsa.owner, AST_CONTROL_ANSWER);
 			ast_channel_unlock(alsa.owner);
 		}
 	}
@@ -710,7 +708,7 @@
 		ast_cli(a->fd, "No channel active\n");
 		res = CLI_FAILURE;
 	} else {
-		struct ast_frame f = { AST_FRAME_TEXT, 0 };
+		struct ast_frame f = { AST_FRAME_TEXT };
 		char text2send[256] = "";
 
 		while (tmparg < a->argc) {
@@ -724,11 +722,7 @@
 		grab_owner();
 		if (alsa.owner) {
 			ast_queue_frame(alsa.owner, &f);
-			f.frametype = AST_FRAME_CONTROL;
-			f.subclass = AST_CONTROL_ANSWER;
-			f.data.ptr = NULL;
-			f.datalen = 0;
-			ast_queue_frame(alsa.owner, &f);
+			ast_queue_control(alsa.owner, AST_CONTROL_ANSWER);
 			ast_channel_unlock(alsa.owner);
 		}
 	}
@@ -803,7 +797,7 @@
 		if (a->argc == 3) {
 			if (alsa.owner) {
 				for (d = a->argv[2]; *d; d++) {
-					struct ast_frame f = { .frametype = AST_FRAME_DTMF, .subclass = *d };
+					struct ast_frame f = { .frametype = AST_FRAME_DTMF, .subclass.integer = *d };
 
 					ast_queue_frame(alsa.owner, &f);
 				}

Modified: team/tilghman/codec_bits3/channels/chan_console.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/channels/chan_console.c?view=diff&rev=226186&r1=226185&r2=226186
==============================================================================
--- team/tilghman/codec_bits3/channels/chan_console.c (original)
+++ team/tilghman/codec_bits3/channels/chan_console.c Tue Oct 27 16:15:49 2009
@@ -264,7 +264,7 @@
 	PaError res;
 	struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_SLINEAR16,
+		.subclass.codec = AST_FORMAT_SLINEAR16,
 		.src = "console_stream_monitor",
 		.data.ptr = buf,
 		.datalen = sizeof(buf),
@@ -554,8 +554,8 @@
 
 static int console_call(struct ast_channel *c, char *dest, int timeout)
 {
-	struct ast_frame f = { 0, };
 	struct console_pvt *pvt = c->tech_pvt;
+	enum ast_control_frame_type ctrl;
 
 	ast_verb(1, V_BEGIN "Call to device '%s' on console from '%s' <%s>" V_END,
 		dest, c->cid.cid_name, c->cid.cid_num);
@@ -566,18 +566,16 @@
 		pvt->hookstate = 1;
 		console_pvt_unlock(pvt);
 		ast_verb(1, V_BEGIN "Auto-answered" V_END);
-		f.frametype = AST_FRAME_CONTROL;
-		f.subclass = AST_CONTROL_ANSWER;
+		ctrl = AST_CONTROL_ANSWER;
 	} else {
 		console_pvt_unlock(pvt);
 		ast_verb(1, V_BEGIN "Type 'console answer' to answer, or use the 'autoanswer' option "
 				"for future calls" V_END);
-		f.frametype = AST_FRAME_CONTROL;
-		f.subclass = AST_CONTROL_RINGING;
+		ctrl = AST_CONTROL_RINGING;
 		ast_indicate(c, AST_CONTROL_RINGING);
 	}
 
-	ast_queue_frame(c, &f);
+	ast_queue_control(c, ctrl);
 
 	return start_stream(pvt);
 }
@@ -730,7 +728,6 @@
 
 static char *cli_console_flash(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-	struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_FLASH };
 	struct console_pvt *pvt = get_active_pvt();
 
 	if (cmd == CLI_INIT) {
@@ -758,7 +755,7 @@
 
 	pvt->hookstate = 0;
 
-	ast_queue_frame(pvt->owner, &f);
+	ast_queue_control(pvt->owner, AST_CONTROL_FLASH);
 
 	unref_pvt(pvt);
 
@@ -790,7 +787,7 @@
 
 	if (pvt->owner) {	/* already in a call */
 		int i;
-		struct ast_frame f = { AST_FRAME_DTMF, 0 };
+		struct ast_frame f = { AST_FRAME_DTMF };
 		const char *s;
 
 		if (a->argc == e->args) {	/* argument is mandatory here */
@@ -801,7 +798,7 @@
 		s = a->argv[e->args];
 		/* send the string one char at a time */
 		for (i = 0; i < strlen(s); i++) {
-			f.subclass = s[i];
+			f.subclass.integer = s[i];
 			ast_queue_frame(pvt->owner, &f);
 		}
 		unref_pvt(pvt);
@@ -1025,7 +1022,6 @@
  */
 static char *cli_console_answer(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-	struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_ANSWER };
 	struct console_pvt *pvt = get_active_pvt();
 
 	switch (cmd) {
@@ -1060,7 +1056,7 @@
 
 	ast_indicate(pvt->owner, -1);
 
-	ast_queue_frame(pvt->owner, &f);
+	ast_queue_control(pvt->owner, AST_CONTROL_ANSWER);
 
 	unref_pvt(pvt);
 

Modified: team/tilghman/codec_bits3/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/channels/chan_dahdi.c?view=diff&rev=226186&r1=226185&r2=226186
==============================================================================
--- team/tilghman/codec_bits3/channels/chan_dahdi.c (original)
+++ team/tilghman/codec_bits3/channels/chan_dahdi.c Tue Oct 27 16:15:49 2009
@@ -1949,9 +1949,9 @@
 	struct dahdi_pvt *p = pvt;
 	int idx = analogsub_to_dahdisub(analog_index);
 
-	ast_debug(1, "DTMF digit: %c on %s\n", (int) f->subclass, ast->name);
-
-	if (f->subclass == 'f') {
+	ast_debug(1, "DTMF digit: %c on %s\n", f->subclass.integer, ast->name);
+
+	if (f->subclass.integer == 'f') {
 		/* Fax tone -- Handle and return NULL */
 		if ((p->callprogress & CALLPROGRESS_FAX) && !p->faxhandled) {
 			/* If faxbuffers are configured, use them for the fax transmission */
@@ -2000,7 +2000,7 @@
 		}
 		dahdi_confmute(p, 0);
 		p->subs[idx].f.frametype = AST_FRAME_NULL;
-		p->subs[idx].f.subclass = 0;
+		p->subs[idx].f.subclass.integer = 0;
 		*dest = &p->subs[idx].f;
 	}
 }
@@ -5333,7 +5333,7 @@
 			res = -1;
 			break;
 		}
-		if (f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_HANGUP) {
+		if (f->frametype == AST_FRAME_CONTROL && f->subclass.integer == AST_CONTROL_HANGUP) {
 			ast_log(LOG_DEBUG, "Got HANGUP frame on channel %s, going out ...\n", chan->name);
 			ast_frfree(f);
 			res = -1;
@@ -6852,19 +6852,19 @@
 	struct dahdi_pvt *p = ast->tech_pvt;
 	struct ast_frame *f = *dest;
 
-	ast_debug(1, "DTMF digit: %c on %s\n", (int) f->subclass, ast->name);
+	ast_debug(1, "DTMF digit: %c on %s\n", (int) f->subclass.integer, ast->name);
 
 	if (p->confirmanswer) {
 		ast_debug(1, "Confirm answer on %s!\n", ast->name);
 		/* Upon receiving a DTMF digit, consider this an answer confirmation instead
 		   of a DTMF digit */
 		p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-		p->subs[idx].f.subclass = AST_CONTROL_ANSWER;
+		p->subs[idx].f.subclass.integer = AST_CONTROL_ANSWER;
 		*dest = &p->subs[idx].f;
 		/* Reset confirmanswer so DTMF's will behave properly for the duration of the call */
 		p->confirmanswer = 0;
 	} else if (p->callwaitcas) {
-		if ((f->subclass == 'A') || (f->subclass == 'D')) {
+		if ((f->subclass.integer == 'A') || (f->subclass.integer == 'D')) {
 			ast_debug(1, "Got some DTMF, but it's for the CAS\n");
 			if (p->cidspill)
 				ast_free(p->cidspill);
@@ -6872,9 +6872,9 @@
 		}
 		p->callwaitcas = 0;
 		p->subs[idx].f.frametype = AST_FRAME_NULL;
-		p->subs[idx].f.subclass = 0;
+		p->subs[idx].f.subclass.integer = 0;
 		*dest = &p->subs[idx].f;
-	} else if (f->subclass == 'f') {
+	} else if (f->subclass.integer == 'f') {
 		/* Fax tone -- Handle and return NULL */
 		if ((p->callprogress & CALLPROGRESS_FAX) && !p->faxhandled) {
 			/* If faxbuffers are configured, use them for the fax transmission */
@@ -6927,7 +6927,7 @@
 		}
 		dahdi_confmute(p, 0);
 		p->subs[idx].f.frametype = AST_FRAME_NULL;
-		p->subs[idx].f.subclass = 0;
+		p->subs[idx].f.subclass.integer = 0;
 		*dest = &p->subs[idx].f;
 	}
 }
@@ -6958,7 +6958,7 @@
 	if (p->outsigmod > -1)
 		mysig = p->outsigmod;
 	p->subs[idx].f.frametype = AST_FRAME_NULL;
-	p->subs[idx].f.subclass = 0;
+	p->subs[idx].f.subclass.integer = 0;
 	p->subs[idx].f.datalen = 0;
 	p->subs[idx].f.samples = 0;
 	p->subs[idx].f.mallocd = 0;
@@ -6990,7 +6990,7 @@
 #endif
 			dahdi_confmute(p, 0);
 			p->subs[idx].f.frametype = AST_FRAME_DTMF_END;
-			p->subs[idx].f.subclass = res & 0xff;
+			p->subs[idx].f.subclass.integer = res & 0xff;
 #ifdef HAVE_PRI
 		}
 #endif
@@ -7003,7 +7003,7 @@
 		/* Mute conference */
 		dahdi_confmute(p, 1);
 		p->subs[idx].f.frametype = AST_FRAME_DTMF_BEGIN;
-		p->subs[idx].f.subclass = res & 0xff;
+		p->subs[idx].f.subclass.integer = res & 0xff;
 		return &p->subs[idx].f;
 	}
 
@@ -7071,7 +7071,7 @@
 					if (ast->_state == AST_STATE_DIALING_OFFHOOK) {
 						ast_setstate(ast, AST_STATE_UP);
 						p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-						p->subs[idx].f.subclass = AST_CONTROL_ANSWER;
+						p->subs[idx].f.subclass.integer = AST_CONTROL_ANSWER;
 						break;
 					} else { /* if to state wait for offhook to dial rest */
 						/* we now wait for off hook */
@@ -7094,7 +7094,7 @@
 					} else if (!p->answeronpolarityswitch) {
 						ast_setstate(ast, AST_STATE_UP);
 						p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-						p->subs[idx].f.subclass = AST_CONTROL_ANSWER;
+						p->subs[idx].f.subclass.integer = AST_CONTROL_ANSWER;
 						/* If aops=0 and hops=1, this is necessary */
 						p->polarity = POLARITY_REV;
 					} else {
@@ -7136,7 +7136,7 @@
 	case DAHDI_EVENT_ONHOOK:
 		if (p->radio) {
 			p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-			p->subs[idx].f.subclass = AST_CONTROL_RADIO_UNKEY;
+			p->subs[idx].f.subclass.integer = AST_CONTROL_RADIO_UNKEY;
 			break;
 		}
 		if (p->oprmode < 0)
@@ -7270,7 +7270,7 @@
 		if (p->radio)
 		{
 			p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-			p->subs[idx].f.subclass = AST_CONTROL_RADIO_KEY;
+			p->subs[idx].f.subclass.integer = AST_CONTROL_RADIO_KEY;
 			break;
  		}
 		/* for E911, its supposed to wait for offhook then dial
@@ -7311,7 +7311,7 @@
 				dahdi_enable_ec(p);
 				dahdi_train_ec(p);
 				p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-				p->subs[idx].f.subclass = AST_CONTROL_ANSWER;
+				p->subs[idx].f.subclass.integer = AST_CONTROL_ANSWER;
 				/* Make sure it stops ringing */
 				dahdi_set_hook(p->subs[idx].dfd, DAHDI_OFFHOOK);
 				ast_debug(1, "channel %d answered\n", p->channel);
@@ -7325,7 +7325,7 @@
 				if (p->confirmanswer) {
 					/* Ignore answer if "confirm answer" is enabled */
 					p->subs[idx].f.frametype = AST_FRAME_NULL;
-					p->subs[idx].f.subclass = 0;
+					p->subs[idx].f.subclass.integer = 0;
 				} else if (!ast_strlen_zero(p->dop.dialstr)) {
 					/* nick at dccinc.com 4/3/03 - fxo should be able to do deferred dialing */
 					res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_DIAL, &p->dop);
@@ -7336,7 +7336,7 @@
 					} else {
 						ast_debug(1, "Sent FXO deferred digit string: %s\n", p->dop.dialstr);
 						p->subs[idx].f.frametype = AST_FRAME_NULL;
-						p->subs[idx].f.subclass = 0;
+						p->subs[idx].f.subclass.integer = 0;
 						p->dialing = 1;
 					}
 					p->dop.dialstr[0] = '\0';
@@ -7348,7 +7348,7 @@
 				ast_setstate(ast, AST_STATE_RING);
 				ast->rings = 1;
 				p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-				p->subs[idx].f.subclass = AST_CONTROL_OFFHOOK;
+				p->subs[idx].f.subclass.integer = AST_CONTROL_OFFHOOK;
 				ast_debug(1, "channel %d picked up\n", p->channel);
 				return &p->subs[idx].f;
 			case AST_STATE_UP:
@@ -7405,15 +7405,15 @@
 			if ((ast->_state == AST_STATE_DOWN) || (ast->_state == AST_STATE_RING)) {
 				ast_debug(1, "Ring detected\n");
 				p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-				p->subs[idx].f.subclass = AST_CONTROL_RING;
+				p->subs[idx].f.subclass.integer = AST_CONTROL_RING;
 			} else if (p->outgoing && ((ast->_state == AST_STATE_RINGING) || (ast->_state == AST_STATE_DIALING))) {
 				ast_debug(1, "Line answered\n");
 				if (p->confirmanswer) {
 					p->subs[idx].f.frametype = AST_FRAME_NULL;
-					p->subs[idx].f.subclass = 0;
+					p->subs[idx].f.subclass.integer = 0;
 				} else {
 					p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-					p->subs[idx].f.subclass = AST_CONTROL_ANSWER;
+					p->subs[idx].f.subclass.integer = AST_CONTROL_ANSWER;
 					ast_setstate(ast, AST_STATE_UP);
 				}
 			} else if (ast->_state != AST_STATE_RING)
@@ -7811,7 +7811,7 @@
 	p->subs[idx].f.samples = 0;
 	p->subs[idx].f.mallocd = 0;
 	p->subs[idx].f.offset = 0;
-	p->subs[idx].f.subclass = 0;
+	p->subs[idx].f.subclass.integer = 0;
 	p->subs[idx].f.delivery = ast_tv(0,0);
 	p->subs[idx].f.src = "dahdi_exception";
 	p->subs[idx].f.data.ptr = NULL;
@@ -7953,7 +7953,7 @@
 	p->subs[idx].f.samples = 0;
 	p->subs[idx].f.mallocd = 0;
 	p->subs[idx].f.offset = 0;
-	p->subs[idx].f.subclass = 0;
+	p->subs[idx].f.subclass.integer = 0;
 	p->subs[idx].f.delivery = ast_tv(0,0);
 	p->subs[idx].f.src = "dahdi_read";
 	p->subs[idx].f.data.ptr = NULL;
@@ -7973,11 +7973,11 @@
 		p->subs[idx].f.frametype = AST_FRAME_CONTROL;
 		if (ps.rxisoffhook)
 		{
-			p->subs[idx].f.subclass = AST_CONTROL_RADIO_KEY;
+			p->subs[idx].f.subclass.integer = AST_CONTROL_RADIO_KEY;
 		}
 		else
 		{
-			p->subs[idx].f.subclass = AST_CONTROL_RADIO_UNKEY;
+			p->subs[idx].f.subclass.integer = AST_CONTROL_RADIO_UNKEY;
 		}
 		ast_mutex_unlock(&p->lock);
 		return &p->subs[idx].f;
@@ -7999,7 +7999,7 @@
 		/* Send ringing frame if requested */
 		p->subs[idx].needringing = 0;
 		p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-		p->subs[idx].f.subclass = AST_CONTROL_RINGING;
+		p->subs[idx].f.subclass.integer = AST_CONTROL_RINGING;
 		ast_setstate(ast, AST_STATE_RINGING);
 		ast_mutex_unlock(&p->lock);
 		return &p->subs[idx].f;
@@ -8009,7 +8009,7 @@
 		/* Send busy frame if requested */
 		p->subs[idx].needbusy = 0;
 		p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-		p->subs[idx].f.subclass = AST_CONTROL_BUSY;
+		p->subs[idx].f.subclass.integer = AST_CONTROL_BUSY;
 		ast_mutex_unlock(&p->lock);
 		return &p->subs[idx].f;
 	}
@@ -8018,7 +8018,7 @@
 		/* Send congestion frame if requested */
 		p->subs[idx].needcongestion = 0;
 		p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-		p->subs[idx].f.subclass = AST_CONTROL_CONGESTION;
+		p->subs[idx].f.subclass.integer = AST_CONTROL_CONGESTION;
 		ast_mutex_unlock(&p->lock);
 		return &p->subs[idx].f;
 	}
@@ -8027,7 +8027,7 @@
 		/* Send answer frame if requested */
 		p->subs[idx].needanswer = 0;
 		p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-		p->subs[idx].f.subclass = AST_CONTROL_ANSWER;
+		p->subs[idx].f.subclass.integer = AST_CONTROL_ANSWER;
 		ast_mutex_unlock(&p->lock);
 		return &p->subs[idx].f;
 	}
@@ -8046,7 +8046,7 @@
 		/* Send answer frame if requested */
 		p->subs[idx].needflash = 0;
 		p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-		p->subs[idx].f.subclass = AST_CONTROL_FLASH;
+		p->subs[idx].f.subclass.integer = AST_CONTROL_FLASH;
 		ast_mutex_unlock(&p->lock);
 		return &p->subs[idx].f;
 	}
@@ -8055,7 +8055,7 @@
 		/* Send answer frame if requested */
 		p->subs[idx].needhold = 0;
 		p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-		p->subs[idx].f.subclass = AST_CONTROL_HOLD;
+		p->subs[idx].f.subclass.integer = AST_CONTROL_HOLD;
 		ast_mutex_unlock(&p->lock);
 		ast_debug(1, "Sending hold on '%s'\n", ast->name);
 		return &p->subs[idx].f;
@@ -8065,7 +8065,7 @@
 		/* Send answer frame if requested */
 		p->subs[idx].needunhold = 0;
 		p->subs[idx].f.frametype = AST_FRAME_CONTROL;
-		p->subs[idx].f.subclass = AST_CONTROL_UNHOLD;
+		p->subs[idx].f.subclass.integer = AST_CONTROL_UNHOLD;
 		ast_mutex_unlock(&p->lock);
 		ast_debug(1, "Sending unhold on '%s'\n", ast->name);
 		return &p->subs[idx].f;
@@ -8137,7 +8137,7 @@
 			return NULL;
 		}
 		if (c) { /* if a char to return */
-			p->subs[idx].f.subclass = 0;
+			p->subs[idx].f.subclass.integer = 0;
 			p->subs[idx].f.frametype = AST_FRAME_TEXT;
 			p->subs[idx].f.mallocd = 0;
 			p->subs[idx].f.offset = AST_FRIENDLY_OFFSET;
@@ -8175,7 +8175,7 @@
 	}
 
 	p->subs[idx].f.frametype = AST_FRAME_VOICE;
-	p->subs[idx].f.subclass = ast->rawreadformat;
+	p->subs[idx].f.subclass.codec = ast->rawreadformat;
 	p->subs[idx].f.samples = READ_SIZE;
 	p->subs[idx].f.mallocd = 0;
 	p->subs[idx].f.offset = AST_FRIENDLY_OFFSET;
@@ -8190,7 +8190,7 @@
 		/* Whoops, we're still dialing, or in a state where we shouldn't transmit....
 		   don't send anything */
 		p->subs[idx].f.frametype = AST_FRAME_NULL;
-		p->subs[idx].f.subclass = 0;
+		p->subs[idx].f.subclass.integer = 0;
 		p->subs[idx].f.samples = 0;
 		p->subs[idx].f.mallocd = 0;
 		p->subs[idx].f.offset = 0;
@@ -8211,7 +8211,7 @@
 		}
 
 		if (f) {
-			if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_BUSY)) {
+			if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass.integer == AST_CONTROL_BUSY)) {
 				if ((ast->_state == AST_STATE_UP) && !p->outgoing) {
 					/* Treat this as a "hangup" instead of a "busy" on the assumption that
 					   a busy */
@@ -8226,7 +8226,7 @@
 						|| (p->outgoing && (p->pri->overlapdial & DAHDI_OVERLAPDIAL_OUTGOING)))) {
 					/* Don't accept in-band DTMF when in overlap dial mode */
 					f->frametype = AST_FRAME_NULL;
-					f->subclass = 0;
+					f->subclass.integer = 0;
 				}
 #endif
 				/* DSP clears us of being pulse */
@@ -8238,7 +8238,7 @@
 					f=NULL;
 				} else if (f->frametype == AST_FRAME_VOICE) {
 					f->frametype = AST_FRAME_NULL;
-					f->subclass = 0;
+					f->subclass.integer = 0;
 					if ((ast_dsp_get_tstate(p->dsp) == DSP_TONE_STATE_DIALTONE || ast_dsp_get_tstate(p->dsp) == DSP_TONE_STATE_RINGING) && ast_dsp_get_tcount(p->dsp) > 9) {
 						p->waitingfordt.tv_sec = 0;
 						p->dsp_features &= ~DSP_FEATURE_WAITDIALTONE;
@@ -8306,7 +8306,6 @@
 static int dahdi_write(struct ast_channel *ast, struct ast_frame *frame)
 {
 	struct dahdi_pvt *p = ast->tech_pvt;
-	char buf[256];
 	int res;
 	int idx;
 	idx = dahdi_get_index(ast, p, 0);
@@ -8321,10 +8320,10 @@
 			ast_log(LOG_WARNING, "Don't know what to do with frame type '%d'\n", frame->frametype);
 		return 0;
 	}
-	if ((frame->subclass != AST_FORMAT_SLINEAR) &&
-		(frame->subclass != AST_FORMAT_ULAW) &&
-		(frame->subclass != AST_FORMAT_ALAW)) {
-		ast_log(LOG_WARNING, "Cannot handle frames in %s format\n", ast_getformatname_multiple(buf, sizeof(buf), frame->subclass));
+	if ((frame->subclass.codec != AST_FORMAT_SLINEAR) &&
+		(frame->subclass.codec != AST_FORMAT_ULAW) &&
+		(frame->subclass.codec != AST_FORMAT_ALAW)) {
+		ast_log(LOG_WARNING, "Cannot handle frames in %s format\n", ast_getformatname(frame->subclass.codec));
 		return -1;
 	}
 	if (p->dialing) {
@@ -8343,7 +8342,7 @@
 	if (!frame->data.ptr || !frame->datalen)
 		return 0;
 
-	if (frame->subclass == AST_FORMAT_SLINEAR) {
+	if (frame->subclass.codec == AST_FORMAT_SLINEAR) {
 		if (!p->subs[idx].linear) {
 			p->subs[idx].linear = 1;
 			res = dahdi_setlinear(p->subs[idx].dfd, p->subs[idx].linear);
@@ -9394,8 +9393,8 @@
 					if (!f)
 						break;
 					if (f->frametype == AST_FRAME_DTMF) {
-						dtmfbuf[k++] = f->subclass;
-						ast_debug(1, "CID got digit '%c'\n", (int) f->subclass);
+						dtmfbuf[k++] = f->subclass.integer;
+						ast_debug(1, "CID got digit '%c'\n", f->subclass.integer);
 						res = 2000;
 					}
 					ast_frfree(f);
@@ -9632,8 +9631,8 @@
 					}
 					f = ast_read(chan);
 					if (f->frametype == AST_FRAME_DTMF) {
-						dtmfbuf[k++] = (int) f->subclass;
-						ast_log(LOG_DEBUG, "CID got digit '%c'\n", (int) f->subclass);
+						dtmfbuf[k++] = f->subclass.integer;
+						ast_log(LOG_DEBUG, "CID got digit '%c'\n", f->subclass.integer);
 						res = 2000;
 					}
 					ast_frfree(f);
@@ -14959,7 +14958,7 @@
 		return 0;
 	}
 	for (i = 0; i < strlen(number); i++) {
-		struct ast_frame f = { AST_FRAME_DTMF, number[i] };
+		struct ast_frame f = { AST_FRAME_DTMF, .subclass.integer = number[i] };
 		dahdi_queue_frame(p, &f, NULL);
 	}
 	astman_send_ack(s, m, "DAHDIDialOffhook");

Modified: team/tilghman/codec_bits3/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/channels/chan_gtalk.c?view=diff&rev=226186&r1=226185&r2=226186
==============================================================================
--- team/tilghman/codec_bits3/channels/chan_gtalk.c (original)
+++ team/tilghman/codec_bits3/channels/chan_gtalk.c Tue Oct 27 16:15:49 2009
@@ -701,19 +701,19 @@
 			if((dtmf = iks_find_attrib(dtmfnode, "code"))) {
 				if(iks_find_with_attrib(pak->x, "dtmf", "action", "button-up")) {
 					struct ast_frame f = {AST_FRAME_DTMF_BEGIN, };
-					f.subclass = dtmf[0];
+					f.subclass.integer = dtmf[0];
 					ast_queue_frame(tmp->owner, &f);
-					ast_verbose("GOOGLE! DTMF-relay event received: %c\n", (int) f.subclass);
+					ast_verbose("GOOGLE! DTMF-relay event received: %c\n", (int) f.subclass.integer);
 				} else if(iks_find_with_attrib(pak->x, "dtmf", "action", "button-down")) {
 					struct ast_frame f = {AST_FRAME_DTMF_END, };
-					f.subclass = dtmf[0];
+					f.subclass.integer = dtmf[0];
 					ast_queue_frame(tmp->owner, &f);
-					ast_verbose("GOOGLE! DTMF-relay event received: %c\n", (int) f.subclass);
+					ast_verbose("GOOGLE! DTMF-relay event received: %c\n", (int) f.subclass.integer);
 				} else if(iks_find_attrib(pak->x, "dtmf")) { /* 250 millasecond default */
 					struct ast_frame f = {AST_FRAME_DTMF, };
-					f.subclass = dtmf[0];
+					f.subclass.integer = dtmf[0];
 					ast_queue_frame(tmp->owner, &f);
-					ast_verbose("GOOGLE! DTMF-relay event received: %c\n", (int) f.subclass);
+					ast_verbose("GOOGLE! DTMF-relay event received: %c\n", (int) f.subclass.integer);
 				}
 			}
 		} else if ((dtmfnode = iks_find_with_attrib(pak->x, "gtalk", "action", "session-info"))) {
@@ -721,14 +721,14 @@
 				if((dtmf = iks_find_attrib(dtmfchild, "code"))) {
 					if(iks_find_with_attrib(dtmfnode, "dtmf", "action", "button-up")) {
 						struct ast_frame f = {AST_FRAME_DTMF_END, };
-						f.subclass = dtmf[0];
+						f.subclass.integer = dtmf[0];
 						ast_queue_frame(tmp->owner, &f);
-						ast_verbose("GOOGLE! DTMF-relay event received: %c\n", (int) f.subclass);
+						ast_verbose("GOOGLE! DTMF-relay event received: %c\n", (int) f.subclass.integer);
 					} else if(iks_find_with_attrib(dtmfnode, "dtmf", "action", "button-down")) {
 						struct ast_frame f = {AST_FRAME_DTMF_BEGIN, };
-						f.subclass = dtmf[0];
+						f.subclass.integer = dtmf[0];
 						ast_queue_frame(tmp->owner, &f);
-						ast_verbose("GOOGLE! DTMF-relay event received: %c\n", (int) f.subclass);
+						ast_verbose("GOOGLE! DTMF-relay event received: %c\n", (int) f.subclass.integer);
 					}
 				}
 			}
@@ -1395,10 +1395,10 @@
 	if (p->owner) {
 		/* We already hold the channel lock */
 		if (f->frametype == AST_FRAME_VOICE) {
-			if (f->subclass != (p->owner->nativeformats & AST_FORMAT_AUDIO_MASK)) {
-				ast_debug(1, "Oooh, format changed to %s\n", ast_getformatname(f->subclass));
+			if (f->subclass.codec != (p->owner->nativeformats & AST_FORMAT_AUDIO_MASK)) {
+				ast_debug(1, "Oooh, format changed to %s\n", ast_getformatname(f->subclass.codec));
 				p->owner->nativeformats =
-					(p->owner->nativeformats & AST_FORMAT_VIDEO_MASK) | f->subclass;
+					(p->owner->nativeformats & AST_FORMAT_VIDEO_MASK) | f->subclass.codec;
 				ast_set_read_format(p->owner, p->owner->readformat);
 				ast_set_write_format(p->owner, p->owner->writeformat);
 			}
@@ -1432,10 +1432,10 @@
 
 	switch (frame->frametype) {
 	case AST_FRAME_VOICE:
-		if (!(frame->subclass & ast->nativeformats)) {
+		if (!(frame->subclass.codec & ast->nativeformats)) {
 			ast_log(LOG_WARNING,
 					"Asked to transmit frame type %s, while native formats is %s (read/write = %s/%s)\n",
-					ast_getformatname(frame->subclass),
+					ast_getformatname(frame->subclass.codec),
 					ast_getformatname_multiple(buf, sizeof(buf), ast->nativeformats),
 					ast_getformatname(ast->readformat),
 					ast_getformatname(ast->writeformat));

Modified: team/tilghman/codec_bits3/channels/chan_jingle.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/channels/chan_jingle.c?view=diff&rev=226186&r1=226185&r2=226186
==============================================================================
--- team/tilghman/codec_bits3/channels/chan_jingle.c (original)
+++ team/tilghman/codec_bits3/channels/chan_jingle.c Tue Oct 27 16:15:49 2009
@@ -511,19 +511,19 @@
 			if((dtmf = iks_find_attrib(dtmfnode, "code"))) {
 				if(iks_find_with_attrib(pak->x, "dtmf", "action", "button-up")) {
 					struct ast_frame f = {AST_FRAME_DTMF_BEGIN, };
-					f.subclass = dtmf[0];
+					f.subclass.integer = dtmf[0];
 					ast_queue_frame(tmp->owner, &f);
-					ast_verbose("JINGLE! DTMF-relay event received: %c\n", (int) f.subclass);
+					ast_verbose("JINGLE! DTMF-relay event received: %c\n", f.subclass.integer);
 				} else if(iks_find_with_attrib(pak->x, "dtmf", "action", "button-down")) {
 					struct ast_frame f = {AST_FRAME_DTMF_END, };
-					f.subclass = dtmf[0];
+					f.subclass.integer = dtmf[0];
 					ast_queue_frame(tmp->owner, &f);
-					ast_verbose("JINGLE! DTMF-relay event received: %c\n", (int) f.subclass);
+					ast_verbose("JINGLE! DTMF-relay event received: %c\n", f.subclass.integer);
 				} else if(iks_find_attrib(pak->x, "dtmf")) { /* 250 millasecond default */
 					struct ast_frame f = {AST_FRAME_DTMF, };
-					f.subclass = dtmf[0];
+					f.subclass.integer = dtmf[0];
 					ast_queue_frame(tmp->owner, &f);
-					ast_verbose("JINGLE! DTMF-relay event received: %c\n", (int) f.subclass);
+					ast_verbose("JINGLE! DTMF-relay event received: %c\n", f.subclass.integer);
 				}
 			}
 		} else if ((dtmfnode = iks_find_with_attrib(pak->x, JINGLE_NODE, "action", "session-info"))) {
@@ -531,14 +531,14 @@
 				if((dtmf = iks_find_attrib(dtmfchild, "code"))) {
 					if(iks_find_with_attrib(dtmfnode, "dtmf", "action", "button-up")) {
 						struct ast_frame f = {AST_FRAME_DTMF_END, };
-						f.subclass = dtmf[0];
+						f.subclass.integer = dtmf[0];
 						ast_queue_frame(tmp->owner, &f);
-						ast_verbose("JINGLE! DTMF-relay event received: %c\n", (int) f.subclass);
+						ast_verbose("JINGLE! DTMF-relay event received: %c\n", f.subclass.integer);
 					} else if(iks_find_with_attrib(dtmfnode, "dtmf", "action", "button-down")) {
 						struct ast_frame f = {AST_FRAME_DTMF_BEGIN, };
-						f.subclass = dtmf[0];
+						f.subclass.integer = dtmf[0];
 						ast_queue_frame(tmp->owner, &f);
-						ast_verbose("JINGLE! DTMF-relay event received: %c\n", (int) f.subclass);
+						ast_verbose("JINGLE! DTMF-relay event received: %c\n", f.subclass.integer);
 					}
 				}
 			}
@@ -1169,17 +1169,17 @@
 	if (p->owner) {
 		/* We already hold the channel lock */
 		if (f->frametype == AST_FRAME_VOICE) {
-			if (f->subclass != (p->owner->nativeformats & AST_FORMAT_AUDIO_MASK)) {
-				ast_debug(1, "Oooh, format changed to %s\n", ast_getformatname(f->subclass));
+			if (f->subclass.codec != (p->owner->nativeformats & AST_FORMAT_AUDIO_MASK)) {
+				ast_debug(1, "Oooh, format changed to %s\n", ast_getformatname(f->subclass.codec));
 				p->owner->nativeformats =
-					(p->owner->nativeformats & AST_FORMAT_VIDEO_MASK) | f->subclass;
+					(p->owner->nativeformats & AST_FORMAT_VIDEO_MASK) | f->subclass.codec;
 				ast_set_read_format(p->owner, p->owner->readformat);
 				ast_set_write_format(p->owner, p->owner->writeformat);
 			}
 /*			if ((ast_test_flag(p, SIP_DTMF) == SIP_DTMF_INBAND) && p->vad) {
 				f = ast_dsp_process(p->owner, p->vad, f);
 				if (f && (f->frametype == AST_FRAME_DTMF))
-					ast_debug(1, "* Detected inband DTMF '%c'\n", f->subclass);
+					ast_debug(1, "* Detected inband DTMF '%c'\n", f->subclass.codec);
 		        } */
 		}
 	}
@@ -1206,10 +1206,10 @@
 
 	switch (frame->frametype) {
 	case AST_FRAME_VOICE:
-		if (!(frame->subclass & ast->nativeformats)) {
+		if (!(frame->subclass.codec & ast->nativeformats)) {
 			ast_log(LOG_WARNING,
 					"Asked to transmit frame type %s, while native formats is %s (read/write = %s/%s)\n",
-					ast_getformatname(frame->subclass),
+					ast_getformatname(frame->subclass.codec),
 					ast_getformatname_multiple(buf, sizeof(buf), ast->nativeformats),
 					ast_getformatname(ast->readformat),
 					ast_getformatname(ast->writeformat));

Modified: team/tilghman/codec_bits3/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/codec_bits3/channels/chan_misdn.c?view=diff&rev=226186&r1=226185&r2=226186
==============================================================================
--- team/tilghman/codec_bits3/channels/chan_misdn.c (original)
+++ team/tilghman/codec_bits3/channels/chan_misdn.c Tue Oct 27 16:15:49 2009
@@ -6977,9 +6977,9 @@
 		return frame;
 	}
 
-	ast_debug(1, "Detected inband DTMF digit: %c\n", (int) f->subclass);
-
- 	if (tmp->faxdetect && (f->subclass == 'f')) {
+	ast_debug(1, "Detected inband DTMF digit: %c\n", f->subclass.integer);
+
+ 	if (tmp->faxdetect && (f->subclass.integer == 'f')) {
  		/* Fax tone -- Handle and return NULL */
  		if (!tmp->faxhandled) {
   			struct ast_channel *ast = tmp->ast;
@@ -7028,8 +7028,8 @@
 		}
   	}
 
- 	if (tmp->ast_dsp && (f->subclass != 'f')) {
- 		chan_misdn_log(2, tmp->bc->port, " --> * SEND: DTMF (AST_DSP) :%c\n", (int) f->subclass);
+ 	if (tmp->ast_dsp && (f->subclass.integer != 'f')) {
+ 		chan_misdn_log(2, tmp->bc->port, " --> * SEND: DTMF (AST_DSP) :%c\n", f->subclass.integer);
  	}
 
 	return f;
@@ -7084,7 +7084,7 @@
 	}
 
 	tmp->frame.frametype = AST_FRAME_VOICE;
-	tmp->frame.subclass = AST_FORMAT_ALAW;
+	tmp->frame.subclass.codec = AST_FORMAT_ALAW;
 	tmp->frame.datalen = len;
 	tmp->frame.samples = len;
 	tmp->frame.mallocd = 0;
@@ -7150,13 +7150,13 @@
 	}
 
 
-	if (!frame->subclass) {
+	if (!frame->subclass.codec) {
 		chan_misdn_log(4, ch->bc->port, "misdn_write: * prods us\n");
 		return 0;
 	}
 
-	if (!(frame->subclass & prefformat)) {
-		chan_misdn_log(-1, ch->bc->port, "Got Unsupported Frame with Format:%s\n", ast_getformatname(frame->subclass));
+	if (!(frame->subclass.codec & prefformat)) {

[... 640 lines stripped ...]



More information about the svn-commits mailing list