Mac OS 9
IsochronousDataHandler.h
Go to the documentation of this file.
1 
19 #ifndef __ISOCHRONOUSDATAHANDLER__
20 #define __ISOCHRONOUSDATAHANDLER__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __MOVIESFORMAT__
27 #include <MoviesFormat.h>
28 #endif
29 
30 #ifndef __QUICKTIMECOMPONENTS__
31 #include <QuickTimeComponents.h>
32 #endif
33 
34 #if PRAGMA_ONCE
35 #pragma once
36 #endif
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42 
43 #if PRAGMA_IMPORT
44 #pragma import on
45 #endif
46 
47 #if PRAGMA_STRUCT_ALIGN
48 #pragma options align = mac68k
49 #elif PRAGMA_STRUCT_PACKPUSH
50 #pragma pack(push, 2)
51 #elif PRAGMA_STRUCT_PACK
52 #pragma pack(2)
53 #endif
54 
55  enum
56  {
57  kIDHComponentType = FOUR_CHAR_CODE('ihlr'),
58  kIDHSubtypeDV = FOUR_CHAR_CODE('dv '),
60  FOUR_CHAR_CODE('fwc ')
61  };
62 
64  enum
65  {
66  kIDHInterfaceVersion1 = 0x0001
67  };
68 
71  enum
72  {
73  kIDHDeviceListAtomType = FOUR_CHAR_CODE('dlst'),
74  kIDHDeviceAtomType = FOUR_CHAR_CODE('devc'),
75  kIDHIsochServiceAtomType = FOUR_CHAR_CODE('isoc'),
76  kIDHIsochModeAtomType = FOUR_CHAR_CODE('mode'),
77  kIDHDeviceIDType = FOUR_CHAR_CODE('dvid'),
78  kIDHDefaultIOType = FOUR_CHAR_CODE('dfio'),
79  kIDHIsochVersionAtomType = FOUR_CHAR_CODE('iver'),
80  kIDHUniqueIDType = FOUR_CHAR_CODE('unid'),
81  kIDHNameAtomType = FOUR_CHAR_CODE('name'),
82  kIDHUseCMPAtomType = FOUR_CHAR_CODE('ucmp'),
83  kIDHIsochMediaType = FOUR_CHAR_CODE('av '),
84  kIDHDataTypeAtomType = FOUR_CHAR_CODE('dtyp'),
85  kIDHDataSizeAtomType =
86  FOUR_CHAR_CODE('dsiz'),
88  FOUR_CHAR_CODE('dbuf'),
89  kIDHDataIntervalAtomType = FOUR_CHAR_CODE('intv'),
90  kIDHDataIODirectionAtomType = FOUR_CHAR_CODE('ddir'),
91  kIDHSoundMediaAtomType = FOUR_CHAR_CODE('soun'),
92  kIDHSoundTypeAtomType = FOUR_CHAR_CODE('type'),
93  kIDHSoundChannelCountAtomType = FOUR_CHAR_CODE('ccnt'),
94  kIDHSoundSampleSizeAtomType = FOUR_CHAR_CODE('ssiz'),
95  kIDHSoundSampleRateAtomType = FOUR_CHAR_CODE(
96  'srat'),
97  kIDHVideoMediaAtomType = FOUR_CHAR_CODE('vide'),
98  kIDHVideoDimensionsAtomType = FOUR_CHAR_CODE('dimn'),
99  kIDHVideoResolutionAtomType = FOUR_CHAR_CODE('resl'),
100  kIDHVideoRefreshRateAtomType = FOUR_CHAR_CODE('refr'),
101  kIDHVideoPixelTypeAtomType = FOUR_CHAR_CODE('pixl'),
102  kIDHVideoDecompressorAtomType = FOUR_CHAR_CODE('deco'),
103  kIDHVideoDecompressorTypeAtomType = FOUR_CHAR_CODE('dety'),
104  kIDHVideoDecompressorContinuousAtomType = FOUR_CHAR_CODE('cont'),
105  kIDHVideoDecompressorComponentAtomType = FOUR_CHAR_CODE('cmpt')
106  };
107 
109  enum
110  {
111  kIDHDataTypeIsInput = 1L << 0,
112  kIDHDataTypeIsOutput = 1L << 1,
113  kIDHDataTypeIsInputAndOutput = 1L << 2
114  };
115 
117  enum
118  {
119  kIDHOpenForReadTransactions = 1L << 0,
120  kIDHOpenForWriteTransactions = 1L << 1,
121  kIDHOpenWithExclusiveAccess = 1L << 2,
122  kIDHOpenWithHeldBuffers =
123  1L << 3,
125  kIDHCloseForWriteTransactions = 1L << 5
126  };
127 
133  enum
134  {
135  kIDHErrDeviceDisconnected = -14101,
136  kIDHErrInvalidDeviceID = -14102,
137  kIDHErrDeviceInUse = -14104,
138  kIDHErrDeviceNotOpened = -14105,
139  kIDHErrDeviceBusy = -14106,
140  kIDHErrDeviceReadError = -14107,
141  kIDHErrDeviceWriteError = -14108,
142  kIDHErrDeviceNotConfigured = -14109,
143  kIDHErrDeviceList = -14110,
144  kIDHErrCompletionPending = -14111,
145  kIDHErrDeviceTimeout = -14112,
146  kIDHErrInvalidIndex = -14113,
147  kIDHErrDeviceCantRead = -14114,
148  kIDHErrDeviceCantWrite = -14115,
149  kIDHErrCallNotSupported = -14116
150  };
151 
153  typedef UInt32 IDHDeviceID;
154  enum
155  {
156  kIDHInvalidDeviceID = 0,
157  kIDHDeviceIDEveryDevice = (long)0xFFFFFFFF
158  };
159 
162  {
163  SInt32 duration;
164  TimeScale scale;
165  };
166  typedef struct IDHIsochInterval IDHIsochInterval;
168  typedef struct OpaquePsuedoID *PsuedoID;
174  {
175  UInt32 version;
176  Boolean physicallyConnected;
177  Boolean readEnabled;
178  Boolean writeEnabled;
179  Boolean exclusiveAccess;
180  UInt32 currentBandwidth;
181  UInt32 currentChannel;
182  PsuedoID localNodeID;
183  SInt16 inputStandard;
185  };
186  typedef struct IDHDeviceStatus IDHDeviceStatus;
191  typedef UInt32 IDHEvent;
192  enum
193  {
194  kIDHEventInvalid = 0,
195  kIDHEventDeviceAdded = 1L << 0,
198  << 2,
200  kIDHEventReserved1 = 1L << 4,
202  << 5,
204  kIDHEventReserved2 = 1L << 7,
206  << 8,
207  kIDHEventEveryEvent = (unsigned long)0xFFFFFFFF
208  };
209 
210  typedef UInt32 IDHNotificationID;
212  {
213  IDHDeviceID deviceID;
214  IDHNotificationID notificationID;
215  IDHEvent event;
216  };
217  typedef struct IDHEventHeader IDHEventHeader;
218 
233  {
234  IDHEventHeader eventHeader;
235  UInt32 pad[4];
236  };
237  typedef struct IDHGenericEvent IDHGenericEvent;
243  {
244  IDHEventHeader eventHeader;
245  };
253  {
254  IDHEventHeader eventHeader;
255  };
257  typedef CALLBACK_API_C(OSStatus, IDHNotificationProcPtr)(IDHGenericEvent *event,
258  void *userData);
259 
260  typedef IDHNotificationProcPtr IDHNotificationProc;
261  typedef TVECTOR_UPP_TYPE(IDHNotificationProcPtr) IDHNotificationUPP;
263  {
264  UInt32 reserved1;
265  UInt16 reserved2;
266  void *buffer;
267  ByteCount requestedCount;
268  ByteCount actualCount;
269  IDHNotificationUPP completionProc;
270  void *refCon;
271  OSErr result;
272  };
273  typedef struct IDHParameterBlock IDHParameterBlock;
275  {
276  UInt32 x;
277  UInt32 y;
278  };
279  typedef struct IDHResolution IDHResolution;
281  {
282  Fixed x;
283  Fixed y;
284  };
285  typedef struct IDHDimension IDHDimension;
286 
295  ComponentResult
296  IDHGetDeviceList(ComponentInstance idh, QTAtomContainer *deviceList);
297 
306  ComponentResult
308 
317  ComponentResult
319  const QTAtomSpec *configurationID);
320 
329  ComponentResult
330  IDHGetDeviceStatus(ComponentInstance idh, const QTAtomSpec *configurationID,
331  IDHDeviceStatus *status);
332 
341  ComponentResult
343 
352  ComponentResult
353  IDHOpenDevice(ComponentInstance idh, UInt32 permissions);
354 
363  ComponentResult
365 
374  ComponentResult
376 
385  ComponentResult
387 
396  ComponentResult
398  IDHNotificationUPP notificationProc, void *userData,
399  IDHNotificationID *notificationID);
400 
409  ComponentResult
410  IDHNotifyMeWhen(ComponentInstance idh, IDHNotificationID notificationID,
411  IDHEvent events);
412 
421  ComponentResult
422  IDHCancelNotification(ComponentInstance idh, IDHNotificationID notificationID);
423 
432  ComponentResult
433  IDHDisposeNotification(ComponentInstance idh, IDHNotificationID notificationID);
434 
443  ComponentResult
445 
454  ComponentResult
456 
465  ComponentResult
467 
476  ComponentResult
477  IDHUpdateDeviceList(ComponentInstance idh, QTAtomContainer *deviceList);
478 
487  ComponentResult
489 
498  IDHNotificationUPP
499  NewIDHNotificationUPP(IDHNotificationProcPtr userRoutine);
500 #if !OPAQUE_UPP_TYPES
501  enum
502  {
503  uppIDHNotificationProcInfo = 0x000003F1
504  };
505 #ifdef __cplusplus
506  inline IDHNotificationUPP
507  NewIDHNotificationUPP(IDHNotificationProcPtr userRoutine)
508  {
509  return userRoutine;
510  }
511 #else
512 #define NewIDHNotificationUPP(userRoutine) (userRoutine)
513 #endif
514 #endif
515 
524  void
525  DisposeIDHNotificationUPP(IDHNotificationUPP userUPP);
526 #if !OPAQUE_UPP_TYPES
527 #ifdef __cplusplus
528  inline void DisposeIDHNotificationUPP(IDHNotificationUPP) {}
529 #else
530 #define DisposeIDHNotificationUPP(userUPP)
531 #endif
532 #endif
533 
542  OSStatus
544  IDHNotificationUPP userUPP);
545 #if !OPAQUE_UPP_TYPES
546 #ifdef __cplusplus
547  inline OSStatus InvokeIDHNotificationUPP(IDHGenericEvent *event, void *userData,
548  IDHNotificationUPP userUPP)
549  {
550  return (*userUPP)(event, userData);
551  }
552 #else
553 #define InvokeIDHNotificationUPP(event, userData, userUPP) \
554  (*userUPP)(event, userData)
555 #endif
556 #endif
557 
559  enum
560  {
561  kIDHGetDeviceListSelect = 0x0001,
562  kIDHGetDeviceConfigurationSelect = 0x0002,
563  kIDHSetDeviceConfigurationSelect = 0x0003,
564  kIDHGetDeviceStatusSelect = 0x0004,
565  kIDHGetDeviceClockSelect = 0x0005,
566  kIDHOpenDeviceSelect = 0x0006,
567  kIDHCloseDeviceSelect = 0x0007,
568  kIDHReadSelect = 0x0008,
569  kIDHWriteSelect = 0x0009,
570  kIDHNewNotificationSelect = 0x000A,
571  kIDHNotifyMeWhenSelect = 0x000B,
572  kIDHCancelNotificationSelect = 0x000C,
573  kIDHDisposeNotificationSelect = 0x000D,
574  kIDHReleaseBufferSelect = 0x000E,
575  kIDHCancelPendingIOSelect = 0x000F,
576  kIDHGetDeviceControlSelect = 0x0010,
577  kIDHUpdateDeviceListSelect = 0x0011,
578  kIDHGetDeviceTimeSelect = 0x0012
579  };
580 
581 #if PRAGMA_STRUCT_ALIGN
582 #pragma options align = reset
583 #elif PRAGMA_STRUCT_PACKPUSH
584 #pragma pack(pop)
585 #elif PRAGMA_STRUCT_PACK
586 #pragma pack()
587 #endif
588 
589 #ifdef PRAGMA_IMPORT_OFF
590 #pragma import off
591 #elif PRAGMA_IMPORT
592 #pragma import reset
593 #endif
594 
595 #ifdef __cplusplus
596 }
597 #endif
598 
599 #endif
@ kIDHSubtypeDV
Definition: IsochronousDataHandler.h:58
@ kIDHSubtypeFireWireConference
Definition: IsochronousDataHandler.h:59
ComponentResult IDHNotifyMeWhen(ComponentInstance idh, IDHNotificationID notificationID, IDHEvent events)
ComponentResult IDHCancelNotification(ComponentInstance idh, IDHNotificationID notificationID)
ComponentResult IDHCloseDevice(ComponentInstance idh)
@ kIDHCloseForReadTransactions
Definition: IsochronousDataHandler.h:124
void DisposeIDHNotificationUPP(IDHNotificationUPP userUPP)
UInt32 IDHDeviceID
Definition: IsochronousDataHandler.h:153
ComponentResult IDHSetDeviceConfiguration(ComponentInstance idh, const QTAtomSpec *configurationID)
#define NewIDHNotificationUPP(userRoutine)
Definition: IsochronousDataHandler.h:512
ComponentResult IDHCancelPendingIO(ComponentInstance idh, IDHParameterBlock *pb)
ComponentResult IDHDisposeNotification(ComponentInstance idh, IDHNotificationID notificationID)
@ kIDHEventEveryEvent
Definition: IsochronousDataHandler.h:207
@ kIDHEventDeviceChanged
Definition: IsochronousDataHandler.h:197
@ kIDHEventReserved2
Definition: IsochronousDataHandler.h:204
@ kIDHEventWriteEnabled
Definition: IsochronousDataHandler.h:203
@ kIDHEventReserved1
Definition: IsochronousDataHandler.h:200
@ kIDHEventDeviceRemoved
Definition: IsochronousDataHandler.h:196
@ kIDHEventWriteDisabled
Definition: IsochronousDataHandler.h:205
@ kIDHEventReadDisabled
Definition: IsochronousDataHandler.h:201
@ kIDHEventReadEnabled
Definition: IsochronousDataHandler.h:199
ComponentResult IDHGetDeviceList(ComponentInstance idh, QTAtomContainer *deviceList)
OSStatus InvokeIDHNotificationUPP(IDHGenericEvent *event, void *userData, IDHNotificationUPP userUPP)
ComponentResult IDHGetDeviceConfiguration(ComponentInstance idh, QTAtomSpec *configurationID)
UInt32 IDHEvent
Definition: IsochronousDataHandler.h:191
struct OpaquePsuedoID * PsuedoID
Definition: IsochronousDataHandler.h:168
ComponentResult IDHGetDeviceTime(ComponentInstance idh, TimeRecord *deviceTime)
ComponentResult IDHRead(ComponentInstance idh, IDHParameterBlock *pb)
@ kIDHDataIntervalAtomType
Definition: IsochronousDataHandler.h:89
@ kIDHVideoMediaAtomType
Definition: IsochronousDataHandler.h:97
@ kIDHDataBufferSizeAtomType
Definition: IsochronousDataHandler.h:87
@ kIDHIsochServiceAtomType
Definition: IsochronousDataHandler.h:75
ComponentResult IDHGetDeviceClock(ComponentInstance idh, Component *clock)
ComponentResult IDHGetDeviceStatus(ComponentInstance idh, const QTAtomSpec *configurationID, IDHDeviceStatus *status)
ComponentResult IDHGetDeviceControl(ComponentInstance idh, ComponentInstance *deviceControl)
ComponentResult IDHNewNotification(ComponentInstance idh, IDHDeviceID deviceID, IDHNotificationUPP notificationProc, void *userData, IDHNotificationID *notificationID)
ComponentResult IDHOpenDevice(ComponentInstance idh, UInt32 permissions)
ComponentResult IDHReleaseBuffer(ComponentInstance idh, IDHParameterBlock *pb)
ComponentResult IDHUpdateDeviceList(ComponentInstance idh, QTAtomContainer *deviceList)
ComponentResult IDHWrite(ComponentInstance idh, IDHParameterBlock *pb)
Basic Macintosh data types.
long Fixed
Definition: MacTypes.h:153
unsigned char Boolean
Definition: MacTypes.h:318
QuickTime Interfaces.
QuickTime Interfaces.
Definition: ATA.h:616
Definition: Components.h:220
Definition: Components.h:214
Definition: Events.h:224
Definition: IsochronousDataHandler.h:243
Definition: IsochronousDataHandler.h:253
Definition: IsochronousDataHandler.h:174
SInt16 inputStandard
Definition: IsochronousDataHandler.h:183
Boolean deviceActive
Definition: IsochronousDataHandler.h:184
Definition: IsochronousDataHandler.h:281
Definition: IsochronousDataHandler.h:212
IDHNotificationID notificationID
Definition: IsochronousDataHandler.h:214
Definition: IsochronousDataHandler.h:233
Definition: IsochronousDataHandler.h:162
Definition: IsochronousDataHandler.h:263
Definition: IsochronousDataHandler.h:275
Definition: Movies.h:530
Definition: MacTypes.h:585