| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 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 |
|
| 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 |
|
| 76 |
} |
| 77 |
} |