/*****************************************************************************
-* qtcapture.m: qtkit (Mac OS X) based capture module
-*****************************************************************************
-* Copyright (C) 2008-2011 the VideoLAN team
-*
-* Authors: Pierre d'Herbemont <pdherbemont@videolan.org>
-*
-*****************************************************************************
-* This library 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;
-* version 2 of the License.
-*
-* This library 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 this library; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*
-*****************************************************************************/
+ * qtcapture.m: qtkit (Mac OS X) based capture module
+ *****************************************************************************
+ * Copyright © 2008-2011 VLC authors and VideoLAN
+ *
+ * Authors: Pierre d'Herbemont <pdherbemont@videolan.org>
+ *
+ ****************************************************************************
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
/*****************************************************************************
-* Preamble
-*****************************************************************************/
+ * Preamble
+ *****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
goto error;
}
- int ivideo;
- for(ivideo = 0; ivideo < [myVideoDevices count]; ivideo++){
+ NSUInteger ivideo;
+ NSUInteger deviceCount = [myVideoDevices count];
+ for(ivideo = 0; ivideo < deviceCount; ivideo++){
QTCaptureDevice *qtk_device;
qtk_device = [myVideoDevices objectAtIndex:ivideo];
- msg_Dbg( p_demux, "qtcapture %d/%lu %s %s", ivideo, [myVideoDevices count], [[qtk_device localizedDisplayName] UTF8String], [[qtk_device uniqueID] UTF8String]);
+ msg_Dbg( p_demux, "qtcapture %lu/%lu %s %s", ivideo, deviceCount, [[qtk_device localizedDisplayName] UTF8String], [[qtk_device uniqueID] UTF8String]);
if([[[qtk_device uniqueID]stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] isEqualToString:qtk_currdevice_uid]){
break;
}
/* Get the formats */
NSArray *format_array = [p_sys->device formatDescriptions];
QTFormatDescription* camera_format = NULL;
- for( int k = 0; k < [format_array count]; k++ )
+ NSUInteger formatCount = [format_array count];
+ for( NSUInteger k = 0; k < formatCount; k++ )
{
camera_format = [format_array objectAtIndex: k];