Changeset 90891 in vbox for trunk/src/VBox/ValidationKit/utils/audio
- Timestamp:
- Aug 25, 2021 5:08:03 PM (3 years ago)
- Location:
- trunk/src/VBox/ValidationKit/utils/audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp
r90887 r90891 51 51 * Defined Constants And Macros * 52 52 *********************************************************************************************************************************/ 53 /**54 * Structure for keeping a user context for the test service callbacks.55 */56 typedef struct ATSCALLBACKCTX57 {58 /** The test environment bound to this context. */59 PAUDIOTESTENV pTstEnv;60 /** Absolute path to the packed up test set archive.61 * Keep it simple for now and only support one (open) archive at a time. */62 char szTestSetArchive[RTPATH_MAX];63 /** File handle to the (opened) test set archive for reading. */64 RTFILE hTestSetArchive;65 /** Number of currently connected clients. */66 uint8_t cClients;67 } ATSCALLBACKCTX;68 typedef ATSCALLBACKCTX *PATSCALLBACKCTX;69 53 70 54 … … 911 895 RTStrCopy(pTstEnv->TcpOpts.szBindAddr, sizeof(pTstEnv->TcpOpts.szBindAddr), "0.0.0.0"); 912 896 897 /* Set a back reference to the test environment for the callback context. */ 898 pTstEnv->CallbackCtx.pTstEnv = pTstEnv; 899 900 ATSCALLBACKS Callbacks; 901 RT_ZERO(Callbacks); 902 Callbacks.pvUser = &pTstEnv->CallbackCtx; 903 913 904 if (pTstEnv->enmMode == AUDIOTESTMODE_GUEST) 914 905 { 915 ATSCALLBACKCTX Ctx;916 Ctx.pTstEnv = pTstEnv;917 918 ATSCALLBACKS Callbacks;919 RT_ZERO(Callbacks);920 906 Callbacks.pfnHowdy = audioTestGstAtsHowdyCallback; 921 907 Callbacks.pfnBye = audioTestGstAtsByeCallback; … … 927 913 Callbacks.pfnTestSetSendRead = audioTestGstAtsTestSetSendReadCallback; 928 914 Callbacks.pfnTestSetSendEnd = audioTestGstAtsTestSetSendEndCallback; 929 Callbacks.pvUser = &Ctx;930 915 931 916 if (!pTstEnv->TcpOpts.uBindPort) … … 951 936 else /* Host mode */ 952 937 { 953 954 ATSCALLBACKCTX Ctx;955 Ctx.pTstEnv = pTstEnv;956 957 ATSCALLBACKS Callbacks;958 RT_ZERO(Callbacks);959 Callbacks.pvUser = &Ctx;960 961 938 if (!pTstEnv->TcpOpts.uBindPort) 962 939 pTstEnv->TcpOpts.uBindPort = ATS_TCP_DEF_BIND_PORT_HOST; -
trunk/src/VBox/ValidationKit/utils/audio/vkatInternal.h
r90887 r90891 193 193 /** Pointer to audio test TCP options. */ 194 194 typedef AUDIOTESTENVTCPOPTS *PAUDIOTESTENVTCPOPTS; 195 196 /** 197 * Structure for keeping a user context for the test service callbacks. 198 */ 199 typedef struct ATSCALLBACKCTX 200 { 201 /** The test environment bound to this context. */ 202 PAUDIOTESTENV pTstEnv; 203 /** Absolute path to the packed up test set archive. 204 * Keep it simple for now and only support one (open) archive at a time. */ 205 char szTestSetArchive[RTPATH_MAX]; 206 /** File handle to the (opened) test set archive for reading. */ 207 RTFILE hTestSetArchive; 208 /** Number of currently connected clients. */ 209 uint8_t cClients; 210 } ATSCALLBACKCTX; 211 typedef ATSCALLBACKCTX *PATSCALLBACKCTX; 195 212 196 213 /** … … 236 253 /** ATS server instance to use. */ 237 254 ATSSERVER Srv; 255 /** ATS callback context to use. */ 256 ATSCALLBACKCTX CallbackCtx; 238 257 union 239 258 {
Note:
See TracChangeset
for help on using the changeset viewer.