AirPlay Session Platform APIs
IntroductionPlatform APIs related to AirPlay Session. GroupsAirPlayReceiverSessionDelegateAllows functionality to be delegated to external code. Group members:
Functions
AirPlayReceiverPlatformFinalizeFinalizes the platform-specific aspects of the session. Called once per session before it is deleted. void AirPlayReceiverSessionPlatformFinalize( AirPlayReceiverSessionRef inSession ); DiscussionThis gives the platform a chance to clean up any per-session state. This must handle being called during a partial initialization (e.g. failure mid-way through initialization). In certain situations, this may be called without of a TearDownStreams control request so it needs to clean up all per-session state. AirPlayReceiverSessionChangeModesBuilds and sends a mode change request to the controller. OSStatus AirPlayReceiverSessionChangeModes( AirPlayReceiverSessionRef inSession, const AirPlayModeChanges *inChanges, CFStringRef inReason, AirPlayReceiverSessionCommandCompletionFunc inCompletion, void *inContext ); Parameters
AirPlayReceiverSessionControlControls the session. OSStatus AirPlayReceiverSessionControl( CFTypeRef inSession, // Must be a AirPlayReceiverSessionRef. uint32_t inFlags, CFStringRef inCommand, CFTypeRef inQualifier, CFDictionaryRef inParams, CFDictionaryRef *outParams ); AirPlayReceiverSessionCopyPropertyCopies a property from the session. CF_RETURNS_RETAINED CFTypeRef AirPlayReceiverSessionCopyProperty( CFTypeRef inSession, // Must be AirPlayReceiverSessionRef. uint32_t inFlags, CFStringRef inProperty, CFTypeRef inQualifier, OSStatus *outErr ); AirPlayReceiverSessionFlushAudioFlush any queued audio until the specified timestamp or sequence number. OSStatus AirPlayReceiverSessionFlushAudio( AirPlayReceiverSessionRef inSession, uint32_t inFlushUntilTS, uint16_t inFlushUntilSeq, uint32_t *outLastTS ); AirPlayReceiverSessionForceKeyFrameBuilds and sends a key frame request to the sender side via the control channel. OSStatus AirPlayReceiverSessionForceKeyFrame( AirPlayReceiverSessionRef inSession, AirPlayReceiverSessionCommandCompletionFunc inCompletion, void *inContext ); ParametersAirPlayReceiverSessionMakeModeStateFromDictionaryParses a mode state dictionary (e.g. from a ModesChanged command) into an AirPlayModeState structure. OSStatus AirPlayReceiverSessionMakeModeStateFromDictionary( AirPlayReceiverSessionRef inSession, CFDictionaryRef inDict, AirPlayModeState *outModes ); ParametersAirPlayReceiverSessionPlatformControlControls the platform-specific aspects of the session. OSStatus AirPlayReceiverSessionPlatformControl( CFTypeRef inSession, // Must be a AirPlayReceiverSessionRef. uint32_t inFlags, CFStringRef inCommand, CFTypeRef inQualifier, CFDictionaryRef inParams, CFDictionaryRef *outParams ); AirPlayReceiverSessionPlatformCopyPropertyCopies a platform-specific property from the session. CF_RETURNS_RETAINED CFTypeRef AirPlayReceiverSessionPlatformCopyProperty( CFTypeRef inSession, // Must be a AirPlayReceiverSessionRef. uint32_t inFlags, CFStringRef inProperty, CFTypeRef inQualifier, OSStatus *outErr ); AirPlayReceiverSessionPlatformFinalizeFinalizes the platform-specific aspects of the session. Called once per session before it is deleted. void AirPlayReceiverSessionPlatformFinalize( AirPlayReceiverSessionRef inSession ); DiscussionThis gives the platform a chance to clean up any per-session state. This must handle being called during a partial initialization (e.g. failure mid-way through initialization). In certain situations, this may be called without of a TearDownStreams control request so it needs to clean up all per-session state. AirPlayReceiverSessionPlatformInitializeInitializes the platform-specific aspects of the session. Called once per session after it is created. OSStatus AirPlayReceiverSessionPlatformInitialize( AirPlayReceiverSessionRef inSession ); DiscussionThis gives the platform a chance to set up any per-session state. AirPlayReceiverSessionPlatformFinalize will be called when the session ends. AirPlayReceiverSessionPlatformSetPropertySets a platform-specific property on the session. OSStatus AirPlayReceiverSessionPlatformSetProperty( CFTypeRef inSession, // Must be a AirPlayReceiverSessionRef. uint32_t inFlags, CFStringRef inProperty, CFTypeRef inQualifier, CFTypeRef inValue ); AirPlayReceiverSessionReadAudioReads output audio (e.g. music to play on the accessory) that has been received by the accessory. OSStatus AirPlayReceiverSessionReadAudio( AirPlayReceiverSessionRef inSession, AirPlayStreamType inType, uint32_t inSampleTime, uint64_t inHostTime, void *inBuffer, size_t inLen ); Parameters
DiscussionThe flow of operation is that audio sent to the accessory for playback is received, de-packetized, decrypted, decoded, and buffered according to timing information in the stream. When the platform's audio stack needs the next chunk of audio to play, it calls this function to read the audio that has been buffered for the specified timestamp. If there isn't enough audio buffered to satisfy this request, the missing data will be filled in with a best guess or silence. The platform can then provide this audio data to its audio stack for playback. AirPlayReceiverSessionRequestSiriActionBuilds and sends Siri action command to the controller. OSStatus AirPlayReceiverSessionRequestSiriAction( AirPlayReceiverSessionRef inSession, AirPlaySiriAction inAction, AirPlayReceiverSessionCommandCompletionFunc inCompletion, void *inContext ); ParametersAirPlayReceiverSessionRequestUIBuilds and sends request UI command to the controller. OSStatus AirPlayReceiverSessionRequestUI( AirPlayReceiverSessionRef inSession, CFStringRef inURL, AirPlayReceiverSessionCommandCompletionFunc inCompletion, void *inContext ); Parameters
AirPlayReceiverSessionSetLimitedUIBuilds and sends set limited UI command to the controller. OSStatus AirPlayReceiverSessionSetLimitedUI( AirPlayReceiverSessionRef inSession, Boolean inLimitUI, AirPlayReceiverSessionCommandCompletionFunc inCompletion, void *inContext ); ParametersAirPlayReceiverSessionSetNightModeBuilds and sends set night mode command to the controller. OSStatus AirPlayReceiverSessionSetNightMode( AirPlayReceiverSessionRef inSession, Boolean inNightMode, AirPlayReceiverSessionCommandCompletionFunc inCompletion, void *inContext ); ParametersAirPlayReceiverSessionSetPropertySets a property on the session. OSStatus AirPlayReceiverSessionSetProperty( CFTypeRef inSession, // Must be AirPlayReceiverSessionRef. uint32_t inFlags, CFStringRef inProperty, CFTypeRef inQualifier, CFTypeRef inValue ); AirPlayReceiverSessionSetupSets up an AirPlay receiver session. @params inRequestParams Input parameters used to configure or update the session. OSStatus AirPlayReceiverSessionSetup( AirPlayReceiverSessionRef inSession, CFDictionaryRef inRequestParams, CFDictionaryRef *outResponseParams ); ParametersAirPlayReceiverSessionTearDownSets up an AirPlay receiver session. void AirPlayReceiverSessionTearDown( AirPlayReceiverSessionRef inSession, CFDictionaryRef inRequest, OSStatus inReason, Boolean *outDone ); Parameters
Typedefs
AirPlayReceiverSessionCommandCompletionFuncSends a command to the controller and calls a completion function with the response. typedef void ( *AirPlayReceiverSessionCommandCompletionFunc )( OSStatus inStatus, CFDictionaryRef inResponse, void *inContext ); AirPlayReceiverSessionSendCommandSends a command to the controller and calls a completion function with the response. typedef void ( *AirPlayReceiverSessionCommandCompletionFunc )( OSStatus inStatus, CFDictionaryRef inResponse, void *inContext ); |