www.pudn.com > SBDcode.rar > CutDetector.h
#ifndef __CUTDETECTOR__ #define __CUTDETECTOR__ /* * Copyright (c) 2003, Jim Easterbrook * * * This file is part of shot-change. * * shot-change is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * shot-change is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with shot-change; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #pragma comment(exestr,"$Id: CutDetector.h,v 1.1.1.1 2003/03/20 11:49:01 easter Exp $") /* * $Log: CutDetector.h,v $ * Revision 1.1.1.1 2003/03/20 11:49:01 easter * Initial import * */ #include// {55563BA4-C65A-11D6-9E9C-00B0D018209C} DEFINE_GUID(CLSID_CutDetector, 0x55563BA4, 0xC65A, 0x11D6, 0x9E, 0x9C, 0x00, 0xB0, 0xD0, 0x18, 0x20, 0x9C); // {55563BC1-C65A-11D6-9E9C-00B0D018209C} DEFINE_GUID(IID_ICDControl, 0x55563BC1, 0xC65A, 0x11D6, 0x9E, 0x9C, 0x00, 0xB0, 0xD0, 0x18, 0x20, 0x9C); typedef int (CallBackFunc) (int FrameNo, int f1,float f2,float f3,float f4,float I1,float I2,float I3,float I4); DECLARE_INTERFACE_(ICDControl, IUnknown) { // pCallBack is a function (implemented by the client) that is called whenever a // cut that exceeds the threshold is detected. To clear a previously set // call back, call SetCallBack with a NULL parameter. STDMETHOD(SetCallBack) (THIS_ CallBackFunc *pCallBack) PURE; // The threshold sets the "sensitivity" of the cut detector. Use 0.0 if you // want to miss no cuts, but don't mind some false alarms. Use 1.0 if you only // want to have no false alarms, but don't mind missing some cuts. Use an // inbetween value if you want something inbetween. Use a negative value if // you want to see what nearly triggered the cut detector. STDMETHOD(SetThreshold) (THIS_ const float Threshold) PURE; }; #endif // __CUTDETECTOR__