Home | History | Annotate | Download | only in authoring
      1 /*
      2  * Copyright 2012 Sebastian Annies, Hamburg
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the License);
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *     http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an AS IS BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 package com.googlecode.mp4parser.authoring;
     17 
     18 import java.util.Date;
     19 
     20 /**
     21  *
     22  */
     23 public class TrackMetaData implements Cloneable {
     24     private String language;
     25     private long timescale;
     26     private Date modificationTime = new Date();
     27     private Date creationTime = new Date();
     28     private double width;
     29     private double height;
     30     private float volume;
     31     private long trackId = 1; // zero is not allowed
     32     private int group = 0;
     33     private long[] matrix = new long[]{0x00010000, 0, 0, 0, 0x00010000, 0, 0, 0, 0x40000000};
     34 
     35 
     36     /**
     37      * specifies the front-to-back ordering of video tracks; tracks with lower
     38      * numbers are closer to the viewer. 0 is the normal value, and -1 would be
     39      * in front of track 0, and so on.
     40      */
     41     int layer;
     42 
     43     public String getLanguage() {
     44         return language;
     45     }
     46 
     47     public void setLanguage(String language) {
     48         this.language = language;
     49     }
     50 
     51     public long getTimescale() {
     52         return timescale;
     53     }
     54 
     55     public void setTimescale(long timescale) {
     56         this.timescale = timescale;
     57     }
     58 
     59     public Date getModificationTime() {
     60         return modificationTime;
     61     }
     62 
     63     public void setModificationTime(Date modificationTime) {
     64         this.modificationTime = modificationTime;
     65     }
     66 
     67     public Date getCreationTime() {
     68         return creationTime;
     69     }
     70 
     71     public void setCreationTime(Date creationTime) {
     72         this.creationTime = creationTime;
     73     }
     74 
     75     public double getWidth() {
     76         return width;
     77     }
     78 
     79     public void setWidth(double width) {
     80         this.width = width;
     81     }
     82 
     83     public long[] getMatrix() {
     84         return matrix;
     85     }
     86 
     87     public void setMatrix(long[] m) {
     88         this.matrix = m;
     89     }
     90 
     91     public double getHeight() {
     92         return height;
     93     }
     94 
     95     public void setHeight(double height) {
     96         this.height = height;
     97     }
     98 
     99     public long getTrackId() {
    100         return trackId;
    101     }
    102 
    103     public void setTrackId(long trackId) {
    104         this.trackId = trackId;
    105     }
    106 
    107     public int getLayer() {
    108         return layer;
    109     }
    110 
    111     public void setLayer(int layer) {
    112         this.layer = layer;
    113     }
    114 
    115     public float getVolume() {
    116         return volume;
    117     }
    118 
    119     public void setVolume(float volume) {
    120         this.volume = volume;
    121     }
    122 
    123     public int getGroup() {
    124         return group;
    125     }
    126 
    127     public void setGroup(int group) {
    128         this.group = group;
    129     }
    130 
    131     public Object clone() {
    132         try {
    133             return super.clone();
    134         } catch (CloneNotSupportedException e) {
    135             return null;
    136         }
    137     }
    138 
    139 }
    140