mergAV
Type
library
Description
mergAV is an iOS and OS X 10.6+ external that adds functions and commands related to the AVFoundation framework. This currently includes using the standard iOS modal dialogs to pick, record, save and edit video and displaying a video preview control to record video and capture still images.
Associated Syntax
Function
Name | Summary | Syntax |
---|---|---|
mergAVPick | Picks a video from a recording or the library and saves it in the temporary folder and returns the file path | mergAVPick([<pSource>], [<pQuality>], [<pDuration>], [<pIncludeVideo>], [<pIncludePhoto>], [<pPopoverRect>], [<pOriginalImage>]) |
mergAVEditVideo | Edits the video and saves the result in the temporary folder and returns the file path | mergAVEditVideo(<pFilePath>, [<pQuality>], [<pDuration>]) |
mergAVCanSaveVideo | Checks to see if the video file is compatible with the photo library | mergAVCanSaveVideo(<pFilePath>) |
mergAVCanAccessPhotoLibrary | Checks the authorisation status of the app to access the photo library | mergAVCanAccessPhotoLibrary() |
mergAVCanRecord | Checks if the user has authorised the app to record audio or video | mergAVCanRecord([<pType>]) |
mergAVVideoThumbnail | Create a thumbnail image of a video | mergAVVideoThumbnail(<pFilePath>, [<pSize>], [<pTime>]) |
mergAVImageThumbnail | Create a thumbnail image from an image file | mergAVImageThumbnail(<pFilePath>, [<pSize>]) |
mergAVCamGet | Get the current property of the camera control | mergAVCamGet(<pProp>) |
mergAVCamBarcodeTypes | Get a list of possible barcode types | mergAVCamBarcodeTypes() |
mergAVAssetCreate | Create an asset from a URL | mergAVAssetCreate(<pURL>) |
mergAVAssetGet | Get the value of an asset property | mergAVAssetGet(<pAssetPointer>, <pProp>) |
mergAVAssetTrackGet | Get the value of an asset track property | mergAVAssetTrackGet(<pAssetPointer>, <pAssetTrackID>, <pProp>) |
mergAVCompositionCreate | Create a composition | mergAVCompositionCreate() |
mergAVCompositionTrackCompatibleWithAssetTrack | Get the id of a composition track that is compatible with a specified asset track | mergAVCompositionTrackCompatibleWithAssetTrack(<pCompositionPointer>, <pAssetPointer>, <pAssetTrackID>) |
mergAVCompositionTrackCreate | Creates a composition tract in a composition | mergAVCompositionTrackCreate(<pCompositionPointer>, <pMediaType>) |
mergAVVideoCompositionCreate | Create a video composition | mergAVVideoCompositionCreate() |
mergAVAssetExportSessionCreate | Create an asset export session to write a composition to a file | mergAVAssetExportSessionCreate(<pAssetPointer>, <pPreset>) |
mergAVAssetExportSessionCompatiblePresets | Get a list of asset export session presets that are compatible with an asset | mergAVAssetExportSessionCompatiblePresets(<pAssetPointer>) |
mergAVAssetExportSessionPresets | Get a list of asset export session presets | mergAVAssetExportSessionPresets() |
mergAVAssetExportSessionGet | mergAVAssetExportSessionGet(<pAssetExportSessionPointer>, <pProp>) | |
mergAVAffineTransformIdentity | This will return the affine transform that makes no changes to the image | mergAVAffineTransformIdentity() |
mergAVAffineTransformMakeRotation | This will return the affine transform identity rotated by pAngle | mergAVAffineTransformMakeRotation(<pAngle>) |
mergAVAffineTransformMakeScale | This will return the affine transform identity scaled by pScaleX and pScaleY | mergAVAffineTransformMakeScale(<pScaleX>, <pScaleY>) |
mergAVAffineTransformMakeTranslation | This will return the affine transform identity moved by pTranslateX and pTranslateY | mergAVAffineTransformMakeTranslation(<pTranslateX>, <pTranslateY>) |
mergAVAffineTransformConcat | Concatenate two affine transforms | mergAVAffineTransformConcat(<pTransform1>, <pTransform2>) |
mergAVAffineTransformInvert | Invert an affine transform | mergAVAffineTransformInvert(<pTransform>) |
mergAVAffineTransformRotate | This will return the affine transform rotated by pAngle | mergAVAffineTransformRotate(<pTransform>, <pAngle>) |
mergAVAffineTransformScale | This will return the affine transform scaled by pScaleX and pScaleY | mergAVAffineTransformScale(<pTransform>, <pScaleX>, <pScaleY>) |
mergAVAffineTransformTranslate | This will return the affine transform moved by pTranslateX and pTranslateY | mergAVAffineTransformTranslate(<pTransform>, <pTranslateX>, <pTranslateY>) |
mergAVAffineTransformRect | This will apply the affine transform to a rect and return the result | mergAVAffineTransformRect(<pTransform>, <pRect>) |
mergAVAffineTransformSize | This will apply the affine transform to a size and return the result | mergAVAffineTransformSize(<pTransform>, <pSize>) |
mergAVAffineTransformPoint | This will apply the affine transform to a point and return the result | mergAVAffineTransformPoint(<pTransform>, <pPoint>) |
mergAVPlayerCreate | Create a player control from an asset or composition with an optional video composition | mergAVPlayerCreate(<pAssetPointer>, [<pVideoCompositionPointer>]) |
mergAVPlayerCreateFromURL | Create a player control from a url | mergAVPlayerCreateFromURL(<pURL>) |
mergAVPlayerGet | Get a player property | mergAVPlayerGet(<pPlayerPointer>, <pProperty>) |
mergAVPlayerCreatePeriodicTimeObserver | Observer periodic times while a player is playing and send a custom message to the contol that created the player | mergAVPlayerCreatePeriodicTimeObserver(<pPlayerPointer>, <pTime>, <pCallback>) |
mergAVPlayerCreateBoundaryTimeObserver | Observer boundary times while a player is playing and send a custom message to the contol that created the player | mergAVPlayerCreateBoundaryTimeObserver(<pPlayerPointer>, <pTimes>, <pCallback>) |
mergAVAudioSessionOtherAudioIsPlaying | When a user launches your app, sound may already be playing on the device | mergAVAudioSessionOtherAudioIsPlaying() |
Command
Name | Summary | Syntax |
---|---|---|
mergAVRequestMediaAccess | Request access for the media type from the user | mergAVRequestMediaAccess [<pType>] |
mergAVSaveVideo | Saves video file to the library | mergAVSaveVideo <pFilePath> |
mergAVSaveImage | Saves image file to the library including metadata | mergAVSaveImage <pFilePath> |
mergAVCamCreate | Create the camera control | mergAVCamCreate |
mergAVCamDelete | Delete the camera control | mergAVCamDelete |
mergAVCamSet | Set a property of the camera control | mergAVCamSet <pProp>, <pValue> |
mergAVCamCaptureImage | Capture an image from the camera control | mergAVCamCaptureImage [<pAnimate>], [<pJPEGQuality>], [<pFilePath>], [<pThumbnailSize>] |
mergAVCamStartRecording | Start recording a video | mergAVCamStartRecording <pFilePath> |
mergAVCamStopRecording | Stop recording a video | mergAVCamStopRecording |
mergAVCamStartBarcodeReader | Start detecting barcodes | mergAVCamStartBarcodeReader [<pBarcodeTypes>] |
mergAVCamStopBarcodeReader | Stop detecting barcodes | mergAVCamStopBarcodeReader |
mergAVAssetRelease | Release the asset from memory | mergAVAssetRelease <pAssetPointer> |
mergAVCompositionRelease | Release a composition from memory | mergAVCompositionRelease <pCompositionPointer> |
mergAVCompositionInsertAsset | Insert all tracks from an asset time range into a composition at a specified time | mergAVCompositionInsertAsset <pCompositionPointer>, <pAssetPointer>, <pStart>, <pDuration>, <pTime> |
mergAVCompositionInsertEmptyTimeRange | Insert an empty time range into all tracks of a composition | mergAVCompositionInsertEmptyTimeRange <pCompositionPointer>, <pStart>, <pDuration> |
mergAVCompositionScaleTimeRange | Scale time range into all tracks of a composition | mergAVCompositionScaleTimeRange <pCompositionPointer>, <pStart>, <pCurrentDuration>, <pNewDuration> |
mergAVCompositionTrackInsertAssetTrack | Insert a time range of an asset track into a composition track at a specified time | mergAVCompositionTrackInsertAssetTrack <pCompositionPointer>, <pCompositionTrackID>, <pAssetPointer>, <pAssetTrackID>, <pStart>, <pDuration>, <pTime> |
mergAVCompositionTrackInsertEmptyTimeRange | Insert an empty time range into a track of a composition | mergAVCompositionTrackInsertEmptyTimeRange <pCompositionPointer>, <pCompositionTrackID>, <pStart>, <pDuration> |
mergAVCompositionTrackScaleTimeRange | Scale time range into a track of a composition | mergAVCompositionTrackScaleTimeRange <pCompositionPointer>, <pCompositionTrackID>, <pStart>, <pCurrentDuration>, <pNewDuration> |
mergAVVideoCompositionRelease | Release a video composition from memory | mergAVVideoCompositionRelease <pVideoCompositionPointer> |
mergAVVideoCompositionSet | mergAVVideoCompositionSet <pVideoCompositionPointer>, <pProp>, <pValue> | |
mergAVVideoCompositionAddInstruction | Add an instruction to a video composition | mergAVVideoCompositionAddInstruction <pVideoCompositionPointer>, <pStart>, <pDuration> |
mergAVVideoCompositionAddLayerInstruction | Add a layer instruction to the last instruction added to the video composition | mergAVVideoCompositionAddLayerInstruction <pVideoCompositionPointer>, <pCompositionPointer>, <pCompositionTrackID>, [<pTransform>], [<pTransformTransition>], [<pOpacity>], [<pOpacityTransition>] |
mergAVAssetExportSessionRelease | Release an asset export session from memory | mergAVAssetExportSessionRelease <pAssetExportSessionPointer> |
mergAVAssetExportSessionSet | mergAVAssetExportSessionSet <pAssetExportSessionPointer>, <pProp>, <pValue> | |
mergAVAssetExportSessionExport | Export the asset to a file asynchronously | mergAVAssetExportSessionExport <pAssetExportSessionPointer>, <pCompletionHandler> |
mergAVAssetExportSessionCancelExport | Cancel an export | mergAVAssetExportSessionCancelExport <pAssetExportSessionPointer> |
mergAVPlayerRelease | Release a player from memory | mergAVPlayerRelease <pPlayerPointer> |
mergAVPlayerSet | Set a player property | mergAVPlayerSet <pPlayerPointer>, <pProperty>, <pValue> |
mergAVPlayerDo | Perform a specified operation with the player | mergAVPlayerDo <pPlayerPointer>, <pDo>, [<pOption1>], [<pOption2>], [<pOption3>] |
mergAVPlayerReleaseTimeObserver | Stop observing the periodic or boundary times and release the time observer from memory | mergAVPlayerReleaseTimeObserver <pPlayerPointer>, <pTimeObserverPointer> |
mergAVAudioSessionSetCategory | Set the audio session category | mergAVAudioSessionSetCategory <pCategory>, [<pMixWithOthers>], [<pDuckOthers>], [<pAllowBluetooth>], [<pDefaultToSpeaker>] |
mergAVAudioSessionSetMode | iOS5+ | mergAVAudioSessionSetMode <pMode> |
mergAVAudioSessionSetActive | Activate/deactivate the audio session | mergAVAudioSessionSetActive <pActive> |
Message
Name | Summary | Syntax |
---|---|---|
mergAVMediaAccess | Set to the object that called mergAVRequestMediaAccess | mergAVMediaAccess <pType>, <pGranted> |
mergAVCamImageCaptured | Sent to the control that called mergAVCaptureImage | mergAVCamImageCaptured <pImage> |
mergAVCamImageSaved | Sent to the control that called mergAVCaptureImage | mergAVCamImageSaved <pFilePath> |
mergAVCamRecordingFinished | Sent to the control that called mergAVCaptureImage when the recording is finished | mergAVCamRecordingFinished <pFilePath> |
mergAVCamRecordingBegan | Sent to the control that called mergAVCaptureImage when the recording begins | mergAVCamRecordingBegan |
mergAVCamBarcodeFound | Sent to the control that called mergAVCamStartBarcodeReader when a barcode is detected | mergAVCamBarcodeFound <pBarcode>, <pBarcodeType> |
AVPlayerItemDidPlayToEndTimeNotification | Sent to the control that created the player when the player played to the end | AVPlayerItemDidPlayToEndTimeNotification <pPlayerPointer> |
AVPlayerItemFailedToPlayToEndTimeNotification | Sent to the control that created the player when the player failed to play to the end | AVPlayerItemFailedToPlayToEndTimeNotification <pPlayerPointer> |
AVPlayerItemTimeJumpedNotification | Sent to the control that created the player when when the itemâs current time has changed discontinuously | AVPlayerItemTimeJumpedNotification <pPlayerPointer> |
AVPlayerItemPlaybackStalledNotification | iOS 6 only | AVPlayerItemPlaybackStalledNotification <pPlayerPointer> |