|
| 1 | +From 293b00e131f49ac4f59c88b063635ff45304ca9c Mon Sep 17 00:00:00 2001 |
| 2 | + |
| 3 | +Date: Fri, 4 Mar 2022 09:57:26 +0000 |
| 4 | +Subject: [PATCH 1/2] Revert "BCMCZ-121: remove gstsvpmeta.h" |
| 5 | + |
| 6 | +This reverts commit 6584b71d647c5b31869959767632e9db794ce21b. |
| 7 | +--- |
| 8 | + reference/util/src/gst_svp_util.h | 4 +- |
| 9 | + reference/util/src/gstsvpmeta.h | 101 ++++++++++++++++++++++++++++++ |
| 10 | + 2 files changed, 104 insertions(+), 1 deletion(-) |
| 11 | + create mode 100644 reference/util/src/gstsvpmeta.h |
| 12 | + |
| 13 | +diff --git a/reference/util/src/gst_svp_util.h b/reference/util/src/gst_svp_util.h |
| 14 | +index 81b3eec..7ac9165 100755 |
| 15 | +--- a/reference/util/src/gst_svp_util.h |
| 16 | ++++ b/reference/util/src/gst_svp_util.h |
| 17 | +@@ -53,8 +53,10 @@ |
| 18 | + #include "astra_crypto_types.h" |
| 19 | + #include "libvpucom_api.h" |
| 20 | + #endif |
| 21 | ++ |
| 22 | + #include "nexus_memory.h" |
| 23 | +-#include <gst/gstsvpmeta.h> |
| 24 | ++#include "gstsvpmeta.h" |
| 25 | ++#include "sage_srai.h" |
| 26 | + |
| 27 | + gboolean svp_util_open(void); |
| 28 | + void svp_util_close(); |
| 29 | +diff --git a/reference/util/src/gstsvpmeta.h b/reference/util/src/gstsvpmeta.h |
| 30 | +new file mode 100644 |
| 31 | +index 0000000..1e6107f |
| 32 | +--- /dev/null |
| 33 | ++++ b/reference/util/src/gstsvpmeta.h |
| 34 | +@@ -0,0 +1,101 @@ |
| 35 | ++/****************************************************************************** |
| 36 | ++ * Copyright (C) 2017 Broadcom. The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries. |
| 37 | ++ * |
| 38 | ++ * This program is the proprietary software of Broadcom and/or its licensors, |
| 39 | ++ * and may only be used, duplicated, modified or distributed pursuant to the terms and |
| 40 | ++ * conditions of a separate, written license agreement executed between you and Broadcom |
| 41 | ++ * (an "Authorized License"). Except as set forth in an Authorized License, Broadcom grants |
| 42 | ++ * no license (express or implied), right to use, or waiver of any kind with respect to the |
| 43 | ++ * Software, and Broadcom expressly reserves all rights in and to the Software and all |
| 44 | ++ * intellectual property rights therein. IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU |
| 45 | ++ * HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY |
| 46 | ++ * NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. |
| 47 | ++ * |
| 48 | ++ * Except as expressly set forth in the Authorized License, |
| 49 | ++ * |
| 50 | ++ * 1. This program, including its structure, sequence and organization, constitutes the valuable trade |
| 51 | ++ * secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof, |
| 52 | ++ * and to use this information only in connection with your use of Broadcom integrated circuit products. |
| 53 | ++ * |
| 54 | ++ * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" |
| 55 | ++ * AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR |
| 56 | ++ * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO |
| 57 | ++ * THE SOFTWARE. BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES |
| 58 | ++ * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, |
| 59 | ++ * LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION |
| 60 | ++ * OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF |
| 61 | ++ * USE OR PERFORMANCE OF THE SOFTWARE. |
| 62 | ++ * |
| 63 | ++ * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS |
| 64 | ++ * LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR |
| 65 | ++ * EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR |
| 66 | ++ * USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF |
| 67 | ++ * THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT |
| 68 | ++ * ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE |
| 69 | ++ * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF |
| 70 | ++ * ANY LIMITED REMEDY. |
| 71 | ++ ******************************************************************************/ |
| 72 | ++ |
| 73 | ++#ifndef __GST_SVP_META_H__ |
| 74 | ++#define __GST_SVP_META_H__ |
| 75 | ++ |
| 76 | ++#include <gst/gst.h> |
| 77 | ++ |
| 78 | ++G_BEGIN_DECLS |
| 79 | ++ |
| 80 | ++#define GST_SVP_SYSTEM_ID_CAPS_FIELD "svp-system" |
| 81 | ++ |
| 82 | ++typedef struct _GstSvpMeta GstSvpMeta; |
| 83 | ++ |
| 84 | ++typedef void (*GstSvpMetaCustomRelease)(GstStructure *info); |
| 85 | ++ |
| 86 | ++struct _GstSvpMeta |
| 87 | ++{ |
| 88 | ++ GstMeta meta; |
| 89 | ++ GstStructure *info; |
| 90 | ++ GstSvpMetaCustomRelease release; |
| 91 | ++}; |
| 92 | ++ |
| 93 | ++GType gst_svp_meta_api_get_type (void); |
| 94 | ++ |
| 95 | ++#define GST_SVP_META_API_TYPE (gst_svp_meta_api_get_type()) |
| 96 | ++ |
| 97 | ++#ifdef BGST_WEBKIT_CDM |
| 98 | ++#define gst_buffer_get_svp_meta(b) ((GstSvpMeta*)gst_buffer_get_meta ((b), GST_SVP_META_API_TYPE)) |
| 99 | ++#else |
| 100 | ++#define gst_buffer_get_svp_meta(b) NULL |
| 101 | ++#endif |
| 102 | ++ |
| 103 | ++#define GST_SVP_META_INFO (gst_svp_meta_get_info()) |
| 104 | ++ |
| 105 | ++const GstMetaInfo *gst_svp_meta_get_info (void); |
| 106 | ++ |
| 107 | ++/* |
| 108 | ++ * GstBuffer *buffer - buffer to which meta data will be added |
| 109 | ++ * GstStructure *info - metada structure |
| 110 | ++ * This structure should contain: |
| 111 | ++ * "secure_buffer" : G_TYPE_POINTER |
| 112 | ++ * "chunks_cnt" : G_TYPE_UINT |
| 113 | ++ * "chunks_info" : GST_TYPE_BUFFER |
| 114 | ++ * data of this buffer contains |
| 115 | ++ * for (i=0; i<chunks_cnt; i++) { |
| 116 | ++ * guint32 clear_size; |
| 117 | ++ * guint32 encrypted_size; |
| 118 | ++ * guint32 secure_buffer_offset; |
| 119 | ++ * } |
| 120 | ++ * "clear size" : size of clear data part in "buffer.data" |
| 121 | ++ * "encrypted_size" : size of encrypted data part in "buffer.data" available as clear in "secure_buffer" |
| 122 | ++ * "secure_buffer_offset" : offset from the begining of "secure_buffer" where decrypted data of encrypted part is stored |
| 123 | ++ * data in secure buffer can be stored with an alignment, so this offset should be used to access |
| 124 | ++ * begining of decrypted part |
| 125 | ++ * |
| 126 | ++ * buffer.data = {clear_1, encrytped_1, clear_2, encrypted_2, ...} |
| 127 | ++ * secure_buffer = {decrypted_1,decrytped_2 , ...} |
| 128 | ++ * "decrypted_N" is clear data after decrypting "encrypted_N" |
| 129 | ++ * |
| 130 | ++ * GstSvpMetaCustomRelease *release - custom fuction to release any custom specific data present in "info" |
| 131 | ++ */ |
| 132 | ++GstSvpMeta *gst_buffer_add_svp_meta (GstBuffer * buffer, GstStructure * info, GstSvpMetaCustomRelease release); |
| 133 | ++ |
| 134 | ++G_END_DECLS |
| 135 | ++#endif /* __GST_SVP_META_H__ */ |
| 136 | +-- |
| 137 | +2.25.1 |
| 138 | + |
0 commit comments