VirtualBox

source: vbox/trunk/src/VBox/Main/src-client/RecordingInternals.cpp@ 96407

Last change on this file since 96407 was 96407, checked in by vboxsync, 22 months ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1/* $Id: RecordingInternals.cpp 96407 2022-08-22 17:43:14Z vboxsync $ */
2/** @file
3 * Recording internals code.
4 */
5
6/*
7 * Copyright (C) 2012-2022 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#include "RecordingInternals.h"
29
30#include <iprt/assert.h>
31#include <iprt/mem.h>
32
33#ifdef VBOX_WITH_AUDIO_RECORDING
34/**
35 * Frees a previously allocated recording audio frame.
36 *
37 * @param pFrame Audio frame to free. The pointer will be invalid after return.
38 */
39void RecordingAudioFrameFree(PRECORDINGAUDIOFRAME pFrame)
40{
41 if (!pFrame)
42 return;
43
44 if (pFrame->pvBuf)
45 {
46 Assert(pFrame->cbBuf);
47 RTMemFree(pFrame->pvBuf);
48 }
49 RTMemFree(pFrame);
50 pFrame = NULL;
51}
52#endif
53
54/**
55 * Frees a recording video frame.
56 *
57 * @returns IPRT status code.
58 * @param pFrame Pointer to video frame to free. The pointer will be invalid after return.
59 */
60void RecordingVideoFrameFree(PRECORDINGVIDEOFRAME pFrame)
61{
62 if (!pFrame)
63 return;
64
65 if (pFrame->pu8RGBBuf)
66 {
67 Assert(pFrame->cbRGBBuf);
68 RTMemFree(pFrame->pu8RGBBuf);
69 }
70 RTMemFree(pFrame);
71}
72
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use