[libdvdnav-devel] [Git][videolan/libdvdnav][master] Typos found by codespell

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Tue Dec 14 11:33:44 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdnav


Commits:
253c4376 by Dimitri Papadopoulos at 2021-12-14T11:07:23+00:00
Typos found by codespell

- - - - -


17 changed files:

- ChangeLog
- TODO
- doc/doxy.conf
- doc/dvd_structures
- doc/tutorial.cpp
- msvc/contrib/timer/timer.c
- msvc/include/sys/time.h
- msvc/include/unistd.h
- src/dvdnav.c
- src/dvdnav/dvdnav_events.h
- src/dvdnav_internal.h
- src/searching.c
- src/vm/decoder.c
- src/vm/vm.c
- src/vm/vm.h
- src/vm/vmcmd.c
- src/vm/vmget.c


Changes:

=====================================
ChangeLog
=====================================
@@ -62,12 +62,12 @@ libdvdnav (4.2.0)
     more reliable playback
   * fixed deadlock between dvdnav_reset() and dvd_clear()
   * fixed pthread_mutex_destroy macro for Win32
-  * fixed numerous assertion failures occuring when playing DVDs with
+  * fixed numerous assertion failures occurring when playing DVDs with
     new "copy protection" schemes
   * fixed forward seeks to always move forward
 
 libdvdnav (4.1.3)
-  * an embarassing amount of fixes regarding potential memory and resource leaks
+  * an embarrassing amount of fixes regarding potential memory and resource leaks
     (patches contributed by Erik Hovland)
   * added dvdread-config (dvdnav-config's younger brother)
   * added pkg-config support
@@ -92,7 +92,7 @@ libdvdnav (4.1.1)
     dvdnav_{title,part}_play() works again
   * removed wrong SPU stream change event filter
     (fixes unwanted subtitles in the trailer of "Girl, interrupted", RC2)
-  * fixed error "Expected NAV packet but none found." occuring sometimes
+  * fixed error "Expected NAV packet but none found." occurring sometimes
     on resume from menu
 
 libdvdnav (0.1.10)
@@ -126,7 +126,7 @@ libdvdnav (0.1.6) unstable; urgency=low
   * method to try-run VM operations, now used for safer chapter skipping and menu jumps
   * fixed detection of current PTT to not assume a 1:1 mapping between PTTs and PGs
   * releasing stills when jumping to menu fixes some state inconsistencies
-  * do not assume PGs to be physically layed out in sequence on the disc
+  * do not assume PGs to be physically laid out in sequence on the disc
   * optional PGC based seeking
   * new event on cell changes for timing info
 


=====================================
TODO
=====================================
@@ -1,5 +1,5 @@
 * Support DVDs with errors on them. So we can recover from corrupt sectors in the .VOB. Also, handle corrupt .IFO files by using the backup .BUP files.
-* Support Random and Shuffle Titles. Only sequencial Titles are currently supported.
+* Support Random and Shuffle Titles. Only sequential Titles are currently supported.
 * rework documentation
 * implement restriction levels:
    0 - execute everything as the app commands


=====================================
doc/doxy.conf
=====================================
@@ -138,7 +138,7 @@ STRIP_CODE_COMMENTS    = YES
 # file names in lower case letters. If set to YES upper case letters are also
 # allowed. This is useful if you have classes or files whose names only differ
 # in case and if your file system supports case sensitive file names. Windows
-# users are adviced to set this option to NO.
+# users are advised to set this option to NO.
 
 CASE_SENSE_NAMES       = YES
 
@@ -170,7 +170,7 @@ SHOW_INCLUDE_FILES     = YES
 # will interpret the first line (until the first dot) of a JavaDoc-style
 # comment as the brief description. If set to NO, the JavaDoc
 # comments  will behave just like the Qt-style comments (thus requiring an
-# explict @brief command for a brief description.
+# explicit @brief command for a brief description.
 
 JAVADOC_AUTOBRIEF      = YES
 
@@ -639,7 +639,7 @@ COMPACT_RTF            = NO
 RTF_HYPERLINKS         = NO
 
 # Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assigments. You only have to provide
+# config file, i.e. a series of assignments. You only have to provide
 # replacements, missing definitions are set to their default value.
 
 RTF_STYLESHEET_FILE    =
@@ -801,7 +801,7 @@ PERL_PATH              = /usr/bin/perl
 # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
 # generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or
 # super classes. Setting the tag to NO turns the diagrams off. Note that this
-# option is superceded by the HAVE_DOT option below. This is only a fallback. It is
+# option is superseded by the HAVE_DOT option below. This is only a fallback. It is
 # recommended to install and use dot, since it yield more powerful graphs.
 
 CLASS_DIAGRAMS         = YES


=====================================
doc/dvd_structures
=====================================
@@ -27,7 +27,7 @@ not know), but they are practically proven in libdvdnav.
          NAV packet used for menu button highlight and command information
          and to detect PTS discontinuities
    - ILVU (interleaved video unit)
-       * contains multiple VOBUs (ususally only one)
+       * contains multiple VOBUs (usually only one)
        * blocking multiple VOBUs of multiple interleaved MPEG streams for
          multiangle features
    - VOB (video object)
@@ -41,11 +41,11 @@ not know), but they are practically proven in libdvdnav.
        * all block addressing is done within the scope of the VOBS
 2. navigational structure - logical playback control
    - Cell
-       * smallest unit which is layed out in sequence
+       * smallest unit which is laid out in sequence
        * points to a first and last VOBU (by sector)
        * also points to the corresponding CellID and VOB_ID
        * smallest unit to execute VM commands (cell_post commands)
-       * smallest unit accesible by VM commands (apart from LinkRSM)
+       * smallest unit accessible by VM commands (apart from LinkRSM)
    - PG (program)
        * points to a Cell
        * usually the mapping between PG and Cells is 1:1, but not always


=====================================
doc/tutorial.cpp
=====================================
@@ -25,7 +25,7 @@ DVD allows the user to jump about at will (much like those
 popular a while back).
 
 Such features are usually referred to under the moniker
-'interactive' by marketting people but you aren't in marketting
+'interactive' by marketing people but you aren't in marketing
 since you are reading the <tt>libdvdnav</tt> tutorial. We'll
 assume you actually want to know precisely what DVD can do.
 
@@ -91,7 +91,7 @@ multiple Cells per Part.
 A VOBU (<I>V</I>ideo <I>OB</I>ject <I>U</I>nit) is a small (typically a few
 seconds) of video. It must be a self contained 'Group of Pictures' which
 can be understood by the MPEG decoder. All seeking, jumping, etc is guaranteed
-to occurr at a VOBU boundary so that the decoder need not be restarted and that
+to occur at a VOBU boundary so that the decoder need not be restarted and that
 the location jumped to is always the start of a valid MPEG stream. For multiple-angle
 DVDs VOBUs for each angle can be interleaved into one Interleaved Video Unit (ILVU).
 In this case when the player get to the end of the VOBU for angle <i>n</i> instead of


=====================================
msvc/contrib/timer/timer.c
=====================================
@@ -32,7 +32,7 @@
 	accurate unix time with the data
 	accurate to the first call to get
 	of day and the resolution accurate
-	to ~ miliseconds.
+	to ~ milliseconds.
 */
 
 static time_t startseconds = 0;
@@ -41,7 +41,7 @@ int gettimeofday( struct timeval *tp, struct timezone *tzp )
 {
 	MMTIME mmtime;
 
-	// clock() returns time in miliseconds
+	// clock() returns time in milliseconds
 
 	if( !startseconds )
 		startseconds = time( 0 );
@@ -55,7 +55,7 @@ int gettimeofday( struct timeval *tp, struct timezone *tzp )
 };
 
 /*
-	These functions are designed to mimick
+	These functions are designed to mimic
 	a subset of itimer for use with the
 	alarm signal on win32. This is just
 	enough for xine to work.
@@ -65,14 +65,14 @@ static HANDLE sigalarm = 0;
 
 int setitimer( int which, struct itimerval * value, struct itimerval *ovalue )
 {
-	long int miliseconds;
+	long int milliseconds;
 
 	if( !sigalarm )
 		sigalarm = CreateEvent( 0, FALSE, TRUE, "SIGALARM" );
 
-    miliseconds = value->it_value.tv_usec / 1000;
+    milliseconds = value->it_value.tv_usec / 1000;
 
-	timeSetEvent( miliseconds, 0, ( LPTIMECALLBACK ) sigalarm, 0, TIME_PERIODIC | TIME_CALLBACK_EVENT_PULSE );
+	timeSetEvent( milliseconds, 0, ( LPTIMECALLBACK ) sigalarm, 0, TIME_PERIODIC | TIME_CALLBACK_EVENT_PULSE );
 
 	return 0;
 }


=====================================
msvc/include/sys/time.h
=====================================
@@ -20,7 +20,7 @@
  * WIN32 PORT,
  * by Matthew Grooms <elon at altavista.com>
  *
- * sys/time.h - There is no seperate sys/time.h for win32 so we simply
+ * sys/time.h - There is no separate sys/time.h for win32 so we simply
  *              include the standard time header as well as our xine
  *				timer functions.
  */


=====================================
msvc/include/unistd.h
=====================================
@@ -21,7 +21,7 @@
  * by Matthew Grooms <elon at altavista.com>
  *
  * unistd.h - This is mostly a catch all header that maps standard unix
- *            libc calls to the equivelent win32 functions.
+ *            libc calls to the equivalent win32 functions.
  *
  */
 


=====================================
src/dvdnav.c
=====================================
@@ -279,7 +279,7 @@ dvdnav_status_t dvdnav_reset(dvdnav_t *this) {
   pthread_mutex_lock(&this->vm_lock);
 
 #ifdef LOG_DEBUG
-  Log3(this, "reseting vm");
+  Log3(this, "resetting vm");
 #endif
   if(!vm_reset(this->vm, NULL, NULL, NULL)) {
     printerr("Error restarting the VM.");
@@ -476,7 +476,7 @@ static int32_t dvdnav_get_vobu(dvdnav_t *this, dsi_t *nav_dsi, pci_t *nav_pci, d
  * These are the main get_next_block function which actually get the media stream video and audio etc.
  *
  * There are two versions: The second one is using the zero-copy read ahead cache and therefore
- * hands out pointers targetting directly into the cache.
+ * hands out pointers targeting directly into the cache.
  * The first one uses a memcopy to fill this cache block into the application provided memory.
  * The benefit of this first one is that no special memory management is needed. The application is
  * the only one responsible of allocating and freeing the memory associated with the pointer.
@@ -808,7 +808,7 @@ dvdnav_status_t dvdnav_get_next_cache_block(dvdnav_t *this, uint8_t **buf,
     Log3(this, "SPU_STREAM_CHANGE stream_id_pan_scan=%d",stream_change->physical_pan_scan);
     Log3(this, "SPU_STREAM_CHANGE returning DVDNAV_STATUS_OK");
 #endif
-    /* This is not realy the right place to do this. FOSL_BTNN should set the register
+    /* This is not really the right place to do this. FOSL_BTNN should set the register
      * at HLI_S_PTM rather than when we enter the SPU. As well we should activate FOAC_BTNN
      * at HLI_E_PTM
      */


=====================================
src/dvdnav/dvdnav_events.h
=====================================
@@ -157,7 +157,7 @@ typedef struct {
  * they carry the start and end PTS values for the current VOBU.
  * (pci.vobu_s_ptm and pci.vobu_e_ptm) Whenever the start PTS of the
  * current NAV does not match the end PTS of the previous NAV, a PTS
- * discontinuity has occured.
+ * discontinuity has occurred.
  * NAV packets can also be used for time display, because they are
  * timestamped relatively to the current Cell.
  */


=====================================
src/dvdnav_internal.h
=====================================
@@ -77,7 +77,7 @@ static inline int _private_gettimeofday( struct timeval *tv, void *tz )
 #endif
 
 typedef enum {
-  DSI_ILVU_PRE   = 1 << 15, /* set during the last 3 VOBU preceeding an interleaved block. */
+  DSI_ILVU_PRE   = 1 << 15, /* set during the last 3 VOBU preceding an interleaved block. */
   DSI_ILVU_BLOCK = 1 << 14, /* set for all VOBU in an interleaved block */
   DSI_ILVU_FIRST = 1 << 13, /* set for the first VOBU for a given angle or scene within a ILVU, or the first VOBU in the preparation (PREU) sequence */
   DSI_ILVU_LAST  = 1 << 12, /* set for the last VOBU for a given angle or scene within a ILVU, or the last VOBU in the preparation (PREU) sequence */


=====================================
src/searching.c
=====================================
@@ -279,7 +279,7 @@ dvdnav_status_t dvdnav_sector_search(dvdnav_t *this,
     target = length - offset;
     break;
    default:
-    /* Error occured */
+    /* Error occurred */
     printerr("Illegal seek mode.");
     pthread_mutex_unlock(&this->vm_lock);
     return DVDNAV_STATUS_ERR;
@@ -906,7 +906,7 @@ static int32_t dvdnav_admap_search(vobu_admap_t *admap, uint32_t admap_len,
   uint32_t cur_sector = 0;
   while (1) {
     cur_len = prv_len / 2;
-    /* need to add 1 when prv_len == 3 (cur_len shoud go to 2, not 1) */
+    /* need to add 1 when prv_len == 3 (cur_len should go to 2, not 1) */
     if (prv_len % 2 == 1) ++cur_len;
     cur_idx = prv_pos + (cur_len * adj);
     if       (cur_idx < 0)
@@ -947,7 +947,7 @@ static int32_t dvdnav_tmap_search(dvdnav_t *this,
   uint32_t cur_sector = 0;
   while (1) {
     cur_len = prv_len / 2;
-    /* need to add 1 when prv_len == 3 (cur_len shoud go to 2, not 1) */
+    /* need to add 1 when prv_len == 3 (cur_len should go to 2, not 1) */
     if (prv_len % 2 == 1) ++cur_len;
     cur_idx = prv_pos + (cur_len * adj);
     if      (cur_idx < 0)
@@ -1345,7 +1345,7 @@ dvdnav_status_t dvdnav_jump_to_sector_by_time(dvdnav_t *this,
   result = vm_jump_cell_block(this->vm, cell_data->idx, sector_off);
   pthread_mutex_lock(&this->vm_lock);
   this->cur_cell_time = 0;
-  if (result) { /* vm_jump_cell_block was sucessful */
+  if (result) { /* vm_jump_cell_block was successful */
     this->vm->hop_channel += HOP_SEEK;
   }
   pthread_mutex_unlock(&this->vm_lock);


=====================================
src/vm/decoder.c
=====================================
@@ -504,7 +504,7 @@ static int32_t eval_jump_instruction(command_t* command, int32_t cond, link_t *r
   return 0;
 }
 
-/* Evaluate a set sytem register instruction
+/* Evaluate a set system register instruction
    May contain a link so return the same as eval_link */
 static int32_t eval_system_set(command_t* command, int32_t cond, link_t *return_values) {
   int32_t i;
@@ -708,7 +708,7 @@ static int32_t eval_command(uint8_t *bytes, registers_t* registers, link_t *retu
       if(res)
         res = -1;
       break;
-    case 6: /*  Compare -> Set, allways Link Sub-Instruction */
+    case 6: /*  Compare -> Set, always Link Sub-Instruction */
       /* FIXME: These are wrong. Need to be updated from vmcmd.c */
       cond = eval_if_version_4(&command);
       eval_set_version_2(&command, cond);


=====================================
src/vm/vm.c
=====================================
@@ -257,7 +257,7 @@ fail:
 
 int ifoOpenNewVTSI(vm_t *vm, dvd_reader_t *dvd, int vtsN) {
   if(vm->state.vtsN == vtsN) {
-    return 1; /*  We alread have it */
+    return 1; /*  We already have it */
   }
 
   if(vm->vtsi != NULL)
@@ -376,7 +376,7 @@ int vm_reset(vm_t *vm, const char *dvdroot,
   memset(vm->state.registers.GPRM_mode, 0, sizeof(vm->state.registers.GPRM_mode));
   memset(vm->state.registers.GPRM_mode, 0, sizeof(vm->state.registers.GPRM_mode));
   memset(vm->state.registers.GPRM_time, 0, sizeof(vm->state.registers.GPRM_time));
-  vm->state.registers.SPRM[0]  = ('e'<<8)|'n'; /* Player Menu Languange code */
+  vm->state.registers.SPRM[0]  = ('e'<<8)|'n'; /* Player Menu Language code */
   vm->state.AST_REG            = 15;           /* 15 why? */
   vm->state.SPST_REG           = 62;           /* 62 why? */
   vm->state.AGL_REG            = 1;
@@ -630,7 +630,7 @@ int vm_jump_title_program(vm_t *vm, int title, int pgcn, int pgn) {
   /* process_command(vm, play_PGC_PG(vm, vm->state.pgN)); */
   link = play_PGC_PG(vm, vm->state.pgN);
   if (link.command != PlayThis)
-    /* jump occured -> ignore it and play the PG anyway */
+    /* jump occurred -> ignore it and play the PG anyway */
     process_command(vm, play_PG(vm));
   else
     process_command(vm, link);
@@ -648,7 +648,7 @@ int vm_jump_title_part(vm_t *vm, int title, int part) {
   /* process_command(vm, play_PGC_PG(vm, vm->state.pgN)); */
   link = play_PGC_PG(vm, vm->state.pgN);
   if (link.command != PlayThis)
-    /* jump occured -> ignore it and play the PG anyway */
+    /* jump occurred -> ignore it and play the PG anyway */
     process_command(vm, play_PG(vm));
   else
     process_command(vm, link);
@@ -747,7 +747,7 @@ int vm_exec_cmd(vm_t *vm, vm_cmd_t *cmd) {
   if(vmEval_CMD(cmd, 1, &vm->state.registers, &link_values))
     return process_command(vm, link_values);
   else
-    return 0; /*  It updated some state thats all... */
+    return 0; /*  It updated some state that's all... */
 }
 
 /* link processing */


=====================================
src/vm/vm.h
=====================================
@@ -33,7 +33,7 @@ typedef struct {
   int       vtsN;         /* 0 is vmgm? */
   pgc_t    *pgc;          /* either this or 'int pgcN' is enough? */
   int       pgcN;         /* but provide pgcN for quick lookup */
-  int       pgN;          /* is this needed? can allways fid pgN from cellN? */
+  int       pgN;          /* is this needed? can always fid pgN from cellN? */
   int       cellN;
   int32_t   cell_restart; /* get cell to restart */
   int       blockN;


=====================================
src/vm/vmcmd.c
=====================================
@@ -484,7 +484,7 @@ void vm_print_mnemonic(vm_cmd_t *vm_command)  {
         print_jump_instruction(&command);
       } else {
         print_if_version_1(&command);
-        print_link_instruction(&command, 0); /*  must be pressent */
+        print_link_instruction(&command, 0); /*  must be present */
       }
       break;
     case 2: /*  Set System Parameters instructions */


=====================================
src/vm/vmget.c
=====================================
@@ -217,7 +217,7 @@ void vm_get_angle_info(vm_t *vm, int *current, int *num_avail) {
 
   if((vm->state).domain == DVD_DOMAIN_VTSTitle) {
     title_info_t *title;
-    /* TTN_REG does not allways point to the correct title.. */
+    /* TTN_REG does not always point to the correct title.. */
     if((vm->state).TTN_REG > vm->vmgi->tt_srpt->nr_of_srpts)
       return;
     title = &vm->vmgi->tt_srpt->title[(vm->state).TTN_REG - 1];



View it on GitLab: https://code.videolan.org/videolan/libdvdnav/-/commit/253c4376572193dd55bbf73ac4e0f080b7ae09e3

-- 
View it on GitLab: https://code.videolan.org/videolan/libdvdnav/-/commit/253c4376572193dd55bbf73ac4e0f080b7ae09e3
You're receiving this email because of your account on code.videolan.org.




More information about the libdvdnav-devel mailing list