Re: [Mlt-devel] regarding irc channel for developers

2012-03-19 Thread Bhuvan Krishna
Thanks brain for the quick reply :) I will compose my questions and mail 
it in the mailinglist.

Regards,
Bhuvan

On Monday 19 March 2012 12:32 AM, Brian Matherly wrote:
  Is their an irc channel for developers? I think it is too much to
 expect but if their is a channel I would be delighted to join it and
 have a chat. I have so many questions to ask.
 There is a #mlt channel on irc.gimp.net. You will find that it is very quiet.

 The best way to get your questions answered is by reading the documentation: 
 http://www.mltframework.org/twiki/bin/view/MLT/Documentation
 The second best way is by asking your questions right here in this mailing 
 list.

 ~Brian



--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


[Mlt-devel] decklink device enumerating cause a problem

2012-03-19 Thread Maksym Veremeyenko

Hi,

after recent patch for decklink producer and consumer i found a strange 
behavior when first decklink working in play mode (process X) and second 
decklink works in play-record-play mode (process Y).


Either some race condition or kind of deadlock happens on a driver 
level. For some reason code line:


 126 if ( m_deckLink-QueryInterface( 
IID_IDeckLinkOutput, (void**) m_deckLinkOutput ) == S_OK )


start thread:

(gdb) bt
#0  0x003ec22e8217 in ioctl () from /lib64/libc.so.6
#1  0x7f1946d0743c in WaitForNotificationEvents () from 
/usr/lib64/libDeckLinkAPI.so
#2  0x7f1946ca2633 in CDeckLinkOutput::DriverNotificationThread() () 
from /usr/lib64/libDeckLinkAPI.so
#3  0x7f1946ca2709 in 
CDeckLinkOutput::DriverNotificationThreadFunction(void*) ()

   from /usr/lib64/libDeckLinkAPI.so
#4  0x003ec2607d90 in start_thread () from /lib64/libpthread.so.0
#5  0x003ec22ef48d in clone () from /lib64/libc.so.6

that stall next line that release m_deckLinkOutput:

#0  0x003ec2609080 in pthread_join () from /lib64/libpthread.so.0
#1  0x7f8346a37b04 in CDeckLinkOutput::~CDeckLinkOutput() () from 
/usr/lib64/libDeckLinkAPI.so
#2  0x7f8346a20cca in CDeckLink::~CDeckLink() () from 
/usr/lib64/libDeckLinkAPI.so
#3  0x7f8346a2072f in CDeckLink::Release() () from 
/usr/lib64/libDeckLinkAPI.so
#4  0x7f8346a48c01 in CDeckLink_v8_0::~CDeckLink_v8_0() () from 
/usr/lib64/libDeckLinkAPI.so
#5  0x7f8346a48ea7 in CDeckLink_v8_0::Release() () from 
/usr/lib64/libDeckLinkAPI.so
#6  0x7f834e1ee5cb in listDevices (properties=0x7f82ec016768, 
this=0x7f82ec016760)

at consumer_decklink.cpp:142

First i revised all decklink pointers for any leak:
0001-care-about-NULL-pointers.patch

but that do not helps, so i checked mode iteration loop:
0002-make-sure-all-is-release-in-mode-iteration-loop.patch

but the cure was to disable device listing:
0003-make-device-listing-only-if-list_devices-property-se.patch

i dont know if it driver bug or some arch specific behaviour, but that 
patches is an only way for me to provide stable decklink operation...


--

Maksym Veremeyenko
From 5ec0801c361a58628038c0ed9b334ae5086c36fc Mon Sep 17 00:00:00 2001
From: Maksym Veremeyenko ve...@m1stereo.tv
Date: Sat, 17 Mar 2012 15:53:40 +0100
Subject: [PATCH 1/3] care about NULL pointers

---
 src/modules/decklink/consumer_decklink.cpp |   74 ++-
 src/modules/decklink/producer_decklink.cpp |   49 +++
 2 files changed, 67 insertions(+), 56 deletions(-)

diff --git a/src/modules/decklink/consumer_decklink.cpp b/src/modules/decklink/consumer_decklink.cpp
index 8645506..dceccdc 100644
--- a/src/modules/decklink/consumer_decklink.cpp
+++ b/src/modules/decklink/consumer_decklink.cpp
@@ -33,6 +33,8 @@
 #include DeckLinkAPI.h
 #endif
 
+#define SAFE_RELEASE(V) if (V) { V-Release(); V = NULL; }
+
 static const unsigned PREROLL_MINIMUM = 3;
 
 class DeckLinkConsumer
@@ -92,15 +94,19 @@ private:
 public:
 	mlt_consumer getConsumer()
 		{ return m_consumer; }
-	
+
+	DeckLinkConsumer()
+	{
+		m_deckLinkKeyer = NULL;
+		m_deckLinkOutput = NULL;
+		m_deckLink = NULL;
+	}
+
 	~DeckLinkConsumer()
 	{
-		if ( m_deckLinkKeyer )
-			m_deckLinkKeyer-Release();
-		if ( m_deckLinkOutput )
-			m_deckLinkOutput-Release();
-		if ( m_deckLink )
-			m_deckLink-Release();
+		SAFE_RELEASE( m_deckLinkKeyer );
+		SAFE_RELEASE( m_deckLinkOutput );
+		SAFE_RELEASE( m_deckLink );
 	}
 	
 	bool listDevices( mlt_properties properties )
@@ -137,11 +143,11 @@ public:
 		free( key );
 		free( name );
 	}
-	m_deckLinkOutput-Release();
+	SAFE_RELEASE( m_deckLinkOutput );
 }
-m_deckLink-Release();
+SAFE_RELEASE( m_deckLink );
 			}
-			decklinkIterator-Release();
+			SAFE_RELEASE( decklinkIterator );
 			mlt_properties_set_int( properties, devices, i );
 			mlt_log_verbose( NULL, [consumer decklink] devices = %d\n, i );
 
@@ -149,8 +155,7 @@ public:
 		}
 		catch ( const char *error )
 		{
-			if ( decklinkIterator )
-decklinkIterator-Release();
+			SAFE_RELEASE( decklinkIterator );
 			mlt_log_error( getConsumer(), %s\n, error );
 			return false;
 		}
@@ -182,30 +187,32 @@ public:
 			return false;
 		}
 #endif
-		
+
 		// Connect to the Nth DeckLink instance
-		do {
-			if ( deckLinkIterator-Next( m_deckLink ) != S_OK )
-			{
-mlt_log_error( getConsumer(), DeckLink card not found\n );
-deckLinkIterator-Release();
-return false;
-			}
-		} while ( ++i = card );
-		deckLinkIterator-Release();
-		
+		for ( i = 0; deckLinkIterator-Next( m_deckLink ) == S_OK ; i++)
+		{
+			if(i == card)
+break;
+			else
+SAFE_RELEASE( m_deckLink );
+		}
+		SAFE_RELEASE( deckLinkIterator );
+		if( !m_deckLink )
+		{
+			mlt_log_error( getConsumer(), DeckLink card not found\n );
+			return false;
+		}
+
 		// Obtain the audio/video output interface (IDeckLinkOutput)
 		if ( 

[Mlt-devel] scaler problem

2012-03-19 Thread Maksym Veremeyenko
Hi,

converted image with melt has some strange artifact.

# result broken image:
/usr/local/mltframework.org/mlt/bin/melt -verbose -profile dv_pal 
-producer avformat:/home/studio/Videos/TheCore/hd/meta/test0002.mov.png 
in=1 out=1 -consumer avformat:/var/www/html/test_dv_pal.png vcodec=png 
f=image2 s=320x240

# result normal image:
/usr/local/mltframework.org/mlt/bin/melt -verbose -profile square_pal 
-producer avformat:/home/studio/Videos/TheCore/hd/meta/test0002.mov.png 
in=1 out=1 -consumer avformat:/var/www/html/test_square_pal.png 
vcodec=png f=image2 s=320x240

source and resulting file could be downloaded from:
http://downloads.m1stereo.tv/324c3cef50a05a05d2583456a1c6b21f/test0002.mov.png
http://downloads.m1stereo.tv/324c3cef50a05a05d2583456a1c6b21f/test_dv_pal.png
http://downloads.m1stereo.tv/324c3cef50a05a05d2583456a1c6b21f/test_square_pal.png

mlt from git, ffmpeg from git, 64-bit linux...

-- 

Maksym Veremeyenko


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] decklink device enumerating cause a problem

2012-03-19 Thread Maksym Veremeyenko
19.03.12 18:58, Dan Dennedy написав(ла):
 2012/3/19 Maksym Veremeyenkove...@m1stereo.tv:
 Hi,

 after recent patch for decklink producer and consumer i found a strange
 behavior when first decklink working in play mode (process X) and second
 decklink works in play-record-play mode (process Y).

 Either some race condition or kind of deadlock happens on a driver level.
 For some reason code line:

 hmm, might be even worse when trying to use decklink producer and
 consumer in the same process!

i used, but not simultaneously. it switch from
 avformat - decklink
to
 decklink - avformat
and seems working stable if device listing will be avoided...


 but the cure was to disable device listing:
 0003-make-device-listing-only-if-list_devices-property-se.patch


 The only small problem I have with this is that it requires the app to
 start the consumer or fetch a frame from the producer in order to get
 the information. I can make a small improvement to this patch that
 establishes a property-changed event listener so that the enumeration
 occurs once when list_devices property is set, which is a little more
 convenient.

as you prefer..

-- 

Maksym Veremeyenko

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


[Mlt-devel] Git: Initialize all decklink interface pointers and reset them upon release.

2012-03-19 Thread Dan Dennedy
 src/modules/decklink/consumer_decklink.cpp |   83 +++-
 src/modules/decklink/producer_decklink.cpp |   55 +++---
 2 files changed, 78 insertions(+), 60 deletions(-)

New commits:
commit edce14a421c21c1a190ade2d16d74753fa0c0511
Author: Maksym Veremeyenko ve...@m1stereo.tv
Date:   Mon Mar 19 20:53:32 2012 -0700

Initialize all decklink interface pointers and reset them upon release.

Also, add a couple of missing releases.


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] build-melt.sh modifications

2012-03-19 Thread Brian Matherly
 Of course, either location will work fine with wget or curl, but this

 is not about automation and build systems. This is about someone using
 a graphical web browser, downloading the script, and following some
 directions. The wiki inserts this HTTP header, which makes the browser
 download instead of display it:
 
 Content-disposition: inline;filename=build-melt.sh
 
 But I guess this is a minor point. If the user cannot figure out how
 to use Save As... or click Back and then right-click to download, then
 they should not be attempting to use this build script.

I would tend to agree. A user can figure out how to save as. Otherwise, I 
wouldn't mind synchronizing the files with the Wiki manually. They shouldn't 
change that often.

 I am OK to use github since you plan to add other scripts for the build 
 server.
 https://github.com/pez4brian/build-melt

Just so I understand... Are you suggesting we keep all the scripts on github in 
my personal repository? It would work fine, but it seems a little arbitrary. I 
thought you could just create another repository at mltframework.org. 
Otherwise, we can create an mlt organization on github and keep the repo there. 
Either of those would make the most sense to me.

 as for v2 vs. v3 of build-melt.sh, I will take care of that in my fork
 and send you a pull request. It fixes some things on OS X for the
 nearly ready build agent.


I resolved your comments in this commit:
https://github.com/pez4brian/build-melt/commit/76cd4de9513947b84ec17de0b035881ad6f96477


~BM


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel