Last change
on this file since 94521 was 93115, checked in by vboxsync, 2 years ago |
scm --update-copyright-year
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.5 KB
|
Rev | Line | |
---|
[74992] | 1 | /* $Id: RecordingInternals.cpp 93115 2022-01-01 11:31:46Z vboxsync $ */
|
---|
| 2 | /** @file
|
---|
[75344] | 3 | * Recording internals code.
|
---|
[74992] | 4 | */
|
---|
| 5 |
|
---|
| 6 | /*
|
---|
[93115] | 7 | * Copyright (C) 2012-2022 Oracle Corporation
|
---|
[74992] | 8 | *
|
---|
| 9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
| 10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
| 11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
| 12 | * General Public License (GPL) as published by the Free Software
|
---|
| 13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
| 14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
| 15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
| 16 | */
|
---|
| 17 |
|
---|
[75344] | 18 | #include "RecordingInternals.h"
|
---|
[74992] | 19 |
|
---|
| 20 | #include <iprt/assert.h>
|
---|
| 21 | #include <iprt/mem.h>
|
---|
| 22 |
|
---|
[75346] | 23 | #ifdef VBOX_WITH_AUDIO_RECORDING
|
---|
[74992] | 24 | /**
|
---|
[75355] | 25 | * Frees a previously allocated recording audio frame.
|
---|
[74992] | 26 | *
|
---|
| 27 | * @param pFrame Audio frame to free. The pointer will be invalid after return.
|
---|
| 28 | */
|
---|
[75354] | 29 | void RecordingAudioFrameFree(PRECORDINGAUDIOFRAME pFrame)
|
---|
[74992] | 30 | {
|
---|
| 31 | if (!pFrame)
|
---|
| 32 | return;
|
---|
| 33 |
|
---|
| 34 | if (pFrame->pvBuf)
|
---|
| 35 | {
|
---|
| 36 | Assert(pFrame->cbBuf);
|
---|
| 37 | RTMemFree(pFrame->pvBuf);
|
---|
| 38 | }
|
---|
| 39 | RTMemFree(pFrame);
|
---|
| 40 | pFrame = NULL;
|
---|
| 41 | }
|
---|
| 42 | #endif
|
---|
| 43 |
|
---|
| 44 | /**
|
---|
[75355] | 45 | * Frees a recording video frame.
|
---|
[74992] | 46 | *
|
---|
| 47 | * @returns IPRT status code.
|
---|
| 48 | * @param pFrame Pointer to video frame to free. The pointer will be invalid after return.
|
---|
| 49 | */
|
---|
[75354] | 50 | void RecordingVideoFrameFree(PRECORDINGVIDEOFRAME pFrame)
|
---|
[74992] | 51 | {
|
---|
| 52 | if (!pFrame)
|
---|
| 53 | return;
|
---|
| 54 |
|
---|
| 55 | if (pFrame->pu8RGBBuf)
|
---|
| 56 | {
|
---|
| 57 | Assert(pFrame->cbRGBBuf);
|
---|
| 58 | RTMemFree(pFrame->pu8RGBBuf);
|
---|
| 59 | }
|
---|
| 60 | RTMemFree(pFrame);
|
---|
| 61 | }
|
---|
| 62 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.