From dad1c31db8d507f1e3c6a948c820991f41c62b38 Mon Sep 17 00:00:00 2001 From: trav90 Date: Fri, 28 Sep 2018 22:59:06 -0500 Subject: Update libnestegg from upstream --- media/libnestegg/include/nestegg.h | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'media/libnestegg/include') diff --git a/media/libnestegg/include/nestegg.h b/media/libnestegg/include/nestegg.h index d91483b93..2baa50bc5 100644 --- a/media/libnestegg/include/nestegg.h +++ b/media/libnestegg/include/nestegg.h @@ -27,7 +27,7 @@ extern "C" { @code nestegg * demux_ctx; - nestegg_init(&demux_ctx, io, NULL); + nestegg_init(&demux_ctx, io, NULL, -1); nestegg_packet * pkt; while ((r = nestegg_read_packet(demux_ctx, &pkt)) > 0) { @@ -71,6 +71,7 @@ extern "C" { #define NESTEGG_CODEC_VORBIS 1 /**< Track uses Xiph Vorbis codec. */ #define NESTEGG_CODEC_VP9 2 /**< Track uses Google On2 VP9 codec. */ #define NESTEGG_CODEC_OPUS 3 /**< Track uses Xiph Opus codec. */ +#define NESTEGG_CODEC_AV1 4 /**< Track uses AOMedia AV1 codec. */ #define NESTEGG_CODEC_UNKNOWN INT_MAX /**< Track uses unknown codec. */ #define NESTEGG_VIDEO_MONO 0 /**< Track is mono video. */ @@ -92,9 +93,10 @@ extern "C" { #define NESTEGG_ENCODING_COMPRESSION 0 /**< Content encoding type is compression. */ #define NESTEGG_ENCODING_ENCRYPTION 1 /**< Content encoding type is encryption. */ -#define NESTEGG_PACKET_HAS_SIGNAL_BYTE_FALSE 0 /**< Packet does not have signal byte */ -#define NESTEGG_PACKET_HAS_SIGNAL_BYTE_UNENCRYPTED 1 /**< Packet has signal byte and is unencrypted */ -#define NESTEGG_PACKET_HAS_SIGNAL_BYTE_ENCRYPTED 2 /**< Packet has signal byte and is encrypted */ +#define NESTEGG_PACKET_HAS_SIGNAL_BYTE_FALSE 0 /**< Packet does not have signal byte */ +#define NESTEGG_PACKET_HAS_SIGNAL_BYTE_UNENCRYPTED 1 /**< Packet has signal byte and is unencrypted */ +#define NESTEGG_PACKET_HAS_SIGNAL_BYTE_ENCRYPTED 2 /**< Packet has signal byte and is encrypted */ +#define NESTEGG_PACKET_HAS_SIGNAL_BYTE_PARTITIONED 4 /**< Packet has signal byte and is partitioned */ #define NESTEGG_PACKET_HAS_KEYFRAME_FALSE 0 /**< Packet contains only keyframes. */ #define NESTEGG_PACKET_HAS_KEYFRAME_TRUE 1 /**< Packet does not contain any keyframes */ @@ -185,7 +187,7 @@ void nestegg_destroy(nestegg * context); int nestegg_duration(nestegg * context, uint64_t * duration); /** Query the tstamp scale of the media stream in nanoseconds. - @note Timecodes presented by nestegg have been scaled by this value + @note Timestamps presented by nestegg have been scaled by this value before presentation to the caller. @param context Stream context initialized by #nestegg_init. @param scale Storage for the queried scale factor. @@ -247,6 +249,7 @@ int nestegg_track_type(nestegg * context, unsigned int track); @param track Zero based track number. @retval #NESTEGG_CODEC_VP8 Track codec is VP8. @retval #NESTEGG_CODEC_VP9 Track codec is VP9. + @retval #NESTEGG_CODEC_AV1 Track codec is AV1. @retval #NESTEGG_CODEC_VORBIS Track codec is Vorbis. @retval #NESTEGG_CODEC_OPUS Track codec is Opus. @retval #NESTEGG_CODEC_UNKNOWN Track codec is unknown. @@ -363,7 +366,7 @@ int nestegg_packet_has_keyframe(nestegg_packet * packet); @retval -1 Error. */ int nestegg_packet_track(nestegg_packet * packet, unsigned int * track); -/** Query the time stamp in nanoseconds of @a packet. +/** Query the timestamp in nanoseconds of @a packet. @param packet Packet initialized by #nestegg_read_packet. @param tstamp Storage for the queried timestamp in nanoseconds. @retval 0 Success. @@ -424,6 +427,8 @@ int nestegg_packet_discard_padding(nestegg_packet * packet, set, encryption information not read from packet. @retval #NESTEGG_PACKET_HAS_SIGNAL_BYTE_ENCRYPTED Encrypted bit set, encryption infomation read from packet. + @retval #NESTEGG_PACKET_HAS_SIGNAL_BYTE_PARTITIONED Partitioned bit set, + encryption and parition information read from packet. @retval -1 Error.*/ int nestegg_packet_encryption(nestegg_packet * packet); @@ -439,6 +444,18 @@ int nestegg_packet_encryption(nestegg_packet * packet); int nestegg_packet_iv(nestegg_packet * packet, unsigned char const ** iv, size_t * length); +/** Query the packet for offsets. +@param packet Packet initialized by #nestegg_read_packet. +@param partition_offsets Storage for queried offsets. +@param num_offsets Length of returned offsets, may be 0. +The data is owned by the #nestegg_packet packet. +@retval 0 Success. +@retval -1 Error. +*/ +int nestegg_packet_offsets(nestegg_packet * packet, + uint32_t const ** partition_offsets, + uint8_t * num_offsets); + /** Returns reference_block given packet @param packet Packet initialized by #nestegg_read_packet. @param reference_block pointer to store reference block in. -- cgit v1.2.3