[FFmpeg-devel] [PATCH] libavformat/fifo: Fix initialization of underlying AVFormatContext

2017-07-06 Thread sebechlebskyjan
From: Jan Sebechlebsky Pass filename to AVFormatContext of underlying muxer. This commit fixes bug #6308. Signed-off-by: Jan Sebechlebsky --- libavformat/fifo.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/fifo.c b/libavformat/fifo.c index 2cbe5c5..c88

[FFmpeg-devel] [PATCH 2/2] libavformat/tee: Add possibility to pass fifo options by using fifo_ prefix

2016-12-22 Thread sebechlebskyjan
From: Jan Sebechlebsky --- doc/muxers.texi | 9 + libavformat/tee.c | 20 2 files changed, 29 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index ced223e..139ced0 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -1603,6 +1603,11 @@ outputs and

[FFmpeg-devel] [PATCH 0/2] Fifo support for tee

2016-12-22 Thread sebechlebskyjan
From: Jan Sebechlebsky Hello, I am re-sending the patch(es) adding support for fifo pseudo-muxer in tee muxer. I will apply the first one in few days (since it already has been reviewed by Nicolas, and it differs only in issues Nicolas pointed out in review and these should be fixed now). The s

[FFmpeg-devel] [PATCH v2 1/2] libavformat/tee: Add fifo support for tee

2016-12-22 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version of the patch: - Refactoring based on Nicolas's comments - Added TODO regarding boolean option parsing doc/muxers.texi | 20 + libavformat/tee.c | 87 ++

[FFmpeg-devel] [PATCH v2] avformat/tee: Add FATE tests for tee

2016-10-30 Thread sebechlebskyjan
From: Jan Sebechlebsky This commit also adds new diff option for fate tests allowing do compare multiple tuples of files. Signed-off-by: Jan Sebechlebsky --- Changes since the last version: - fixed out of tree build (previous version refered to SRC_PATH instead of TARGET_PATH, thanks to M

[FFmpeg-devel] [PATCH v2] libavformat/tee: Add fifo support for tee

2016-10-17 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Thanks for noticing, I've fixed the patch (also some minor formatting issues I've noticed). doc/muxers.texi | 20 + libavformat/tee.c | 87 ++- 2 files changed, 106 i

[FFmpeg-devel] [PATCH] libavformat/tee: Add fifo support for tee

2016-10-06 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- This commit makes use of fifo muxer together with tee muxer easier, fifo muxer does not have to be explicitly specified for each slave. For the most simple use case it is sufficient to turn fifo muxer on for all slaves by switching on us

[FFmpeg-devel] [PATCH 1/2] avformat/tee: Copy interrupt callback and flags to slave

2016-09-28 Thread sebechlebskyjan
From: Jan Sebechlebsky Copy interrupt callback to slave format context to allow user to interrupt IO. Copy format flags as well. Signed-off-by: Jan Sebechlebsky --- libavformat/tee.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/tee.c b/libavformat/tee.c index 518af4a..d59a

[FFmpeg-devel] [PATCH 2/2] avformat/tee: Add FATE tests for tee

2016-09-28 Thread sebechlebskyjan
From: Jan Sebechlebsky This commit also adds new diff option for fate tests allowing do compare multiple tuples of files. Signed-off-by: Jan Sebechlebsky --- tests/Makefile| 1 + tests/fate-run.sh | 7 tests/fate/tee-muxer.mak | 2

[FFmpeg-devel] [PATCH v5 5/5] avformat/tee: Use BSF list API

2016-09-01 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version of the patch: - added check for avcodec_parameters_copy return value - fixed stray space - rewritten cycle receiving packets from bsf so case when av_interleaved_write_frame returns EAGAIN is trea

[FFmpeg-devel] [PATCH] libavcodec/bsfs: Fix bsf option setting

2016-08-25 Thread sebechlebskyjan
From: Jan Sebechlebsky AV_OPT_SEARCH_CHILDREN flag must be passed to av_opt_set_dict() to set options for private context. Signed-off-by: Jan Sebechlebsky --- libavcodec/bsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index 2462e62.

[FFmpeg-devel] [PATCH v4 5/5] avformat/tee: Use BSF list API

2016-08-25 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- I believe I have fixed handling input / output timebase and input parameters to bitstream filters list. libavformat/tee.c | 131 ++ 1 file changed, 64 insertions(+), 67 deletions(-)

[FFmpeg-devel] [PATCH v7 10/11] avformat/fifo: Add AVFMT_FLAG_NONBLOCK support

2016-08-18 Thread sebechlebskyjan
From: Jan Sebechlebsky Add support for nonblocking calls. Signed-off-by: Jan Sebechlebsky --- No changes since the last version of the patch, just rebased because of changes in previous fifo patch. libavformat/fifo.c | 62 -- 1 file change

[FFmpeg-devel] [PATCH v12 01/11] avformat: Add fifo pseudo-muxer

2016-08-18 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version of the patch: - fixed mistakes in docs (missing "is", 2xmisspelled "unsuccessful") - removed braces around return statement in fifo_mux_init() - fixed "return 0;" -> "return ret;" in fifo_write_header()

[FFmpeg-devel] [PATCH v11 01/11] avformat: Add fifo pseudo-muxer

2016-08-18 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Conflicting patch was applied meanwhile, so I am resending this one. No changes since the last version. Changelog| 1 + configure| 1 + doc/muxers.texi | 95 +++ libavformat/Makefile

[FFmpeg-devel] [PATCH v2] doc/APIchanges: Document addition of list BSF API in lavc

2016-08-16 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- I've noticed that conflicting patch was applied meanwhile, so I'm resending this. Please apply :) doc/APIchanges | 7 +++ 1 file changed, 7 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index 74145b2..582563a 10064

[FFmpeg-devel] [PATCH v10 01/11] avformat: Add fifo pseudo-muxer

2016-08-16 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version of the patch: - Added note in fifo muxer documentation in muxers.texi regarding thread-safety requirement for callbacks in AVFormatContext Changelog| 1 + configure|

[FFmpeg-devel] [PATCH] avformat: Document thread-safety requirement for interrupt callback

2016-08-16 Thread sebechlebskyjan
From: Jan Sebechlebsky Muxing might be running in a separate thread if actual muxer is run inside of fifo pseudo-muxer. Callback should be therefore thread-safe. Signed-off-by: Jan Sebechlebsky --- libavformat/avformat.h | 2 +- libavformat/avio.h | 2 ++ 2 files changed, 3 insertions(+),

[FFmpeg-devel] [PATCH v9 01/11] avformat: Add fifo pseudo-muxer

2016-08-16 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version of the patch: - fixed "s@item" in muxers.texi - fixed second -> seconds in FIFO_DEFAULT_RECOVERY_WAIT_TIME_USEC comment - removed AVFormat *oformat from FifoContext (it is local variable now) - if reco

[FFmpeg-devel] [PATCH v6 10/11] avformat/fifo: Add AVFMT_FLAG_NONBLOCK support

2016-08-16 Thread sebechlebskyjan
From: Jan Sebechlebsky Add support for nonblocking calls. Signed-off-by: Jan Sebechlebsky --- No chanes since the last version of patch, rebased because of changes in the patch adding fifo. libavformat/fifo.c | 62 -- 1 file changed, 56 in

[FFmpeg-devel] [PATCH] doc/APIchanges: Document addition of list BSF API in lavc

2016-08-15 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- doc/APIchanges | 7 +++ 1 file changed, 7 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index 209ab41..4868d58 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,13 @@ libavutil: 2015-08-28 API change

[FFmpeg-devel] [PATCH v3 2/5] avcodec/bsf: Add list BSF API

2016-08-15 Thread sebechlebskyjan
From: Jan Sebechlebsky --- Changes since the last version of the patch: - removed av_freep(&bsf->item_name) from bsf_list_close since it belongs to next commit libavcodec/avcodec.h | 85 libavcodec/bsf.c | 278 +++ 2 fil

[FFmpeg-devel] [PATCH v3 4/5] avcodec/bsf: Add custom item name func for BSF list

2016-08-15 Thread sebechlebskyjan
From: Jan Sebechlebsky Add custom item name function for bsf list, which will construct string description of filter chain. This is done using lazy-initialization, so there is no overhead if item name is never accessed. Signed-off-by: Jan Sebechlebsky Conflicts: libavcodec/bsf.c --- C

[FFmpeg-devel] [PATCH v5 10/11] avformat/fifo: Add AVFMT_FLAG_NONBLOCK support

2016-08-14 Thread sebechlebskyjan
From: Jan Sebechlebsky Add support for nonblocking calls. Signed-off-by: Jan Sebechlebsky --- No changes since the last version of the patch, just rebased because of changes in previous patch. libavformat/fifo.c | 61 -- 1 file changed, 55

[FFmpeg-devel] [PATCH v8 01/11] avformat: Add fifo pseudo-muxer

2016-08-14 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version of the patch: - Fixed documentation (apart from the Marton's suggestions I've also changed example, since it used block_on_overflow option from the earlier version of patch) - Changed max_recovery_

[FFmpeg-devel] [PATCH v5 03/11] avformat/fifo: Add fate test

2016-08-12 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version of the patch: - fixed print_deinit_summary to use int instead of uint8_t libavformat/Makefile | 1 + libavformat/tests/fifo_muxer.c | 443 + tests/Mak

[FFmpeg-devel] [PATCH v4 03/11] avformat/fifo: Add fate test

2016-08-11 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version of patch: - Fixed make dependencies so the tests are not executed when required components are disabled libavformat/Makefile | 1 + libavformat/tests/fifo_muxer.c | 443 +

[FFmpeg-devel] [PATCH v3 11/11] avformat/fifo: Add test for nonblocking mode

2016-08-11 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- No changes since the last version of the patch, just rebased because of changes in previous fate test patch. libavformat/tests/fifo_muxer.c | 139 + tests/ref/fate/fifo-muxer-tst | 5 ++ 2

[FFmpeg-devel] [PATCH v4 10/11] avformat/fifo: Add AVFMT_FLAG_NONBLOCK support

2016-08-11 Thread sebechlebskyjan
From: Jan Sebechlebsky Add support for nonblocking calls. Signed-off-by: Jan Sebechlebsky --- Changes since the last version: - fixed wrong flag passed to av_thread_message_queue_recv() - fixed memleak when queue is full in nonblocking mode libavformat/fifo.c | 61 +

[FFmpeg-devel] [PATCH v3 07/11] avformat/mux: Comment and assert AVFMT_FLAG_NONBLOCK

2016-08-11 Thread sebechlebskyjan
From: Jan Sebechlebsky Add comments regarding AVFMG_FLAG_NONBLOCK usage with muxers. Add assert forbiding use of nonblocking muxer with av_interleaved_write_frame. Signed-off-by: Jan Sebechlebsky --- Changes since the last version of the patch: - added assert to the beginning of av_interleave

[FFmpeg-devel] [PATCH v3 06/11] avformat: add avformat_write_abort() function

2016-08-11 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- No changes since the last version of the patch, just rebased because of the changes in previous patches. libavformat/avformat.h | 15 +++ libavformat/mux.c | 13 + 2 files changed, 28 insertions(+) diff

[FFmpeg-devel] [PATCH v2 05/11] avformat/mux: Refactor muxer deinit from av_write_trailer

2016-08-11 Thread sebechlebskyjan
From: Jan Sebechlebsky Move muxer deinitialization and private resources freeing in a separate static function free_muxer(AVFormatContext*). Signed-off-by: Jan Sebechlebsky --- No changes since the last version, just rebased because of changes in previous patch. libavformat/mux.c | 31 +

[FFmpeg-devel] [PATCH v2 04/11] avformat/muxers: Add non-blocking mode support for av_write_trailer

2016-08-11 Thread sebechlebskyjan
From: Jan Sebechlebsky This makes av_write_trailer not to free the resources if write_trailer call returns AVERROR(EAGAIN) allowing repeated calls of write_trailer of non-blocking muxer. Signed-off-by: Jan Sebechlebsky --- Changes since the last version of the patch: - Added assert to the par

[FFmpeg-devel] [PATCH v3 03/11] avformat/fifo: Add fate test

2016-08-11 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version of the patch: - Fixed whitespace and missing $(EXESUF) in fifo-muxer.mak - Fixed "overflow with packet dropping" test which skipped write_trailer call in case of failure. libavformat/Makefile

[FFmpeg-devel] [PATCH v7 01/11] avformat: Add fifo pseudo-muxer

2016-08-11 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version of the patch: - Fixed thread include (old patch included pthread.h directly) Changelog| 1 + configure| 1 + doc/muxers.texi | 93 +++ libavformat/Makef

[FFmpeg-devel] [PATCH v3 5/5] avformat/tee: Use BSF list API

2016-08-09 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version of patch: - removed parse_bsfs() function I accidentaly left out (it's replaced by av_bsf_list_parse_str()) libavformat/tee.c | 120 ++ 1 file chang

[FFmpeg-devel] [PATCH v3 10/11] avformat/fifo: Add AVFMT_FLAG_NONBLOCK support

2016-08-09 Thread sebechlebskyjan
From: Jan Sebechlebsky Add support for nonblocking calls. Signed-off-by: Jan Sebechlebsky --- No changes since the last version of the patch, just rebased because of changes in the previous commit. libavformat/fifo.c | 61 -- 1 file change

[FFmpeg-devel] [PATCH v2 03/11] avformat/fifo: Add fate test

2016-08-09 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version: - Removed empty lines at the end of fifo_muxer.c file libavformat/Makefile | 1 + libavformat/tests/fifo_muxer.c | 443 + tests/Makefile

[FFmpeg-devel] [PATCH v6 01/11] avformat: Add fifo pseudo-muxer

2016-08-09 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes since the last version done according Martons review: - Documentation fixes as requested - Rearanged message processing in while loop inside fifo_cosumer_thread, added FIFO_WRITE_HEADER message type, message is initialized

[FFmpeg-devel] [PATCH v2 5/5] avformat/tee: Use BSF list API

2016-08-05 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- No changes from the last version, just rebased after Michael's commit. libavformat/tee.c | 80 +++ 1 file changed, 57 insertions(+), 23 deletions(-) diff --git a/libavformat/tee.c b

[FFmpeg-devel] [PATCH v2 4/5] avcodec/bsf: Add custom item name func for BSF list

2016-08-05 Thread sebechlebskyjan
From: Jan Sebechlebsky Add custom item name function for bsf list, which will construct string description of filter chain. This is done using lazy-initialization, so there is no overhead if item name is never accessed. Signed-off-by: Jan Sebechlebsky --- No changes from last version, just reb

[FFmpeg-devel] [PATCH v2 3/5] avcodec/bsf: Add list BSF API

2016-08-05 Thread sebechlebskyjan
From: Jan Sebechlebsky --- Changes from last version: - fixed doxygen comments - added av_bsf_list_append2() function - changed names of array and length fields to follow naming convention - idx and flushed_idx is now unsigned - merged bsf_list_flush to bsf_list_filter to reduce code duplic

[FFmpeg-devel] [PATCH v2 11/11] avformat/fifo: Add test for nonblocking mode

2016-08-04 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes from last version: - av_abort_output was renamed to avformat_write_abort libavformat/tests/fifo_muxer.c | 139 + tests/ref/fate/fifo-muxer-tst | 5 ++ 2 files changed, 144 insertions

[FFmpeg-devel] [PATCH v2 10/11] avformat/fifo: Add AVFMT_FLAG_NONBLOCK support

2016-08-04 Thread sebechlebskyjan
From: Jan Sebechlebsky Add support for nonblocking calls. Signed-off-by: Jan Sebechlebsky --- Changes from the last version: - boolean flags accessed from both threads are ints now and are accessed with atomic operations. - pthread_tryjoin_np is replaced by flag set before fifo_consume

[FFmpeg-devel] [PATCH v2 07/11] avformat/avformat.h: Add comments regarding AVFMT_FLAG_NONBLOCK.

2016-08-04 Thread sebechlebskyjan
From: Jan Sebechlebsky Add comments regarding AVFMG_FLAG_NONBLOCK usage with muxers. Signed-off-by: Jan Sebechlebsky --- There are no changes in this patch, it is just rebased version because of change in previous patch. libavformat/avformat.h | 9 - 1 file changed, 8 insertions(+),

[FFmpeg-devel] [PATCH v2 06/11] avformat: add avformat_write_abort() function

2016-08-04 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes from last version of patch: - removed AVFMT_FLAG_NONBLOCK check and modified comment so it states how function behaves with both blocking / non-blocking muxer libavformat/avformat.h | 15 +++ libavformat/mux.c

[FFmpeg-devel] [PATCH v5 01/11] avformat: Add fifo pseudo-muxer

2016-08-04 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes from the last version of patch: - boolean AVOptions are now ints, this was the cause of fate test segfault reported by Michael Changelog| 1 + configure| 1 + doc/muxers.texi

[FFmpeg-devel] [PATCH 11/11] avformat/fifo: Add test for nonblocking mode

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- libavformat/tests/fifo_muxer.c | 139 + tests/ref/fate/fifo-muxer-tst | 5 ++ 2 files changed, 144 insertions(+) diff --git a/libavformat/tests/fifo_muxer.c b/libavformat/tests/fifo_muxer.c in

[FFmpeg-devel] [GSoC] fifo muxer

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky Hello, I am resending fifo muxer related patchset, now also with patches adding support for nonblocking calls (AVFMT_FLAG_NONBLOCK) and fate tests. Regards, Jan Jan Sebechlebsky (11): avformat: Add fifo pseudo-muxer MAINTAINERS: Add myself as maintainer of fifo muxe

[FFmpeg-devel] [PATCH 08/11] avformat/mux: Restore original ts in write_packet on error

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky Restore original timestamps in write_packet() if the actual write operation was not successfull. This allows to pass the same packet to nonblocking muxer repeatedly without corrupting the timestamps. Signed-off-by: Jan Sebechlebsky --- libavformat/mux.c | 9 + 1

[FFmpeg-devel] [PATCH 05/11] avformat/mux: Refactor muxer deinit from av_write_trailer

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky Move muxer deinitialization and private resources freeing in a separate static function free_muxer(AVFormatContext*). Signed-off-by: Jan Sebechlebsky --- libavformat/mux.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git

[FFmpeg-devel] [PATCH 02/11] MAINTAINERS: Add myself as maintainer of fifo muxer

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 932e6fb..9fab34d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -164,6 +164,7 @@ Codecs: exif.c, exif.hThilo Borgm

[FFmpeg-devel] [PATCH v4 01/11] avformat: Add fifo pseudo-muxer

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Changes from the last version of patch: - I got rid of write header message, and pulled initial write_header call out of the while loop as Nicolas originaly suggested. Changelog| 1 + configure

[FFmpeg-devel] [PATCH 04/11] avformat/muxers: Add non-blocking mode support for av_write_trailer

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky This makes av_write_trailer not to free the resources if write_trailer call returns AVERROR(EAGAIN) allowing repeated calls of write_trailer of non-blocking muxer. Signed-off-by: Jan Sebechlebsky --- libavformat/avformat.h | 6 +- libavformat/mux.c | 3 +++ 2 fi

[FFmpeg-devel] [PATCH 06/11] avformat: add av_abort_output() function

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- libavformat/avformat.h | 14 ++ libavformat/mux.c | 16 2 files changed, 30 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 9191c69..9173908 100644 --- a/libavformat/av

[FFmpeg-devel] [PATCH 07/11] avformat/avformat.h: Add comments regarding AVFMT_FLAG_NONBLOCK.

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky Add comments regarding AVFMG_FLAG_NONBLOCK usage with muxers. Signed-off-by: Jan Sebechlebsky --- libavformat/avformat.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 9173908..6898c8c 100

[FFmpeg-devel] [PATCH 03/11] avformat/fifo: Add fate test

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- This adds two tests checking that the output of muxers is the same as when fifo is used and stand-alone test program which covers behaviour in failure scenarios. libavformat/Makefile | 1 + libavformat/tests/fifo_muxer.c

[FFmpeg-devel] [PATCH 10/11] avformat/fifo: Add AVFMT_FLAG_NONBLOCK support

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky Add support for nonblocking calls. Signed-off-by: Jan Sebechlebsky --- libavformat/fifo.c | 70 +- 1 file changed, 59 insertions(+), 11 deletions(-) diff --git a/libavformat/fifo.c b/libavformat/fifo.c index bc8c973..e

[FFmpeg-devel] [PATCH 09/11] avformat/mux: Restore stream ts in av_write_packet on EAGAIN

2016-08-02 Thread sebechlebskyjan
From: Jan Sebechlebsky compute_muxer_pkt_fields() stores the last seen timestamps in stream and produces error if the same timestamp is presented again. This is a problem if muxer works in non-blocking mode and calls av_write_packet repeatedly with the same packet. This patch saves stream fields

[FFmpeg-devel] [PATCH 1/5] doc/bsfs: Fix bsf options divider in documentation

2016-07-28 Thread sebechlebskyjan
From: Jan Sebechlebsky The actual implementation uses ':' divider, not '/' as documented. Signed-off-by: Jan Sebechlebsky --- doc/bitstream_filters.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi index 6c58d02..a8

[FFmpeg-devel] [PATCH 4/5] avcodec/bsf: Add custom item name func for BSF list

2016-07-28 Thread sebechlebskyjan
From: Jan Sebechlebsky Add custom item name function for bsf list, which will construct string description of filter chain. This is done using lazy-initialization, so there is no overhead if item name is never accessed. Signed-off-by: Jan Sebechlebsky Conflicts: libavcodec/bsf.c --- T

[FFmpeg-devel] [PATCH 5/5] avformat/tee: Use BSF list API

2016-07-28 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- libavformat/tee.c | 123 +- 1 file changed, 58 insertions(+), 65 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index b4158e1..1a055cd 100644 --- a/libavformat/tee.c

[FFmpeg-devel] [PATCH 2/5] avcodec/bsf: Add ff_bsf_get_packet_ref() function

2016-07-28 Thread sebechlebskyjan
From: Jan Sebechlebsky Use of this function can save unnecessary malloc operation in bitstream filter. Signed-off-by: Jan Sebechlebsky --- libavcodec/bsf.c | 16 libavcodec/bsf.h | 11 +++ 2 files changed, 27 insertions(+) diff --git a/libavcodec/bsf.c b/libavcodec/bs

[FFmpeg-devel] [PATCH 3/5] avcodec/bsf: Add list BSF API

2016-07-28 Thread sebechlebskyjan
From: Jan Sebechlebsky --- libavcodec/avcodec.h | 74 ++ libavcodec/bsf.c | 284 +++ 2 files changed, 358 insertions(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 36f7935..39106ee 100644 --- a/libavcodec/avcode

[FFmpeg-devel] [PATCH v3 2/2] avcodec/bsf: Forbid packet without payload in av_bsf_send_packet

2016-07-26 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- libavcodec/avcodec.h | 3 ++- libavcodec/bsf.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index ca8dba8..36f7935 100644 --- a/libavcodec/avcodec.h +++ b/libavco

[FFmpeg-devel] [PATCH v3 1/2] avcodec/bsf: Set EOF flag only in pkt == NULL

2016-07-26 Thread sebechlebskyjan
From: Jan Sebechlebsky Set BSF EOF flag only if pkt == NULL in av_bsf_send_packet(). Signed-off-by: Jan Sebechlebsky --- libavcodec/bsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index 88b7f29..9b9ada7 100644 --- a/libavcodec/bsf.c

[FFmpeg-devel] [PATCH 2/2] MAINTAINERS: Add myself as maintainer of fifo muxer

2016-07-25 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6d4c9f9..0e66170 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -164,6 +164,7 @@ Codecs: exif.c, exif.hThilo Borgm

[FFmpeg-devel] [PATCH v3 1/2] libavformat: Add fifo pseudo-muxer

2016-07-25 Thread sebechlebskyjan
From: Jan Sebechlebsky The fifo pseudo-muxer allows to separate encoder from the actual output by using a first-in-first-out queue and running actual muxer asynchronously in separate thread. It can be configured to attempt transparent recovery of output on failure. Signed-off-by: Jan Sebechlebs

[FFmpeg-devel] [PATCH 0/2][GSoC] Add fifo pseudo-muxer

2016-07-25 Thread sebechlebskyjan
From: Jan Sebechlebsky Hello, I am sending next version of fifo pseudo-muxer. I will send patchset adding AVFMT_FLAG_NONBLOCK support requested by Nicolas later - it turned out that there are some more things to solve (av_write_frame does not support repeated calls in current state) and test.

[FFmpeg-devel] [PATCH v2] avcodec/bsf: Set EOF flag only if pkt == NULL

2016-07-22 Thread sebechlebskyjan
From: Jan Sebechlebsky Set BSF EOF flag only if pkt == NULL in av_bsf_send_packet(). Signed-off-by: Jan Sebechlebsky --- I agree, it seems cleaner that way. Thanks, please apply this version of patch then and ignore the patch changing the comment. Regards, Jan libavcodec/bsf.c | 2 +-

[FFmpeg-devel] [PATCH 2/2] avcodec/avcodec.h: Change av_bsf_send_packet() comment

2016-07-22 Thread sebechlebskyjan
From: Jan Sebechlebsky Specify av_bsf_packet() behaviour in case that the packet does not contain any data more precisely in the comment. Signed-off-by: Jan Sebechlebsky --- libavcodec/avcodec.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/avcodec.h b/li

[FFmpeg-devel] [PATCH 1/2] avcodec/bsf: Check side data when setting BSF EOF flag.

2016-07-22 Thread sebechlebskyjan
From: Jan Sebechlebsky Set BSF EOF flag only if pkt == NULL or both data and side data are not present in packet. Signed-off-by: Jan Sebechlebsky --- I believe that side data should be checked too, and EOF flag set only when both data and side data are not present. I was testing new list

[FFmpeg-devel] [PATCH 2/2] avcodec/mpeg4_unpack_bframes_bsf: Check av_packet_from_data() return value

2016-07-22 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- libavcodec/mpeg4_unpack_bframes_bsf.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/mpeg4_unpack_bframes_bsf.c b/libavcodec/mpeg4_unpack_bframes_bsf.c index aee8ccb..e227f58 100644 --- a/libavcodec

[FFmpeg-devel] [PATCH 1/2] avcodec/mpeg4_unpack_bframes_bsf: Copy packet props

2016-07-22 Thread sebechlebskyjan
From: Jan Sebechlebsky mpeg4_unpack_bframes_bsf bitstream filters constructs resulting packet using av_packet_from_data() function. This function however modifies only buffer (data) and leaves other fields untouched, so the content of other fields of the output packet is undefined. It is working

[FFmpeg-devel] [PATCH v2 3/7] avformat/tee: Rescale ts using av_packet_rescale_ts

2016-07-16 Thread sebechlebskyjan
From: Jan Sebechlebsky This ensures that AV_NOPTS_VALUE value is handled correctly. Signed-off-by: Jan Sebechlebsky --- libavformat/tee.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index daddba5..b4158e1 100644 --- a/libavformat

[FFmpeg-devel] [PATCH v2 1/7] avformat/utils: Add ff_stream_encode_params_copy()

2016-07-13 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Chanages from the last version of patch: -> dst->metadata dictionary is freed before entries are copied from src->metadata libavformat/internal.h | 9 libavformat/utils.c| 57

[FFmpeg-devel] [PATCH v2 03/10] avformat/tee: Support flushing by writing NULL pkt

2016-07-11 Thread sebechlebskyjan
From: Jan Sebechlebsky This will add support for flushing by writing NULL packet to the tee muxer, which propagates the action to slave muxers as expected. Signed-off-by: Jan Sebechlebsky --- Unfortunately, I've realized that I've forgotten to set AVFMT_ALLOW_FLUSH flag to the tee muxer to ma

[FFmpeg-devel] [PATCH 5/7] avformat/utils: Add ff_format_output_open() function

2016-07-04 Thread sebechlebskyjan
From: Jan Sebechlebsky Add ff_format_output_open utility function to wrap io_open callback of AVFormatContext structure. Signed-off-by: Jan Sebechlebsky --- libavformat/internal.h | 10 ++ libavformat/utils.c| 10 ++ 2 files changed, 20 insertions(+) diff --git a/libavform

[FFmpeg-devel] [PATCH 1/7] avformat/utils: Add ff_stream_encode_params_copy()

2016-07-04 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- libavformat/internal.h | 9 libavformat/utils.c| 56 ++ 2 files changed, 65 insertions(+) diff --git a/libavformat/internal.h b/libavformat/internal.h index 647ad65..1b44bea

[FFmpeg-devel] [PATCH 6/7] avformat/tee: Use ff_format_output_open() function

2016-07-04 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- libavformat/tee.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index 996d64d..c60a77f 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -300,12 +300,11 @@

[FFmpeg-devel] [PATCH 7/7] libavformat: Add FIFO pseudo-muxer

2016-07-04 Thread sebechlebskyjan
From: Jan Sebechlebsky The fifo pseudo-muxer allows to separate encoder from the actual output by using a first-in-first-out queue and running actual muxer asynchronously in separate thread. It can be configured to attempt transparent recovery of output on failure. Signed-off-by: Jan Sebechlebs

[FFmpeg-devel] [PATCH 3/7] avformat/tee: Handle AV_NOPTS_VALUE correctly

2016-07-04 Thread sebechlebskyjan
From: Jan Sebechlebsky Do not rescale pts and dts if they are set to AV_NOPTS_VALUE. Signed-off-by: Jan Sebechlebsky --- libavformat/tee.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index c276a37..a56d449 100644 --- a/libavfo

[FFmpeg-devel] [PATCH 4/7] avformat/tee: Support flushing by writing NULL pkt

2016-07-04 Thread sebechlebskyjan
From: Jan Sebechlebsky This will fix crash when caller attempts to flush by calling write_packet with NULL packet pointer and flushes slaves as expected. Signed-off-by: Jan Sebechlebsky --- libavformat/tee.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/libavformat/tee.c b/l

[FFmpeg-devel] [PATCH 2/7] avformat/tee: Use ff_stream_encode_params_copy()

2016-07-04 Thread sebechlebskyjan
From: Jan Sebechlebsky Use ff_stream_encode_params_copy() to copy encoding-related fields (parameters) of stream. Signed-off-by: Jan Sebechlebsky --- libavformat/tee.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c inde

[FFmpeg-devel] [PATCH 4/4] avformat/tee: Support flushing by writing NULL pkt

2016-06-30 Thread sebechlebskyjan
From: Jan Sebechlebsky This will fix crash when caller attempts to flush by calling write_packet with NULL packet pointer and flushes slaves as expected. Signed-off-by: Jan Sebechlebsky --- libavformat/tee.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/libavformat/tee.c b/l

[FFmpeg-devel] [PATCH 1/4] avformat/utils: Add ff_stream_encode_params_copy()

2016-06-30 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- Nicolas - this is the second of the utility functions you asked for in reply to my fifo pseudo-muxer patch. I've tried to search for references to AVStream fields in muxers for the fields I wasn't are used, so hopefully this should

[FFmpeg-devel] [PATCH 3/4] avformat/tee: Handle AV_NOPTS_VALUE correctly

2016-06-30 Thread sebechlebskyjan
From: Jan Sebechlebsky Do not rescale pts and dts if they are set to AV_NOPTS_VALUE. Signed-off-by: Jan Sebechlebsky --- libavformat/tee.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index c276a37..840bee3 100644 --- a/libavfo

[FFmpeg-devel] [PATCH 2/4] avformat/tee: Use ff_stream_encode_params_copy()

2016-06-30 Thread sebechlebskyjan
From: Jan Sebechlebsky Use ff_stream_encode_params_copy() to copy encoding-related fields (parameters) of stream. Signed-off-by: Jan Sebechlebsky --- libavformat/tee.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c inde

[FFmpeg-devel] [PATCH] libavformat: Add FIFO pseudo-muxer

2016-06-28 Thread sebechlebskyjan
From: Jan Sebechlebsky FIFO pseudo-muxer allows to separate decoder from the actual output by using first-in-first-out queue and running actual muxer asynchronously in separate thread. It can be configured to attempt transparent recovery of output on failure. Signed-off-by: Jan Sebechlebsky --

[FFmpeg-devel] [GSoC][PATCH] Add FIFO muxer

2016-06-28 Thread sebechlebskyjan
From: Jan Sebechlebsky Hello, I'm sending the patch with implementation of discussed FIFO pseudo-muxer which is part of my GSoC project. The muxer allows to separate decoder from the actual muxer (or several muxers when combined with tee). Trasparent recovery from failure is also implemented. I

[FFmpeg-devel] [PATCH v3] avformat/tee: Support arbitrary number of slaves

2016-06-25 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- You're right. Should be fixed here. libavformat/tee.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index 806beaa..9d0a4cb 100644 --- a/libavform

[FFmpeg-devel] [PATCH v2 3/3] avformat/segment: Use deinit function to deinitialize muxer

2016-06-20 Thread sebechlebskyjan
From: Jan Sebechlebsky This commit moves all deinitialization of SegmentContext to seg_free_context function and registers this function as .deinit function of segment muxer. This also fixes memory leaks caused by context not being deinitialized when write_header call of segment muxer fails. Sig

[FFmpeg-devel] [PATCH 1/3] avformat/segment: Check write_header return value immediately

2016-06-20 Thread sebechlebskyjan
From: Jan Sebechlebsky Check write_header return value immediately after call, so in the successive statements we can assume the write_header was successful. Signed-off-by: Jan Sebechlebsky --- This is needed for the next patch in patchset. libavformat/segment.c | 9 + 1 file changed

[FFmpeg-devel] Fix memory leaks in segment muxer

2016-06-20 Thread sebechlebskyjan
From: Jan Sebechlebsky Hello, I've observed several memory leaks in segment muxer in case the failure happens in seg_init (write_header call). I'm sending patchset to fix those. Regards, Jan Jan Sebechlebsky (3): avformat/segment: Check write_header return value immediately avformat/segmen

[FFmpeg-devel] [PATCH 3/3] avformat/segment: Use deinit function to deinitialize muxer

2016-06-20 Thread sebechlebskyjan
From: Jan Sebechlebsky This commit moves all deinitialization of SegmentContext to seg_free_context function and registers this function as .deinit function of segment muxer. This also fixes memory leaks caused by context not being deinitialized when write_header call of segment muxer fails. Sig

[FFmpeg-devel] [PATCH 2/3] avformat/segment: Ensure write_trailer is called

2016-06-20 Thread sebechlebskyjan
From: Jan Sebechlebsky Ensure that write_trailer is always called after successful write_header operation so underlying muxer is deinitialized. Signed-off-by: Jan Sebechlebsky --- This is a little tricky - we have to ensure that write_trailer is called if the write_header succeeded, however

[FFmpeg-devel] [PATCH v3] avformat/tee: Support arbitrary number of slaves

2016-06-16 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- I've missed that - sorry, should be fixed in this patch. libavformat/tee.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index 806beaa..421623d 1

[FFmpeg-devel] [PATCH v2] avformat/tee: Support arbitrary number of slaves

2016-06-12 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- libavformat/tee.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index 806beaa..bf7438c 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -27,8

[FFmpeg-devel] [PATCH] avformat/tee: Support arbitrary number of slaves

2016-06-10 Thread sebechlebskyjan
From: Jan Sebechlebsky Signed-off-by: Jan Sebechlebsky --- libavformat/tee.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index 806beaa..427e999 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -

[FFmpeg-devel] [PATCH] avutil/threadmessage.h: Fix swapped comments

2016-06-10 Thread sebechlebskyjan
From: Jan Sebechlebsky Fix swapped descriptions of av_thread_message_queue_set_err_send and av_thread_message_queue_set_err_recv. Signed-off-by: Jan Sebechlebsky --- libavutil/threadmessage.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavutil/threadm

  1   2   >