Debian Codegraph @

src/com/drew/metadata/mov/media/QuickTimeTimecodeHandler.java

raw symbols SCIP
1 /*
2 * Copyright 2002-2019 Drew Noakes and contributors
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 * More information about this project is available at:
17 *
18 * https://drewnoakes.com/code/exif/
19 * https://github.com/drewnoakes/metadata-extractor
20 */
21 package com.drew.metadata.mov.media;
22
23 import com.drew.lang.SequentialReader;
24 import com.drew.lang.annotations.NotNull;
25 import com.drew.metadata.Metadata;
26 import com.drew.metadata.mov.QuickTimeAtomTypes;
27 import com.drew.metadata.mov.QuickTimeContext;
28 import com.drew.metadata.mov.QuickTimeMediaHandler;
29 import com.drew.metadata.mov.atoms.Atom;
30 import com.drew.metadata.mov.atoms.TimecodeInformationMediaAtom;
31 import com.drew.metadata.mov.atoms.TimecodeSampleDescriptionAtom;
32
33 import java.io.IOException;
34
35 /**
36 * @author Payton Garland
37 */
38 public class QuickTimeTimecodeHandler extends QuickTimeMediaHandler<QuickTimeTimecodeDirectory>
39 {
40 public QuickTimeTimecodeHandler(Metadata metadata, QuickTimeContext context)
41 {
42 super(metadata, context);
43 }
44
45 @NotNull
46 @Override
47 protected QuickTimeTimecodeDirectory createDirectory()
48 {
49 return new QuickTimeTimecodeDirectory();
50 }
51
52 @Override
53 protected String getMediaInformation()
54 {
55 return QuickTimeAtomTypes.ATOM_TIMECODE_MEDIA_INFO;
56 }
57
58 @Override
59 public void processSampleDescription(@NotNull SequentialReader reader, @NotNull Atom atom) throws IOException
60 {
61 TimecodeSampleDescriptionAtom timecodeSampleDescriptionAtom = new TimecodeSampleDescriptionAtom(reader, atom);
62 timecodeSampleDescriptionAtom.addMetadata(directory);
63 }
64
65 @Override
66 public void processMediaInformation(@NotNull SequentialReader reader, @NotNull Atom atom) throws IOException
67 {
68 TimecodeInformationMediaAtom timecodeInformationMediaAtom = new TimecodeInformationMediaAtom(reader, atom);
69 timecodeInformationMediaAtom.addMetadata(directory);
70 }
71
72 @Override
73 protected void processTimeToSample(@NotNull SequentialReader reader, @NotNull Atom atom, QuickTimeContext context) throws IOException
74 {
75 // Do nothing
76 }
77 }