Remove databox subde mediatypes

This commit is contained in:
Romain Neutron
2012-04-24 16:19:37 +02:00
parent 284869b5bf
commit 722c094b5f
7 changed files with 0 additions and 456 deletions

View File

@@ -1,42 +0,0 @@
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class databox_subdef_mediatype_audio extends databox_subdef_mediatypeAbstract implements databox_subdef_mediatypeInterface
{
/**
*
* @return databox_subdef_mediatype_audio
*/
public function __construct()
{
return $this;
}
/**
*
* @param databox_subdefAbstract $subdef
* @return array
*/
public function get_available_options(databox_subdefAbstract $subdef)
{
$options = array();
return $options;
}
}

View File

@@ -1,42 +0,0 @@
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class databox_subdef_mediatype_flexpaper extends databox_subdef_mediatypeAbstract implements databox_subdef_mediatypeInterface
{
/**
*
* @return databox_subdef_mediatype_flexpaper
*/
public function __construct()
{
return $this;
}
/**
*
* @param databox_subdefAbstract $subdef
* @return array
*/
public function get_available_options(databox_subdefAbstract $subdef)
{
$options = array();
return $options;
}
}

View File

@@ -1,75 +0,0 @@
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class databox_subdef_mediatype_gif extends databox_subdef_mediatypeAbstract implements databox_subdef_mediatypeInterface
{
/**
*
* @var integer
*/
protected $size;
/**
*
* @var integer
*/
protected $delay;
/**
*
* @param int $size
* @param int $delay
* @return databox_subdef_mediatype_gif
*/
public function __construct($size=null, $delay=null)
{
$this->size = $size;
$this->delay = $delay;
return $this;
}
/**
*
* @param databox_subdefAbstract $subdef
* @return array
*/
public function get_available_options(databox_subdefAbstract $subdef)
{
$options = array(
'size' => array(
'type' => 'range',
'step' => 1,
'min' => 20,
'max' => 500,
'value' => $this->size,
'default' => 200
),
'delay' => array(
'type' => 'range',
'step' => 1,
'min' => 1,
'max' => 3,
'value' => $this->delay,
'default' => 1
)
);
return $options;
}
}

View File

@@ -1,104 +0,0 @@
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class databox_subdef_mediatype_image extends databox_subdef_mediatypeAbstract implements databox_subdef_mediatypeInterface
{
/**
*
* @var integer
*/
protected $size;
/**
*
* @var integer
*/
protected $resolution;
/**
*
* @var boolean
*/
protected $strip;
/**
*
* @var integer
*/
protected $quality;
/**
*
* @param int $size
* @param int $resolution
* @param boolean $strip
* @param int $quality
* @return databox_subdef_mediatype_image
*/
public function __construct($size=null, $resolution=null, $strip=null, $quality=null)
{
$this->size = $size;
$this->resolution = $resolution;
$this->strip = $strip;
$this->quality = $quality;
return $this;
}
/**
*
* @param databox_subdefAbstract $subdef
* @return array
*/
public function get_available_options(databox_subdefAbstract $subdef)
{
$options = array(
'size' => array(
'type' => 'range',
'step' => 1,
'min' => ($subdef->get_class() == 'thumbnail' ? 20 : 150),
'max' => ($subdef->get_class() == 'thumbnail' ? 400 : 3000),
'default' => ($subdef->get_class() == 'thumbnail' ? 200 : 800),
'value' => $this->size
),
'resolution' => array(
'type' => 'range',
'step' => 1,
'min' => 50,
'max' => 300,
'default' => 72,
'value' => $this->resolution
),
'strip' => array(
'type' => 'boolean',
'default' => ($subdef->get_class() == 'thumbnail'),
'value' => $this->strip
),
'quality' => array(
'type' => 'range',
'step' => 1,
'min' => 0,
'max' => 100,
'default' => 75,
'value' => $this->quality
)
);
return $options;
}
}

View File

@@ -1,132 +0,0 @@
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class databox_subdef_mediatype_video extends databox_subdef_mediatypeAbstract implements databox_subdef_mediatypeInterface
{
/**
*
* @var int
*/
protected $size;
/**
*
* @var int
*/
protected $fps;
/**
*
* @var int
*/
protected $threads;
/**
*
* @var int
*/
protected $bitrate;
/**
*
* @var string
*/
protected $v_codec;
/**
*
* @var string
*/
protected $a_codec;
/**
*
* @param int $size
* @param int $fps
* @param int $threads
* @param int $bitrate
* @param string $acodec
* @param string $vcodec
* @return databox_subdef_mediatype_video
*/
public function __construct($size=null, $fps=null, $threads=null, $bitrate=null, $acodec=null, $vcodec=null)
{
$this->size = $size;
$this->fps = $fps;
$this->threads = $threads;
$this->bitrate = $bitrate;
$this->a_codec = $acodec;
$this->v_codec = $vcodec;
return $this;
}
/**
*
* @param databox_subdefAbstract $subdef
* @return array
*/
public function get_available_options(databox_subdefAbstract $subdef)
{
$options = array(
'size' => array(
'type' => 'range',
'step' => 16,
'min' => 100,
'max' => 1000,
'value' => $this->size,
'default' => 600
),
'fps' => array(
'type' => 'range',
'step' => 1,
'min' => 1,
'max' => 200,
'value' => $this->fps,
'default' => 20
),
'threads' => array(
'type' => 'range',
'step' => 1,
'min' => 1,
'max' => 16,
'value' => $this->threads,
'default' => 1
),
'bitrate' => array(
'type' => 'range',
'step' => 1,
'min' => 100,
'max' => 4000,
'value' => $this->bitrate,
'default' => '800'
),
'a_codec' => array(
'type' => 'enum',
'values' => array('faac', 'mp3'),
'value' => $this->a_codec,
'default' => 'faac'
),
'v_codec' => array(
'type' => 'enum',
'values' => array('libx264', 'flv'),
'value' => $this->v_codec,
'default' => 'libx264'
)
);
return $options;
}
}

View File

@@ -1,38 +0,0 @@
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
abstract class databox_subdef_mediatypeAbstract
{
/**
*
* @param databox_subdefAbstract $subdef
* @return Array
*/
public function get_options(databox_subdefAbstract $subdef)
{
$options = array();
$full_options = $this->get_available_options($subdef);
foreach ($full_options as $opt_name => $values)
{
$options[$opt_name] = $values['value'];
}
return $options;
}
}

View File

@@ -1,23 +0,0 @@
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
interface databox_subdef_mediatypeInterface
{
public function get_available_options(databox_subdefAbstract $subdef);
public function get_options(databox_subdefAbstract $subdef);
}