TrackMetaData.java revision dd9eb897ee7c7b507cbdcf80263bb4b5de6966bf
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 */
16package com.googlecode.mp4parser.authoring;
17
18import java.util.Date;
19
20/**
21 *
22 */
23public 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
34
35    /**
36     * specifies the front-to-back ordering of video tracks; tracks with lower
37     * numbers are closer to the viewer. 0 is the normal value, and -1 would be
38     * in front of track 0, and so on.
39     */
40    int layer;
41
42    public String getLanguage() {
43        return language;
44    }
45
46    public void setLanguage(String language) {
47        this.language = language;
48    }
49
50    public long getTimescale() {
51        return timescale;
52    }
53
54    public void setTimescale(long timescale) {
55        this.timescale = timescale;
56    }
57
58    public Date getModificationTime() {
59        return modificationTime;
60    }
61
62    public void setModificationTime(Date modificationTime) {
63        this.modificationTime = modificationTime;
64    }
65
66    public Date getCreationTime() {
67        return creationTime;
68    }
69
70    public void setCreationTime(Date creationTime) {
71        this.creationTime = creationTime;
72    }
73
74    public double getWidth() {
75        return width;
76    }
77
78    public void setWidth(double width) {
79        this.width = width;
80    }
81
82    public double getHeight() {
83        return height;
84    }
85
86    public void setHeight(double height) {
87        this.height = height;
88    }
89
90    public long getTrackId() {
91        return trackId;
92    }
93
94    public void setTrackId(long trackId) {
95        this.trackId = trackId;
96    }
97
98    public int getLayer() {
99        return layer;
100    }
101
102    public void setLayer(int layer) {
103        this.layer = layer;
104    }
105
106    public float getVolume() {
107        return volume;
108    }
109
110    public void setVolume(float volume) {
111        this.volume = volume;
112    }
113
114    public int getGroup() {
115        return group;
116    }
117
118    public void setGroup(int group) {
119        this.group = group;
120    }
121
122    public Object clone() {
123        try {
124            return super.clone();
125        } catch (CloneNotSupportedException e) {
126            return null;
127        }
128    }
129
130}
131