• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
getLanguage()43     public String getLanguage() {
44         return language;
45     }
46 
setLanguage(String language)47     public void setLanguage(String language) {
48         this.language = language;
49     }
50 
getTimescale()51     public long getTimescale() {
52         return timescale;
53     }
54 
setTimescale(long timescale)55     public void setTimescale(long timescale) {
56         this.timescale = timescale;
57     }
58 
getModificationTime()59     public Date getModificationTime() {
60         return modificationTime;
61     }
62 
setModificationTime(Date modificationTime)63     public void setModificationTime(Date modificationTime) {
64         this.modificationTime = modificationTime;
65     }
66 
getCreationTime()67     public Date getCreationTime() {
68         return creationTime;
69     }
70 
setCreationTime(Date creationTime)71     public void setCreationTime(Date creationTime) {
72         this.creationTime = creationTime;
73     }
74 
getWidth()75     public double getWidth() {
76         return width;
77     }
78 
setWidth(double width)79     public void setWidth(double width) {
80         this.width = width;
81     }
82 
getMatrix()83     public long[] getMatrix() {
84         return matrix;
85     }
86 
setMatrix(long[] m)87     public void setMatrix(long[] m) {
88         this.matrix = m;
89     }
90 
getHeight()91     public double getHeight() {
92         return height;
93     }
94 
setHeight(double height)95     public void setHeight(double height) {
96         this.height = height;
97     }
98 
getTrackId()99     public long getTrackId() {
100         return trackId;
101     }
102 
setTrackId(long trackId)103     public void setTrackId(long trackId) {
104         this.trackId = trackId;
105     }
106 
getLayer()107     public int getLayer() {
108         return layer;
109     }
110 
setLayer(int layer)111     public void setLayer(int layer) {
112         this.layer = layer;
113     }
114 
getVolume()115     public float getVolume() {
116         return volume;
117     }
118 
setVolume(float volume)119     public void setVolume(float volume) {
120         this.volume = volume;
121     }
122 
getGroup()123     public int getGroup() {
124         return group;
125     }
126 
setGroup(int group)127     public void setGroup(int group) {
128         this.group = group;
129     }
130 
clone()131     public Object clone() {
132         try {
133             return super.clone();
134         } catch (CloneNotSupportedException e) {
135             return null;
136         }
137     }
138 
139 }
140