• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2008 CoreMedia AG, 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 
17 package com.coremedia.iso.boxes;
18 
19 
20 import com.googlecode.mp4parser.AbstractContainerBox;
21 
22 /**
23  * The media declaration container contains all the objects that declare information about the media data within a
24  * track.
25  */
26 public class MediaBox extends AbstractContainerBox {
27     public static final String TYPE = "mdia";
28 
MediaBox()29     public MediaBox() {
30         super(TYPE);
31     }
32 
getMediaInformationBox()33     public MediaInformationBox getMediaInformationBox() {
34         for (Box box : boxes) {
35             if (box instanceof MediaInformationBox) {
36                 return (MediaInformationBox) box;
37             }
38         }
39         return null;
40     }
41 
getMediaHeaderBox()42     public MediaHeaderBox getMediaHeaderBox() {
43         for (Box box : boxes) {
44             if (box instanceof MediaHeaderBox) {
45                 return (MediaHeaderBox) box;
46             }
47         }
48         return null;
49     }
50 
getHandlerBox()51     public HandlerBox getHandlerBox() {
52         for (Box box : boxes) {
53             if (box instanceof HandlerBox) {
54                 return (HandlerBox) box;
55             }
56         }
57         return null;
58     }
59 
60 
61 }
62