23.06.14 21:54, Dan Dennedy написав(ла):
On Mon, Jun 23, 2014 at 8:45 AM, Maksym Veremeyenko<ve...@m1stereo.tv> wrote:
22.06.14 21:30, Dan Dennedy написав(ла):
On Sun, Jun 22, 2014 at 6:24 AM, Maksym Veremeyenko<ve...@m1stereo.tv>
wrote:
Hi,
attached patch implement kind of timecode barrier i.e. skip frames if
their
timecode less then specified. this patch makes possible a frame-accurate
capturing from VTR sources.
I like it, but you need to document the new property in the yml file.
"vitc_in" property is integer value that is timecode in BCD format. Setting
this property will change producer behavior to skip/ignore frames that has
timecode less then specified. after reaching first frame with timecode
greater or equal then specified "vitc_in" reseted to zero and current and
next frame will be submitted to mlt framework.
heh, OK. I will apply the patch and make the simple yml file change
based on this description.
updated patch attached
--
________________________________________
Maksym Veremeyenko
Senior System Administrator
IT Department
Ukrainian Music Television Channel "M1"
DDI. +380 44 205-44-92
Tel. +380 44 205-44-80
Fax. +380 44 205-44-82
Cell. +380-67-447-22-43
E-mail : maksym.veremeye...@m1stereo.tv
Web site: www.m1stereo.tv
>From 647e7b978b53189c6e708befb6674a7431c97e1b Mon Sep 17 00:00:00 2001
From: Maksym Veremeyenko <ve...@m1.tv>
Date: Tue, 24 Jun 2014 10:42:15 +0300
Subject: [PATCH 2/2] implement timecode barier - skip all frames with VITC
---
src/modules/decklink/producer_decklink.cpp | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/src/modules/decklink/producer_decklink.cpp b/src/modules/decklink/producer_decklink.cpp
index fb1afde..50f770a 100644
--- a/src/modules/decklink/producer_decklink.cpp
+++ b/src/modules/decklink/producer_decklink.cpp
@@ -408,8 +408,29 @@ public:
// Copy video
if ( video )
{
+ IDeckLinkTimecode* timecode = 0;
+
if ( !( video->GetFlags() & bmdFrameHasNoInputSource ) )
{
+ int vitc_in = mlt_properties_get_int( MLT_PRODUCER_PROPERTIES( getProducer() ), "vitc_in" );
+ if ( vitc_in && ( S_OK == video->GetTimecode( bmdTimecodeRP188, &timecode ) ||
+ S_OK == video->GetTimecode( bmdTimecodeVITC, &timecode )) && timecode )
+ {
+ int vitc = timecode->GetBCD();
+ SAFE_RELEASE( timecode );
+
+ mlt_log_verbose( getProducer(),
+ "VideoInputFrameArrived: vitc=%.8X vitc_in=%.8X\n", vitc, vitc_in);
+
+ if ( vitc < vitc_in )
+ {
+ pthread_cond_broadcast( &m_condition );
+ return S_OK;
+ }
+
+ mlt_properties_set_int( MLT_PRODUCER_PROPERTIES( getProducer() ), "vitc_in", 0 );
+ }
+
int size = video->GetRowBytes() * ( video->GetHeight() + m_vancLines );
void* image = mlt_pool_alloc( size );
void* buffer = 0;
@@ -461,7 +482,6 @@ public:
}
// Get timecode
- IDeckLinkTimecode* timecode = 0;
if ( video->GetTimecode( bmdTimecodeVITC, &timecode ) == S_OK && timecode )
{
DLString timecodeString = 0;
--
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