Class MpegTransportStreamMetadataExtractor
java.lang.Object
org.codice.ddf.libs.mpeg.transport.MpegTransportStreamMetadataExtractor
This class is for extracting arbitrary metadata (as raw bytes) from an MPEG transport stream.
-
Constructor Summary
ConstructorsConstructorDescriptionMpegTransportStreamMetadataExtractor(com.google.common.io.ByteSource byteSource) Constructs anMpegTransportStreamMetadataExtractorwith the givenByteSourceas the provider of the transport stream bytes. -
Method Summary
Modifier and TypeMethodDescriptionParses the transport stream and returns all the metadata packet payloads (in the order in which they were encountered) that belong to each metadata stream.voidgetMetadata(BiConsumer<Integer, byte[]> callback) Parses the transport stream and calls the given callback for each metadata packet in each metadata stream found in the transport stream.
-
Constructor Details
-
MpegTransportStreamMetadataExtractor
public MpegTransportStreamMetadataExtractor(com.google.common.io.ByteSource byteSource) Constructs anMpegTransportStreamMetadataExtractorwith the givenByteSourceas the provider of the transport stream bytes.- Parameters:
byteSource- theByteSourceproviding the transport stream bytes
-
-
Method Details
-
getMetadata
Parses the transport stream and calls the given callback for each metadata packet in each metadata stream found in the transport stream. The callback is called immediately upon finding a complete metadata packet.- Parameters:
callback- a callback that will be called for each metadata packet in each metadata stream found in the transport stream, where the first parameter is the packet ID of the metadata stream and the second parameter is the metadata packet's payload- Throws:
Exception- if an error occurs while parsing the transport stream
-
getMetadata
Parses the transport stream and returns all the metadata packet payloads (in the order in which they were encountered) that belong to each metadata stream.
-