1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#include <precomp.h>
#include "svc_burner.h"
#include <api/api.h>
#define CBCLASS svc_mediaRecorderI
START_DISPATCH;
CB(ISSESSIONSUPPORTED,isSessionSupported)
CB(ISMEDIASUPPORTED,isMediaSupported)
CB(GETNUMDEVICES,getNumDevices)
CB(ENUMDEVICE,enumDevice)
VCB(REFRESHDEVICES,refreshDevices)
END_DISPATCH;
#undef CBCLASS
#define CBCLASS MediaRecorder::DeviceI
START_DISPATCH;
CB(GETDEPENDENCYPTR,getDependencyPtr)
CB(GETDEVICENAME,getDeviceName)
CB(GETDEVICETYPE,getDeviceType)
CB(GETDEVICEDESCRIPTION,getDeviceDescription)
CB(ENUMDEVICESPEEDS,enumDeviceSpeeds)
CB(GETMEDIASIZE,getMediaSize)
CB(GETMEDIAFREE,getMediaFree)
VCB(CLEARSESSIONS,clearSessions)
CB(ADDSESSION,addSession)
CB(GETSESSION,getSession)
CB(SETRECORDSPEED,setRecordSpeed)
CB(SETTEST,setTest)
CB(SETCLOSEDISC,setCloseDisc)
CB(CANBURNNOW,canBurnNow)
CB(CANCANCEL,canCancel)
CB(BEGIN,begin)
CB(END,end)
CB(CANCEL,cancel)
CB(GETSTATUS,getStatus)
CB(GETPROGRESS,getProgress)
CB(GETSTATUSTEXT,getStatusText)
CB(GETLASTERROR,getLastError)
END_DISPATCH;
#undef CBCLASS
#define CBCLASS MediaRecorder::SessionI
START_DISPATCH;
CB(GETSESSIONTYPE,getSessionType)
CB(CLOSESESSION,closeSession)
CB(GETNUMENTRIES,getNumEntries)
CB(ENUMENTRY,enumEntry)
CB(GETTOTALBYTES,getTotalBytes)
CB(GETTOTALTIME,getTotalTime)
END_DISPATCH;
#undef CBCLASS
const char *MediaRecorder::RedbookSession::enumEntry(int n) {
if( n>=getNumEntries()) return NULL;
return m_tracks[n]->getValue();
}
int MediaRecorder::RedbookSession::getTotalBytes() {
double length=(double)getTotalTime();
return (int)(length*(44100*4)/1000); //always 44khz 16bps stereo
}
int MediaRecorder::RedbookSession::getTotalTime() {
int total=0;
for(int i=0;i<getNumEntries();i++) {
int length=0;
if((length=api->metadb_getLength(m_tracks[i]->getValue()))!=-1) total+=length;
}
return total;
}
|