# Raw data overview The Video SDK provides you with an option to access real-time raw audio, video, and share data during a session, so you can apply additional effects and enhance the user experience. Use a processor component to apply effects or transformations to each piece of data in real-time. An example of raw share data is when a user shares their screen. - Receive and send raw share video data using the same logic as video data, except get the share pipe instead of the video pipe in the raw data pipe method. - Receive and send raw share audio data using the same method used for raw audio data. Follow the process outlined in this flowchart to capture and process raw data. ![Flowchart outlining the raw data flow](/img/raw-data-flow.png) ## Select raw data memory mode In order to utilize raw data of any type, you must first select the memory mode you wish to use. The SDK supports heap-based and stack-based memory modes. ### Stack-based memory - Variables are allocated automatically and deallocated after the data leaves scope. - Variables are not accessible from or transferable to other threads. - Typically has faster access than heap-based memory allocation. - Memory space is managed by the CPU and will not become fragmented. - Variables cannot be resized. See [Stack-based memory allocation](https://en.wikipedia.org/wiki/Stack-based_memory_allocation) for details. Specify with: `ZMVideoSDKRawDataMemoryMode_Stack` ### Heap-based memory - Variables are allocated and deallocated manually. You must allocate and free variables to avoid memory leaks. - Variables can be accessed globally. - Has relatively slower access than stack-based memory allocation. - Has no guarantee on the efficiency of memory space and can become fragmented. - Variables can be resized. See [Heap-based dynamic memory allocation](https://en.wikipedia.org/wiki/Memory_management#DYNAMIC) for details. Specify with: `ZMVideoSDKRawDataMemoryMode_Heap` ## Specify memory mode After determining which memory mode is right for you, specify it when the SDK is initialized. Note that this must be done for audio, video, and share individually. To specify a raw data memory mode, provide one of these enum cases to the `ZMVideoSDKInitParams` during SDK initialization. ```objectivec ZMVideoSDKInitParams *initParams = [[ZMVideoSDKInitParams alloc] init]; // Set audio memory mode to heap. initParams.audioRawdataMemoryMode = ZMVideoSDKRawDataMemoryMode_Heap; // Set video memory mode to heap. initParams.videoRawdataMemoryMode = ZMVideoSDKRawDataMemoryMode_Heap; // Set share memory mode to heap. initParams.shareRawdataMemoryMode = ZMVideoSDKRawDataMemoryMode_Heap; ``` ```objectivec ZMVideoSDKInitParams *initParams = [[ZMVideoSDKInitParams alloc] init]; // Set audio memory mode to heap. initParams.audioRawdataMemoryMode = ZMVideoSDKRawDataMemoryMode_Heap; // Set video memory mode to heap. initParams.videoRawdataMemoryMode = ZMVideoSDKRawDataMemoryMode_Heap; // Set share memory mode to heap. initParams.shareRawdataMemoryMode = ZMVideoSDKRawDataMemoryMode_Heap; ``` Once the memory mode is set, you can [receive raw data](/docs/video-sdk/macos/raw-data/receive-raw-data/) and [send raw data](/docs/video-sdk/macos/raw-data/send-raw-data/). To remove a user's background using the alpha channel, see [Raw video with alpha channel](/docs/video-sdk/macos/raw-data/raw-video-alpha-channel/).