Mac Developer Library

Developer

DRTrack Class Reference

Options
Deployment Target:

On This Page
Language:

DRTrack

The DRTrack class represents a track on the burned disc. More...

Inheritance


Conforms To


Import Statement


import DiscRecording @import DiscRecording;

Availability


Available in OS X v10.2 and later.
  • Asks the track producer for a size estimate.

    Declaration

    Swift

    func estimateLength() -> UInt64

    Objective-C

    - (uint64_t)estimateLength

    Return Value

    The estimated length of the track.

    Discussion

    This method calls the track producer to ask it to estimate the size needed for its data.

    For some types of track, this call may be very expensive. For example, a DRFilesystemTrack may need to iterate folders on disk to provide an accurate estimate, which (if a large number of files and folders are involved) can cause this call to take 30 seconds or more. Since your main thread should not be allowed to block for this long, you may wish to call this function on a separate thread.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.3 and later.

  • Initializes a DRTrack with the producer

    Declaration

    Swift

    init!(producer producer: AnyObject!)

    Objective-C

    - (id)initWithProducer:(id)producer

    Parameters

    producer

    The object to use as the data producer

    Return Value

    A DRTrack

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns the properties dictionary of the track.

    Declaration

    Swift

    func properties() -> [NSObject : AnyObject]!

    Objective-C

    - (NSDictionary *)properties

    Return Value

    An NSDictionary containing the properties of the track.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Sets the properties dictionary of the track

    Declaration

    Swift

    func setProperties(_ properties: [NSObject : AnyObject]!)

    Objective-C

    - (void)setProperties:(NSDictionary *)properties

    Parameters

    properties

    NSDictionary of the properties to set.

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Tests the production speed for a specified interval.

    Declaration

    Swift

    func testProductionSpeedForInterval(_ interval: NSTimeInterval) -> Float

    Objective-C

    - (float)testProductionSpeedForInterval:(NSTimeInterval)interval

    Parameters

    interval

    The length of the test in seconds.

    Return Value

    The maximum speed data can be produced at.

    Discussion

    Runs a fake "production" cycle, repeatedly asking the receiver for data by calling it's producer's produceDataIntoBuffer:length:atAddress:blockSize:ioFlags: for the specified time interval.

    Use this function to verify that the the production code can produce data fast enough to satisfy the data throughput requirements of the burn.

    Returns the calculated maximum speed the at which the receiver can produce data. This value should be used when setting up a burn to limit the burn speed

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Tests the production speed for a specified byte count.

    Declaration

    Swift

    func testProductionSpeedForLength(_ length: UInt32) -> Float

    Objective-C

    - (float)testProductionSpeedForLength:(uint32_t)length

    Parameters

    length

    The length of the test in bytes.

    Return Value

    The maximum speed data can be produced at.

    Discussion

    Runs a fake "production" cycle, repeatedly asking the receiver for data by calling it's producer's produceDataIntoBuffer:length:atAddress:blockSize:ioFlags: until the specified length number of bytes have been produced.

    Use this function to verify that the the production code can produce data fast enough to satisfy the data throughput requirements of the burn.

    Returns the calculated maximum speed the at which the receiver can produce data. This value should be used when setting up a burn to limit the burn speed

    Import Statement

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.