video improvements

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15524 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-11-18 19:22:45 +00:00
parent d850453bb8
commit 349b02c2e6
6 changed files with 150 additions and 33 deletions
+11 -3
View File
@@ -293,6 +293,14 @@ switch_status_t sofia_on_destroy(switch_core_session_t *session)
switch_core_codec_destroy(&tech_pvt->write_codec);
}
if (switch_core_codec_ready(&tech_pvt->video_read_codec)) {
switch_core_codec_destroy(&tech_pvt->video_read_codec);
}
if (switch_core_codec_ready(&tech_pvt->video_write_codec)) {
switch_core_codec_destroy(&tech_pvt->video_write_codec);
}
switch_core_session_unset_read_codec(session);
switch_core_session_unset_write_codec(session);
@@ -685,7 +693,7 @@ static switch_status_t sofia_write_video_frame(switch_core_session_t *session, s
{
private_object_t *tech_pvt = (private_object_t *) switch_core_session_get_private(session);
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_status_t status = SWITCH_STATUS_SUCCESS;
int wrote = 0;
switch_assert(tech_pvt != NULL);
@@ -710,10 +718,10 @@ static switch_status_t sofia_write_video_frame(switch_core_session_t *session, s
}
if (!switch_test_flag(frame, SFF_CNG)) {
switch_rtp_write_frame(tech_pvt->video_rtp_session, frame);
wrote = switch_rtp_write_frame(tech_pvt->video_rtp_session, frame);
}
return status;
return wrote > 0 ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_GENERR;
}
static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id)