public class MpegTransportStreamMetadataExtractor extends Object
Constructor and Description |
---|
MpegTransportStreamMetadataExtractor(com.google.common.io.ByteSource byteSource)
Constructs an
MpegTransportStreamMetadataExtractor with the given ByteSource as
the provider of the transport stream bytes. |
Modifier and Type | Method and Description |
---|---|
Map<Integer,List<byte[]>> |
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.
|
void |
getMetadata(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.
|
public MpegTransportStreamMetadataExtractor(com.google.common.io.ByteSource byteSource)
MpegTransportStreamMetadataExtractor
with the given ByteSource
as
the provider of the transport stream bytes.byteSource
- the ByteSource
providing the transport stream bytespublic void getMetadata(BiConsumer<Integer,byte[]> callback) throws Exception
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 payloadException
- if an error occurs while parsing the transport streamThis work is licensed under a Creative Commons Attribution 4.0 International License.