]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7502: add some changes for video media bug
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 2 Apr 2015 00:37:25 +0000 (19:37 -0500)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:15 +0000 (12:47 -0500)
src/include/switch_core.h
src/switch_core_media.c
src/switch_core_media_bug.c

index 39105d0aa933d6723718fb8af1727ae35c8f4539..cb24be1cefd85e9244057949b4a2c5321ece0ac1 100644 (file)
@@ -301,6 +301,8 @@ SWITCH_DECLARE(switch_frame_t *) switch_core_media_bug_get_native_read_frame(swi
 SWITCH_DECLARE(switch_frame_t *) switch_core_media_bug_get_native_write_frame(switch_media_bug_t *bug);
 
 
+SWITCH_DECLARE(switch_frame_t *) switch_core_media_bug_get_video_ping_frame(switch_media_bug_t *bug);
+
 /*!
   \brief Set a return replace frame
   \param bug the bug to set the frame on
index 91dd02ad6b44b7de53689242f4c39f919a549c2d..33d608e649edaa33da891613919a350bf727a04c 100644 (file)
@@ -10423,7 +10423,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
                        }
 
                        if (bp->ready && switch_test_flag(bp, SMBF_READ_VIDEO_PING)) {
-                               switch_mutex_lock(bp->read_mutex);
                                bp->ping_frame = *frame;
                                if (bp->callback) {
                                        if (bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_READ_VIDEO_PING) == SWITCH_FALSE
@@ -10432,7 +10431,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
                                        }
                                }
                                bp->ping_frame = NULL;
-                               switch_mutex_unlock(bp->read_mutex);
                        }
 
                        if (ok == SWITCH_FALSE) {
index 3633c77db66033eca921a9762fb99ec69955990c..993231b28ea7ee5583ed05a3f12d04e30b2760e8 100644 (file)
@@ -88,6 +88,11 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_media_bug_get_session(switch
        return bug->session;
 }
 
+SWITCH_DECLARE(switch_frame_t *) switch_core_media_bug_get_video_ping_frame(switch_media_bug_t *bug)
+{
+       return bug->ping_frame;
+}
+
 SWITCH_DECLARE(switch_frame_t *) switch_core_media_bug_get_write_replace_frame(switch_media_bug_t *bug)
 {
        return bug->write_replace_frame_in;