- Timestamp:
- Aug 5, 2016 1:06:14 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/vid_stream.c
r5410 r5411 153 153 pjmedia_frame *rx_frames; /**< Temp. buffer for incoming 154 154 frame assembly. */ 155 156 155 pj_bool_t force_keyframe;/**< Forced to encode keyframe? */ 157 156 unsigned num_keyframe; /**< The number of keyframe needed … … 822 821 unsigned pkt_cnt = 0; 823 822 pj_timestamp initial_time; 823 pj_timestamp null_ts ={0}; 824 824 825 825 #if defined(PJMEDIA_STREAM_ENABLE_KA) && PJMEDIA_STREAM_ENABLE_KA != 0 … … 859 859 860 860 /* Check if need to send keyframe. */ 861 if (stream->num_keyframe) { 861 if (stream->num_keyframe && 862 (pj_cmp_timestamp(&null_ts, &stream->last_keyframe_tx) != 0)) 863 { 862 864 unsigned elapse_time; 863 865 pj_timestamp now; … … 870 872 { 871 873 stream->force_keyframe = PJ_TRUE; 872 if (--stream->num_keyframe) 873 stream->last_keyframe_tx = now; 874 --stream->num_keyframe; 874 875 } 875 876 } … … 903 904 904 905 pj_get_timestamp(&initial_time); 906 907 if ((stream->num_keyframe) && 908 ((frame_out.bit_info & PJMEDIA_VID_FRM_KEYFRAME) 909 == PJMEDIA_VID_FRM_KEYFRAME)) 910 { 911 stream->last_keyframe_tx = initial_time; 912 } 905 913 906 914 /* Loop while we have frame to send */
Note: See TracChangeset
for help on using the changeset viewer.