📄 testclpinf.c
字号:
/*****************************************************************************
******************************************************************************
** **
** Copyright (c) 2004 Videon Central, Inc. **
** All rights reserved. **
** **
** The computer program contained herein contains proprietary information **
** which is the property of Videon Central, Inc. The program may be used **
** and/or copied only with the written permission of Videon Central, Inc. **
** or in accordance with the terms and conditions stipulated in the **
** agreement/contract under which the programs have been supplied. **
** **
******************************************************************************
*****************************************************************************/
/**
* @file testclpinf.c
*
* A utility for testing the clipinfo code
*
* $Id: testclpinf.c,v 1.3 2006/06/13 14:20:52 rbehe Exp $
*/
#if 0
#include <errno.h>
#include "osapi.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <linux/cdrom.h>
#include "vcitypes.h"
#include "utility.h"
#include "clpinfodb.h"
#ifdef DMALLOC
#include "dmalloc.h"
#endif
#define DEVLOCSIZE 256 /* Size of the Device Location Buffer */
#define TIMEOUT 500 /* Device I/O timeout */
#define ENABLE_RPC_SEND 0 /* Set to 0 to disable set RPC command */
/* FUNCTION PROTOTYPES */
static void PrintHelp (void);
static void PrintClpInfo(ULONG ulFilenum);
/* GLOBAL VARIABLES */
char cdDeviceLoc[DEVLOCSIZE] = "/dev/cdrom";
/**********
* MAIN *
**********/
int main(int argc,char **argv)
{
int c;
extern char *optarg;
extern int optind, optopt, opterr;
printf("\n\n");
while ((c = getopt(argc, argv, "hp:")) != -1) {
switch(c) {
case 'h':
PrintHelp();
break;
case 'p':
PrintClpInfo (atoi(optarg));
break;
#if 0
case 'p':
TesterPrint(atoi(optarg));
break;
case 'k':
TOCprint(atoi(optarg));
break;
case 'r':
RTprint(atoi(optarg));
break;
case 'a':
ReadCD(atoi(optarg));
break;
#endif
case '?':
printf("Unknown Option %c, or Option Requires Argument\n\n", optopt);
break;
}
}
if (argc <= 1)
{
PrintHelp();
}
#ifdef DMALLOC
int * foobar = (int *)malloc(10 * sizeof(int));
foobar[0] = 4;
dmalloc_shutdown();
#endif
return(0);
}
/**
* PRINT THE OPTIONS AND THEIR MEANINGS
**/
static void PrintHelp (void)
{
printf("\n--------------------------------\n");
printf("clpinfo testing program\n\n");
printf("Usage:\n");
printf("-h Print this help text\n");
printf("-p <filename> print the clipinfo specified by filename\n");
}
static void PrintClpInfo(ULONG ulFilenum)
{
ClpInfo clpInfo;
LOADER_HANDLE loader;
loader = LoaderCreate((LOADER_BUS_TYPE)0, 0);
clpInfo.ClpInfoCreate(loader);
/* get the current clip info and load it into the database */
clpInfo.ClpInfoLoad(ulFilenum);
/* put the times and refToSTC into the ClpInfo Database */
//clpInfo.ClpInfoSet_InOut(ubRefToSTC, tIn, tOut);
/* get the in and out SPN out of the ClpInfo Database */
//spnFirst = clpInfo.ClpInfoGet_spnFirst();
//spnLast = clpInfo.ClpInfoGet_spnLast();
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -