You are here

function getid3_token_info in getID3() 7

Same name and namespace in other branches
  1. 7.2 getid3.tokens.inc \getid3_token_info()

Implements hook_token_info().

File

./getid3.tokens.inc, line 10
Builds placeholder replacement tokens for files.

Code

function getid3_token_info() {
  $file = array(
    'width' => array(
      'name' => t("Width"),
      'description' => t("Width of a video or image file in pixels."),
    ),
    'height' => array(
      'name' => t("Height"),
      'description' => t("Height of a video or image file in pixels."),
    ),
    'duration' => array(
      'name' => t("Duration"),
      'description' => t("The duration of audio or video files, in seconds."),
    ),
    'audio-format' => array(
      'name' => t("Audio format"),
      'description' => t("The audio format."),
    ),
    'audio-sample-rate' => array(
      'name' => t("Audio sample rate"),
      'description' => t("The sample rate of the audio. TODO: ??? format?"),
    ),
    'audio-channel-mode' => array(
      'name' => t("Audio channel mode"),
      'description' => t("The number of channels in the audio, by name: stereo or mono."),
    ),
    'audio-bitrate' => array(
      'name' => t("Audio bitrate"),
      'description' => t("The audio bitrate."),
    ),
    'audio-bitrate-mode' => array(
      'name' => t("Audio bitrate mode"),
      'description' => t("The audio bitrate mode: cbr, vbr, abr."),
    ),
  );

  // TODO: ID3 tags
  return array(
    'tokens' => array(
      'file' => $file,
    ),
  );
}