PageRenderTime 23ms CodeModel.GetById 14ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/src/Zend/Media/Iso14496/Box/Sinf.php

http://php-reader.googlecode.com/
PHP | 87 lines | 14 code | 4 blank | 69 comment | 1 complexity | 5d2689ae2b7d6295d8e2bc4aa4d981d6 MD5 | raw file
 1<?php
 2/**
 3 * Zend Framework
 4 *
 5 * LICENSE
 6 *
 7 * This source file is subject to the new BSD license that is bundled
 8 * with this package in the file LICENSE.txt.
 9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
26 *
27 * @category   Zend
28 * @package    Zend_Media
29 * @subpackage ISO14496
30 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) 
31 * @license    http://framework.zend.com/license/new-bsd     New BSD License
32 * @version    $Id: Sinf.php 177 2010-03-09 13:13:34Z svollbehr $
33 */
34
35/**#@+ @ignore */
36require_once 'Zend/Media/Iso14496/Box.php';
37/**#@-*/
38
39/**
40 * The <i>Protection Scheme Information Box</i> contains all the information
41 * required both to understand the encryption transform applied and its
42 * parameters, and also to find other information such as the kind and location
43 * of the key management system. It also documents the original (unencrypted)
44 * format of the media. The Protection Scheme Info Box is a container Box. It is
45 * mandatory in a sample entry that uses a code indicating a protected stream.
46 *
47 * When used in a protected sample entry, this box must contain the original
48 * format box to document the original format. At least one of the following
49 * signaling methods must be used to identify the protection applied:
50 *
51 *  a) MPEG-4 systems with IPMP: no other boxes, when IPMP descriptors in MPEG-4
52 *     systems streams are used;
53 *  b) Standalone IPMP: an {@link Zend_Media_Iso14496_Box_Imif IPMP Info Box},
54 *     when IPMP descriptors outside MPEG-4 systems are used;
55 *  c) Scheme signaling: a {@link Zend_Media_Iso14496_Box_Schm Scheme Type Box}
56 *     and {@link Zend_Media_Iso14496_Box_Schi Scheme Information Box}, when
57 *     these are used (either both must occur, or neither).
58 *
59 * @category   Zend
60 * @package    Zend_Media
61 * @subpackage ISO14496
62 * @author     Sven Vollbehr <sven@vollbehr.eu>
63 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) 
64 * @license    http://framework.zend.com/license/new-bsd     New BSD License
65 * @version    $Id: Sinf.php 177 2010-03-09 13:13:34Z svollbehr $
66 */
67final class Zend_Media_Iso14496_Box_Sinf extends Zend_Media_Iso14496_Box
68{
69    /**
70     * Constructs the class with given parameters and reads box related data
71     * from the ISO Base Media file.
72     *
73     * @param Zend_Io_Reader $reader  The reader object.
74     * @param Array          $options The options array.
75     */
76    public function __construct($reader = null, &$options = array())
77    {
78        parent::__construct($reader, $options);
79        $this->setContainer(true);
80
81        if ($reader === null) {
82            return;
83        }
84
85        $this->constructBoxes();
86    }
87}