BelledonneCommunications / mediastreamer2

Linphone.org mirror for mediastreamer2 (git://git.linphone.org/mediastreamer2.git)
http://linphone.org
GNU Affero General Public License v3.0
133 stars 104 forks source link

Misspellings in source code (patch file included) #24

Open RogueScholar opened 4 years ago

RogueScholar commented 4 years ago

While working on packaging version 4.4.0 for Debian/Ubuntu I encountered some misspelled words in the code comments and took a few extra minutes to craft a patch file to correct them. I'm attaching it to this issue in case you'd like to apply it here upstream.

Patch file: mediastreamer2-corrected-misspellings.txt

Patch file contents ```diff --- a/help/ht0-buildagraph.dox +++ b/help/ht0-buildagraph.dox @@ -114,7 +114,7 @@ cards' filters: Then you need to 'attach' the filters to a ticker. A ticker is a graph manager responsible for running filters. -In the above case, there is 2 independant graph within the ticker: you +In the above case, there are two (2) independent graphs within the ticker: you need to attach the first element of each graph (the one that does not contains any INPUT pins) --- a/include/mediastreamer2/msfileplayer.h +++ b/include/mediastreamer2/msfileplayer.h @@ -30,7 +30,7 @@ /* set loop mode: -1: no looping, 0: loop at end of file, - x>0, loop after x miliseconds after eof + x>0, loop after x milliseconds after EOF */ #define MS_FILE_PLAYER_LOOP MS_FILTER_METHOD(MS_FILE_PLAYER_ID,4,int) #define MS_FILE_PLAYER_DONE MS_FILTER_METHOD(MS_FILE_PLAYER_ID,5,int) --- a/include/mediastreamer2/msticker.h +++ b/include/mediastreamer2/msticker.h @@ -39,7 +39,7 @@ /** - * Function pointer for method getting time in miliseconds from an external source. + * Function pointer for method of getting time in milliseconds from an external source. * @var MSTickerTimeFunc */ typedef uint64_t (*MSTickerTimeFunc)(void *); @@ -77,7 +77,7 @@ struct _MSTicker MSList *execution_list; /* the list of source filters to be executed.*/ MSList *task_list; /* list of tasks (see ms_filter_postpone_task())*/ ms_thread_t thread; /* the thread ressource*/ - int interval; /* in miliseconds*/ + int interval; /* in milliseconds*/ int exec_id; uint32_t ticks; uint64_t time; /* a time since the start of the ticker expressed in milisec*/ --- a/src/audiofilters/genericplc.h +++ b/src/audiofilters/genericplc.h @@ -26,7 +26,7 @@ /* 2/ gives then length in seconds */ #define PLC_BUFFER_LEN 2/40 -/* define in ms the maximum duration of PLC(after wich the output will be 0), and after how long we start decreasing the output volume to reach 0 at MAX_PLC_LEN */ +/* define in ms the maximum duration of PLC(after which the output will be 0), and how long before we start decreasing the output volume to reach 0 at MAX_PLC_LEN */ #define PLC_DECREASE_START 100 #define MAX_PLC_LEN 150 --- a/src/base/msticker.c +++ b/src/base/msticker.c @@ -454,7 +454,7 @@ void * ms_ticker_run(void *arg) s->time+=s->interval; late=s->wait_next_tick(s->wait_next_tick_data,s->time); if (late>s->interval*5 && late>lastlate){ - ms_warning("%s: We are late of %d miliseconds.",s->name,late); + ms_warning("%s: We are late by %d milliseconds.",s->name,late); late_tick_time=ms_get_cur_time_ms(); } lastlate=late; --- a/src/crypto/dtls_srtp.c +++ b/src/crypto/dtls_srtp.c @@ -231,7 +231,7 @@ static void schedule_rtcp(struct _RtpTra } /** * Check if the incoming message is a DTLS packet. - * If it is, store it in the context incoming buffer and call the polarssl function wich will process it. + * If it is, store it in the context incoming buffer and call the polarssl function which will process it. * This function also manages the client retransmission timer * * @param[in] msg the incoming message @@ -346,7 +346,7 @@ static bool_t ms_dtls_srtp_process_dtls_ base_index += Handshake_Header_Length + frag_length; // bytes parsed so far frag += Handshake_Header_Length + frag_length; // point to the begining of the next fragment } else { // message is malformed in a nasty way - ms_warning("DTLS Received %s packet len %d sessions: %p rtp session %p is malformed in an agressive way", is_rtp==TRUE?"RTP":"RTCP", (int)msgLength, ctx->stream_sessions, ctx->stream_sessions->rtp_session); + ms_warning("DTLS Received %s packet len %d sessions: %p rtp session %p is malformed in an aggressive way", is_rtp==TRUE?"RTP":"RTCP", (int)msgLength, ctx->stream_sessions, ctx->stream_sessions->rtp_session); base_index = msgLength; // get out of the while ms_free(reassembled_packet); reassembled_packet = NULL; @@ -644,7 +644,7 @@ static int ms_dtls_srtp_rtp_process_on_r } if (ctx->role != MSDtlsSrtpRoleIsServer) { /* close the connection only if we are client, if we are server, the client may ask again for last packets */ - /*FireFox version 43 requires DTLS channel to be kept openned, probably a bug in FireFox ret = ssl_close_notify( &(ctx->rtp_dtls_context->ssl) );*/ + /*FireFox version 43 requires DTLS channel to be kept open, probably a bug in FireFox ret = ssl_close_notify( &(ctx->rtp_dtls_context->ssl) );*/ } @@ -725,7 +725,7 @@ static int ms_dtls_srtp_rtcp_process_on_ } if (ctx->role != MSDtlsSrtpRoleIsServer) { /* close the connection only if we are client, if we are server, the client may ask again for last packets */ - /*FireFox version 43 requires DTLS channel to be kept openned, probably a bug in FireFox ret = ssl_close_notify( &(ctx->rtcp_dtls_context->ssl) );*/ + /*FireFox version 43 requires DTLS channel to be kept open, probably a bug in FireFox ret = ssl_close_notify( &(ctx->rtcp_dtls_context->ssl) );*/ } } @@ -845,7 +845,7 @@ void ms_dtls_srtp_set_peer_fingerprint(M size_t peer_fingerprint_length = strlen(peer_fingerprint)+1; // include the null termination if (peer_fingerprint_length>sizeof(context->peer_fingerprint)) { memcpy(context->peer_fingerprint, peer_fingerprint, sizeof(context->peer_fingerprint)); - ms_error("DTLS-SRTP received from SDP INVITE a peer fingerprint %d bytes length wich is longer than maximum storage %d bytes", (int)peer_fingerprint_length, (int)sizeof(context->peer_fingerprint)); + ms_error("DTLS-SRTP received from SDP INVITE a peer fingerprint %d bytes long, which is longer than maximum storage of %d bytes", (int)peer_fingerprint_length, (int)sizeof(context->peer_fingerprint)); } else { memcpy(context->peer_fingerprint, peer_fingerprint, peer_fingerprint_length); } --- a/src/crypto/ms_srtp.c +++ b/src/crypto/ms_srtp.c @@ -589,6 +589,6 @@ const char * ms_srtp_stream_type_to_stri case MSSRTP_RTCP_STREAM: return "MSSRTP_RTCP_STREAM"; case MSSRTP_ALL_STREAMS: return "MSSRTP_ALL_STREAMS"; } - return "Unkown srtp tream type"; + return "Unknown srtp stream type"; } --- a/src/crypto/zrtp.c +++ b/src/crypto/zrtp.c @@ -641,7 +641,7 @@ MSZrtpContext* ms_zrtp_multistream_new(M int retval; MSZrtpContext *userData; if ((retval = bzrtp_addChannel(activeContext->zrtpContext, sessions->rtp_session->snd.ssrc)) != 0) { - ms_warning("ZRTP could't add stream, returns %x", retval); + ms_warning("ZRTP couldn't add stream, returned %x", retval); } ms_message("Initializing multistream ZRTP context on rtp session [%p] ssrc 0x%x",sessions->rtp_session, sessions->rtp_session->snd.ssrc); --- a/src/otherfilters/msrtp.c +++ b/src/otherfilters/msrtp.c @@ -731,7 +731,7 @@ static void receiver_process(MSFilter * return; if (d->reset_jb){ - ms_message("Reseting jitter buffer"); + ms_message("Resetting jitter buffer"); rtp_session_resync(d->session); d->reset_jb=FALSE; } --- a/src/utils/audiodiff.c +++ b/src/utils/audiodiff.c @@ -283,7 +283,7 @@ static int _ms_audio_diff_chunked(FileIn *ret = cum_res / (double)tot_energy; ms_message("Similarity factor weighted with most significant chunks is [%g]", *ret); *ret = *ret * (1-variance); - ms_message("After integrating max position variance accross chunks, it is [%g]", *ret); + ms_message("After integrating maximum position variance across chunks, it is [%g]", *ret); ms_free(chunk_energies); ms_free(max_pos_table); return maxpos; --- a/src/utils/mkv_reader.h +++ b/src/utils/mkv_reader.h @@ -136,7 +136,7 @@ MKVTrackReader *mkv_reader_get_track_rea /** * @brief Set the reading head of each assocated track reader at a specific position * @param reader MKVReader - * @param pos_ms Position of the head in miliseconds + * @param pos_ms Position of the head in milliseconds * @return The effective position of the head after the operation */ int mkv_reader_seek(MKVReader *reader, int pos_ms); --- a/src/videofilters/bb10_capture.cpp +++ b/src/videofilters/bb10_capture.cpp @@ -125,7 +125,7 @@ static void bb10capture_open_camera(BB10 camera_error_t error; if (d->camera_openned) { - ms_warning("[bb10_capture] camera already openned, skipping..."); + ms_warning("[bb10_capture] camera already opened, skipping..."); return; } @@ -157,7 +157,7 @@ static void bb10capture_open_camera(BB10 static void bb10capture_start_capture(BB10Capture *d) { if (!d->camera_openned) { - ms_error("[bb10_capture] camera not openned, skipping..."); + ms_error("[bb10_capture] camera not opened, skipping..."); return; } if (d->capture_started) { @@ -186,7 +186,7 @@ static void bb10capture_stop_capture(BB1 static void bb10capture_close_camera(BB10Capture *d) { if (!d->camera_openned) { - ms_warning("[bb10_capture] camera not openned, skipping..."); + ms_warning("[bb10_capture] camera not opened, skipping..."); return; } --- a/src/videofilters/msv4l2.c +++ b/src/videofilters/msv4l2.c @@ -697,7 +697,7 @@ static void *msv4l2_thread(void *ptr){ ms_message("msv4l2_thread starting"); if (s->fd==-1){ if( msv4l2_open(s)!=0){ - ms_warning("msv4l2 could not be openned"); + ms_warning("msv4l2 could not be opened"); goto close; } } --- a/src/videofilters/vp8.c +++ b/src/videofilters/vp8.c @@ -407,10 +407,10 @@ static void enc_fill_encoder_flags(EncSt } else if (frame_type & VP8_ALTR_FRAME) { *flags |= (VP8_EFLAG_FORCE_ARF | VP8_EFLAG_NO_UPD_GF | VP8_EFLAG_NO_REF_ARF); if (s->frame_count > s->frames_state.last_independent_frame + 5*enc_get_ref_frames_interval(s)){ - /*force an independant alt ref frame to force picture to be refreshed completely, otherwise + /*force an independent alt ref frame to force picture to be refreshed completely, otherwise * pixel color saturation appears due to accumulation of small predictive errors*/ *flags |= VP8_EFLAG_NO_REF_LAST | VP8_EFLAG_NO_REF_GF; - ms_message("Forcing independant altref frame."); + ms_message("Forcing independent altref frame."); } } if (!(*flags & VPX_EFLAG_FORCE_KF)){ @@ -1141,7 +1141,7 @@ static int dec_freeze_on_error(MSFilter static int dec_reset(MSFilter *f, void *data) { DecState *s = (DecState *)f->data; - ms_message("Reseting VP8 decoder"); + ms_message("Resetting VP8 decoder"); ms_filter_lock(f); vpx_codec_destroy(&s->codec); if (dec_initialize_impl(f) != 0){ --- a/src/voip/audiostream.c +++ b/src/voip/audiostream.c @@ -914,7 +914,7 @@ int audio_stream_start_from_io(AudioStre } /* sample rate is already set for rtpsend and rtprcv, check if we have to adjust it to */ - /* be able to use the echo canceller wich may be limited (webrtc aecm max frequency is 16000 Hz) */ + /* be able to use the echo canceller, which may be limited (webrtc aecm max frequency is 16000 Hz) */ // First check if we need to use the echo canceller // Overide feature if not requested or done at sound card level if ( ((stream->features & AUDIO_STREAM_FEATURE_EC) && !stream->use_ec) || has_builtin_ec ) --- a/src/voip/msvideo.c +++ b/src/voip/msvideo.c @@ -955,7 +955,7 @@ void ms_average_fps_init(MSAverageFPS* a afps->mean_inter_frame = 0; afps->context = ctx; if (!ctx || strstr(ctx, "%f") == 0) { - ms_error("Invalid MSAverageFPS context given '%s' (must be not null and must contain one occurence of '%%f'", ctx); + ms_error("Invalid MSAverageFPS context given '%s' (must be not null and must contain one occurrence of '%%f'", ctx); } } --- a/tools/mediastream.c +++ b/tools/mediastream.c @@ -198,7 +198,7 @@ const char *usage="mediastream --local < "[ --ec-tail ]\n" "[ --el (enable echo limiter) ]\n" "[ --el-force <(float) [0-1]> (The proportional coefficient controlling the mic attenuation) ]\n" - "[ --el-speed <(float) [0-1]> (gain changes are smoothed with a coefficent) ]\n" + "[ --el-speed <(float) [0-1]> (gain changes are smoothed with a coefficient) ]\n" "[ --el-sustain <(int)> (Time in milliseconds for which the attenuation is kept unchanged after) ]\n" "[ --el-thres <(float) [0-1]> (Threshold above which the system becomes active) ]\n" "[ --el-transmit-thres <(float) [0-1]> (TO BE DOCUMENTED) ]\n" @@ -210,7 +210,7 @@ const char *usage="mediastream --local < "[ --ice-remote-candidate ]\n" "[ --infile specify a wav file to be used for input, instead of soundcard ]\n" "[ --interactive (run in interactive mode) ]\n" - "[ --jitter ]\n" + "[ --jitter ]\n" "[ --log ]\n" "[ --mtu (specify MTU)]\n" "[ --netsim-bandwidth (simulates a network download bandwidth limit) ]\n" @@ -228,7 +228,7 @@ const char *usage="mediastream --local < "[ --outfile specify a wav file to write audio into, instead of soundcard ]\n" "[ --playback-card ]\n" "[ --rc possible values are: none, simple, advanced ]\n" - "[ --srtp (enable srtp, master key is generated if absent from comand line) ]\n" + "[ --srtp (enable srtp, master key is generated if absent from command line) ]\n" "[ --verbose (most verbose messages) ]\n" "[ --video-display-filter ]\n" "[ --video-windows-id

I've downloaded and filled out your Contributor Agreement as well, in case you need it on file to use the patch. If so, just let me know which method you'd prefer I use to transmit it to you and it's yours.

Warmly, Peter

Viish commented 4 years ago

Hi, Yes, we will be very glad to merge it. Can you send me your contributor agreement by email? Thanks a lot!