[Mlt-devel] [PATCH] restart decklink if input signal changed mode
Hi, if input signal to decklink board is differ from specified at board initialization or changed later, decklink could inform it by VideoInputFormatChanged callback. but it still does not give a proper frame at VideoInputFrameArrived provided patch stop/start decklink board with updated profile. -- Maksym Veremeyenko From a2a7c254df003a7082d395626dac904a647cd326 Mon Sep 17 00:00:00 2001 From: Maksym Veremeyenko ve...@m1.tv Date: Wed, 3 Sep 2014 19:11:50 +0300 Subject: [PATCH] restart decklink if input signal changed mode --- src/modules/decklink/producer_decklink.cpp | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/modules/decklink/producer_decklink.cpp b/src/modules/decklink/producer_decklink.cpp index 04510f4..e194b38 100644 --- a/src/modules/decklink/producer_decklink.cpp +++ b/src/modules/decklink/producer_decklink.cpp @@ -79,6 +79,7 @@ private: } public: + mlt_profile m_new_input; void setProducer( mlt_producer producer ) { m_producer = producer; } @@ -91,6 +92,7 @@ public: m_producer = NULL; m_decklink = NULL; m_decklinkInput = NULL; + m_new_input = NULL; } virtual ~DeckLinkProducer() @@ -606,6 +608,7 @@ public: ( mode-GetFlags() bmdDisplayModeColorspaceRec709 ) ? 709 : 601; mlt_log_verbose( getProducer(), colorspace changed %d\n, profile-colorspace ); } + m_new_input = profile; return S_OK; } }; @@ -627,6 +630,13 @@ static int get_frame( mlt_producer producer, mlt_frame_ptr frame, int index ) mlt_position end = mlt_producer_get_playtime( producer ); end = ( mlt_producer_get_length( producer ) end ? mlt_producer_get_length( producer ) : end ) - 1; + if ( decklink decklink-m_new_input ) + { + decklink-m_new_input = NULL; + decklink-stop(); + decklink-start( decklink-m_new_input ); + } + // Re-open if needed if ( !decklink pos end ) { -- 1.7.7.6 -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel
[Mlt-devel] [mltframework/mlt] f61823: Improve error handling for tokenizer when asked to...
Branch: refs/heads/master Home: https://github.com/mltframework/mlt Commit: f61823078b99260466adec2a74e2eeb8c499e2e5 https://github.com/mltframework/mlt/commit/f61823078b99260466adec2a74e2eeb8c499e2e5 Author: Brian Matherly pez4br...@yahoo.com Date: 2014-09-03 (Wed, 03 Sep 2014) Changed paths: M src/framework/mlt_tokeniser.c Log Message: --- Improve error handling for tokenizer when asked to parse invalid input. Commit: 9a72999c4697958b6ef06bfec4410d8f72484874 https://github.com/mltframework/mlt/commit/9a72999c4697958b6ef06bfec4410d8f72484874 Author: Brian Matherly pez4br...@yahoo.com Date: 2014-09-03 (Wed, 03 Sep 2014) Changed paths: M src/modules/core/filter_brightness.yml M src/modules/core/filter_watermark.yml M src/modules/core/producer_loader.yml M src/modules/core/transition_composite.yml M src/modules/normalize/filter_volume.yml M src/modules/plus/filter_rgblut.c M src/modules/plus/filter_rgblut.yml Log Message: --- Don't use unset for parameters that are not set by default. Exclude the default tag altogether instead. Compare: https://github.com/mltframework/mlt/compare/faa1a5c6f527...9a72999c4697-- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel
Re: [Mlt-devel] adjust volume for certain part of a clip
Thanks, Brian. A minor nit: in yml, instead of default: unset you should simply omit that line unless there is actually some special value unset for that property as in rgblut. I am noticing a trend towards that unset when the intention was that no default means exactly that. Great comment. I just made a commit to rid the codebase of unset. In the case of rgblut, it was only being used to avoid trying to parse a null pointer. I fixed that by modifying the tokenizer to gracefully handle bad input. So now there is no precedent for using unset as a default value. ~Brian -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel