23.06.14 21:52, Dan Dennedy написав(ла):
On Mon, Jun 23, 2014 at 10:02 AM, Maksym Veremeyenko<ve...@m1stereo.tv>  wrote:
23.06.14 19:44, Dan Dennedy написав(ла):
On Mon, Jun 23, 2014 at 8:30 AM, Maksym Veremeyenko<ve...@m1stereo.tv>   wrote:
22.06.14 21:26, Dan Dennedy написав(ла):
[...]
I do not like changing the message from "no signal" to "frame is
invalid."

Blackmagic's API says:
/.../
bmdFrameHasNoInputSource No input source was detected – frame is invalid
/.../

The message "no signal" is still better. I reject that change.


The existing message is more clear. And the message change
from "video" to "video image" is useless.

this change was made to avoid similar error message for different kind of
errors happens in this function...

OK, that is accepted.

may be you can give a hint how to modify that messages to make them
different to help in error locating?


I do not understand the question. Simply resubmit your patch with your
best understanding of what was accepted and is expected. We will
figure it out from there. :-)


updated patch attached. no changes to error message

--
________________________________________
Maksym Veremeyenko
>From 8a00b78b4f97cf14f2ddbda09305fae37e4a0860 Mon Sep 17 00:00:00 2001
From: Maksym Veremeyenko <ve...@m1.tv>
Date: Tue, 24 Jun 2014 10:34:41 +0300
Subject: [PATCH 1/2] rework mlt frame initialization to avoid mlt_frame_close
 for some error cases

---
 src/modules/decklink/producer_decklink.cpp |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/modules/decklink/producer_decklink.cpp b/src/modules/decklink/producer_decklink.cpp
index 2845fb2..fb1afde 100644
--- a/src/modules/decklink/producer_decklink.cpp
+++ b/src/modules/decklink/producer_decklink.cpp
@@ -358,6 +358,8 @@ public:
 			IDeckLinkVideoInputFrame* video,
 			IDeckLinkAudioInputPacket* audio )
 	{
+		mlt_frame frame = NULL;
+
 		if( !m_reprio )
 		{
 			mlt_properties properties = MLT_PRODUCER_PROPERTIES( getProducer() );
@@ -402,8 +404,6 @@ public:
 			return S_OK;
 		}
 
-		// Create mlt_frame
-		mlt_frame frame = mlt_frame_init( MLT_PRODUCER_SERVICE( getProducer() ) );
 
 		// Copy video
 		if ( video )
@@ -446,6 +446,7 @@ public:
 				{
 					size =  video->GetRowBytes() * video->GetHeight();
 					swab2( (char*) buffer, (char*) image + m_vancLines * video->GetRowBytes(), size );
+					frame = mlt_frame_init( MLT_PRODUCER_SERVICE( getProducer() ) );
 					mlt_frame_set_image( frame, (uint8_t*) image, size, mlt_pool_release );
 				}
 				else if ( image )
@@ -457,8 +458,6 @@ public:
 			else
 			{
 				mlt_log_verbose( getProducer(), "no signal\n" );
-				mlt_frame_close( frame );
-				frame = 0;
 			}
 
 			// Get timecode
@@ -481,8 +480,6 @@ public:
 		else
 		{
 			mlt_log_verbose( getProducer(), "no video\n" );
-			mlt_frame_close( frame );
-			frame = 0;
 		}
 
 		// Copy audio
-- 
1.7.7.6

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to