git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7972 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-03-27 20:36:03 +00:00
parent da72bfb9f6
commit ecece5885f
6 changed files with 25 additions and 13 deletions

View File

@@ -41,6 +41,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_set_read_codec(switch_core_s
switch_channel_t *channel = switch_core_session_get_channel(session);
char tmp[30];
switch_assert(codec->implementation);
if (switch_event_create(&event, SWITCH_EVENT_CODEC) == SWITCH_STATUS_SUCCESS) {
switch_channel_event_set_data(session->channel, event);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-read-codec-name", "%s", codec->implementation->iananame);
@@ -75,6 +77,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_set_write_codec(switch_core_
switch_channel_t *channel = switch_core_session_get_channel(session);
char tmp[30];
switch_assert(codec->implementation);
if (switch_event_create(&event, SWITCH_EVENT_CODEC) == SWITCH_STATUS_SUCCESS) {
switch_channel_event_set_data(session->channel, event);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "channel-write-codec-name", "%s", codec->implementation->iananame);