[SPIP] v3.2.1-->v3.2.3
[lhc/web/www.git] / www / plugins-dist / medias / lib / getid3 / module.audio-video.nsv.php
index eab601b..68a2ca1 100644 (file)
@@ -1,11 +1,11 @@
 <?php
+
 /////////////////////////////////////////////////////////////////
 /// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details                             //
+//  available at https://github.com/JamesHeinrich/getID3       //
+//            or https://www.getid3.org                        //
+//            or http://getid3.sourceforge.net                 //
+//  see readme.txt for more details                            //
 /////////////////////////////////////////////////////////////////
 //                                                             //
 // module.audio.nsv.php                                        //
@@ -17,7 +17,9 @@
 
 class getid3_nsv extends getid3_handler
 {
-
+       /**
+        * @return bool
+        */
        public function Analyze() {
                $info = &$this->getid3->info;
 
@@ -59,6 +61,11 @@ class getid3_nsv extends getid3_handler
                return true;
        }
 
+       /**
+        * @param int $fileoffset
+        *
+        * @return bool
+        */
        public function getNSVsHeaderFilepointer($fileoffset) {
                $info = &$this->getid3->info;
                $this->fseek($fileoffset);
@@ -132,6 +139,12 @@ class getid3_nsv extends getid3_handler
                return true;
        }
 
+       /**
+        * @param int  $fileoffset
+        * @param bool $getTOCoffsets
+        *
+        * @return bool
+        */
        public function getNSVfHeaderFilepointer($fileoffset, $getTOCoffsets=false) {
                $info = &$this->getid3->info;
                $this->fseek($fileoffset);
@@ -205,18 +218,22 @@ class getid3_nsv extends getid3_handler
                return true;
        }
 
-
+       /**
+        * @param int $framerateindex
+        *
+        * @return float|false
+        */
        public static function NSVframerateLookup($framerateindex) {
                if ($framerateindex <= 127) {
                        return (float) $framerateindex;
                }
                static $NSVframerateLookup = array();
                if (empty($NSVframerateLookup)) {
-                       $NSVframerateLookup[129] = (float) 29.970;
-                       $NSVframerateLookup[131] = (float) 23.976;
-                       $NSVframerateLookup[133] = (float) 14.985;
-                       $NSVframerateLookup[197] = (float) 59.940;
-                       $NSVframerateLookup[199] = (float) 47.952;
+                       $NSVframerateLookup[129] = 29.970;
+                       $NSVframerateLookup[131] = 23.976;
+                       $NSVframerateLookup[133] = 14.985;
+                       $NSVframerateLookup[197] = 59.940;
+                       $NSVframerateLookup[199] = 47.952;
                }
                return (isset($NSVframerateLookup[$framerateindex]) ? $NSVframerateLookup[$framerateindex] : false);
        }