[FFmpeg-devel] [PATCH 2/4] avformat/aviobuf: add support for specifying minimum packet size and marking flush points
Michael Niedermayer
michael at niedermayer.cc
Mon Jun 19 18:11:40 EEST 2017
On Mon, Jun 19, 2017 at 12:02:52AM +0200, Marton Balint wrote:
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
> libavformat/avio.h | 13 ++++++++++++-
> libavformat/aviobuf.c | 7 +++++++
> libavformat/url.h | 1 +
> libavformat/version.h | 2 +-
> 4 files changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/avio.h b/libavformat/avio.h
> index 844a5723d3..f14b003ba5 100644
> --- a/libavformat/avio.h
> +++ b/libavformat/avio.h
> @@ -137,7 +137,13 @@ enum AVIODataMarkerType {
> * Trailer data, which doesn't contain actual content, but only for
> * finalizing the output file.
> */
> - AVIO_DATA_MARKER_TRAILER
> + AVIO_DATA_MARKER_TRAILER,
> + /**
> + * A point in the output bytestream where the underlying AVIOContext might
> + * flush the buffer depending on latency or buffering requirements. Typically
> + * means the end of a packet.
> + */
> + AVIO_DATA_MARKER_FLUSH_POINT,
> };
needs APIChanges entry i think
[...]
> diff --git a/libavformat/url.h b/libavformat/url.h
> index 910f1e00b3..df90333059 100644
> --- a/libavformat/url.h
> +++ b/libavformat/url.h
> @@ -42,6 +42,7 @@ typedef struct URLContext {
> char *filename; /**< specified URL */
> int flags;
> int max_packet_size; /**< if non zero, the stream is packetized with this max packet size */
> + int min_packet_size; /**< if non zero, the stream is packetized with this min packet size */
> int is_streamed; /**< true if streamed (no seek possible), default = false */
> int is_connected;
> AVIOInterruptCB interrupt_callback;
i was hesitating for a moment when i saw this. Is the location, that is
in the middle instead of the end of the struct intended ?
is nothig outside libavformat using url.h ?
(i was thinking libavdevice but it seems not directly include it)
patch LGTM otherwise
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170619/1a4d88fa/attachment.sig>
More information about the ffmpeg-devel
mailing list