FreeRDP
mf_audin.c
1 
23 #include <freerdp/config.h>
24 
25 #include "mfreerdp.h"
26 
27 #include "mf_audin.h"
28 #include "mf_interface.h"
29 
30 #include <freerdp/server/server-common.h>
31 #include <freerdp/log.h>
32 #define TAG SERVER_TAG("mac")
33 
34 static UINT mf_peer_audin_data(audin_server_context* audin, const SNDIN_DATA* data)
35 {
36  /* TODO: Implement */
37  WINPR_ASSERT(audin);
38  WINPR_ASSERT(data);
39 
40  WLog_WARN(TAG, "not implemented");
41  WLog_DBG(TAG, "receive %" PRIdz " bytes.", Stream_Length(data->Data));
42  return CHANNEL_RC_OK;
43 }
44 
45 BOOL mf_peer_audin_init(mfPeerContext* context)
46 {
47  WINPR_ASSERT(context);
48 
49  context->audin = audin_server_context_new(context->vcm);
50  context->audin->rdpcontext = &context->_p;
51  context->audin->userdata = context;
52 
53  context->audin->Data = mf_peer_audin_data;
54 
55  return audin_server_set_formats(context->audin, -1, NULL);
56 }
57 
58 void mf_peer_audin_uninit(mfPeerContext* context)
59 {
60  WINPR_ASSERT(context);
61 
62  audin_server_context_free(context->audin);
63  context->audin = NULL;
64 }