ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMediaAnalyzer Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilMediaAnalyzer:

Public Member Functions

 __construct ()
 
 setFile (string $a_file)
 Set Full File Path. More...
 
 getFile ()
 
 getPlaytimeString ()
 Get PlaytimeString. More...
 
 getPlaytimeSeconds ()
 
 analyzeFile ()
 Analyze current file. More...
 

Data Fields

string $file
 

Protected Attributes

array $file_info
 
getID3 $getid3
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Analyzes media files. Wrapper for getid3 library.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilMediaAnalyzer.php.

Constructor & Destructor Documentation

◆ __construct()

ilMediaAnalyzer::__construct ( )

Definition at line 30 of file class.ilMediaAnalyzer.php.

31  {
32  $this->getid3 = new getID3();
33  }

Member Function Documentation

◆ analyzeFile()

ilMediaAnalyzer::analyzeFile ( )

Analyze current file.

Definition at line 64 of file class.ilMediaAnalyzer.php.

References getFile().

64  : void
65  {
66  $this->file_info = $this->getid3->analyze($this->getFile());
67  }
+ Here is the call graph for this function:

◆ getFile()

ilMediaAnalyzer::getFile ( )

Definition at line 43 of file class.ilMediaAnalyzer.php.

References $file.

Referenced by analyzeFile().

43  : string
44  {
45  return $this->file;
46  }
+ Here is the caller graph for this function:

◆ getPlaytimeSeconds()

ilMediaAnalyzer::getPlaytimeSeconds ( )

Definition at line 56 of file class.ilMediaAnalyzer.php.

56  : int
57  {
58  return (int) ($this->file_info["playtime_seconds"] ?? 0);
59  }

◆ getPlaytimeString()

ilMediaAnalyzer::getPlaytimeString ( )

Get PlaytimeString.

Definition at line 51 of file class.ilMediaAnalyzer.php.

51  : string
52  {
53  return $this->file_info["playtime_string"];
54  }

◆ setFile()

ilMediaAnalyzer::setFile ( string  $a_file)

Set Full File Path.

Definition at line 38 of file class.ilMediaAnalyzer.php.

38  : void
39  {
40  $this->file = $a_file;
41  }

Field Documentation

◆ $file

string ilMediaAnalyzer::$file

Definition at line 28 of file class.ilMediaAnalyzer.php.

Referenced by getFile().

◆ $file_info

array ilMediaAnalyzer::$file_info
protected

Definition at line 26 of file class.ilMediaAnalyzer.php.

◆ $getid3

getID3 ilMediaAnalyzer::$getid3
protected

Definition at line 27 of file class.ilMediaAnalyzer.php.


The documentation for this class was generated from the following file: