View Javadoc
1   /*
2    * Licensed to The Apereo Foundation under one or more contributor license
3    * agreements. See the NOTICE file distributed with this work for additional
4    * information regarding copyright ownership.
5    *
6    *
7    * The Apereo Foundation licenses this file to you under the Educational
8    * Community License, Version 2.0 (the "License"); you may not use this file
9    * except in compliance with the License. You may obtain a copy of the License
10   * at:
11   *
12   *   http://opensource.org/licenses/ecl2.txt
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
17   * License for the specific language governing permissions and limitations under
18   * the License.
19   *
20   */
21  
22  
23  package org.opencastproject.inspection.ffmpeg.api;
24  
25  import org.opencastproject.mediapackage.track.BitRateMode;
26  
27  /**
28   * Common metadata for all kind of temporal media.
29   */
30  public abstract class TemporalMetadata extends CommonMetadata {
31  
32    // ms
33    protected Long duration;
34  
35    protected BitRateMode bitRateMode;
36    // b/s
37    protected Float bitRate;
38    protected Float bitRateMinimum;
39    protected Float bitRateMaximum;
40    protected Float bitRateNominal;
41  
42    public Long getDuration() {
43      return duration;
44    }
45  
46    public void setDuration(Long duration) {
47      this.duration = duration;
48    }
49  
50    public BitRateMode getBitRateMode() {
51      return bitRateMode;
52    }
53  
54    public void setBitRateMode(BitRateMode bitRateMode) {
55      this.bitRateMode = bitRateMode;
56    }
57  
58    /** Returns the bit rate in bits per second. */
59    public Float getBitRate() {
60      return bitRate;
61    }
62  
63    public void setBitRate(Float bitRate) {
64      this.bitRate = bitRate;
65    }
66  
67    /** Returns the maximum bit rate in bits per second. */
68    public Float getBitRateMinimum() {
69      return bitRateMinimum;
70    }
71  
72    public void setBitRateMinimum(Float bitRateMinimum) {
73      this.bitRateMinimum = bitRateMinimum;
74    }
75  
76    public Float getBitRateMaximum() {
77      return bitRateMaximum;
78    }
79  
80    public void setBitRateMaximum(Float bitRateMaximum) {
81      this.bitRateMaximum = bitRateMaximum;
82    }
83  
84    /**
85     * Returns the nominal bit rate in bits per second.
86     */
87    public Float getBitRateNominal() {
88      return bitRateNominal;
89    }
90  
91    public void setBitRateNominal(Float bitRateNominal) {
92      this.bitRateNominal = bitRateNominal;
93    }
94  }