FreeRDP
client/camera_device_main.c File Reference
#include <winpr/assert.h>
#include "camera.h"

Macros

#define TAG   CHANNELS_TAG("rdpecam-device.client")
 

Functions

static void ecam_dev_write_media_type (wStream *s, CAM_MEDIA_TYPE_DESCRIPTION *mediaType)
 
static BOOL ecam_dev_read_media_type (wStream *s, CAM_MEDIA_TYPE_DESCRIPTION *mediaType)
 
static void ecam_dev_print_media_type (CAM_MEDIA_TYPE_DESCRIPTION *mediaType)
 
static UINT ecam_dev_send_sample_response (CameraDevice *dev, size_t streamIndex, const BYTE *sample, size_t size)
 
static UINT ecam_dev_sample_captured_callback (CameraDevice *dev, int streamIndex, const BYTE *sample, size_t size)
 
static void ecam_dev_stop_stream (CameraDevice *dev, size_t streamIndex)
 
static UINT ecam_dev_process_stop_streams_request (CameraDevice *dev, GENERIC_CHANNEL_CALLBACK *hchannel, wStream *s)
 
static UINT ecam_dev_process_start_streams_request (CameraDevice *dev, GENERIC_CHANNEL_CALLBACK *hchannel, wStream *s)
 
static UINT ecam_dev_process_property_list_request (CameraDevice *dev, GENERIC_CHANNEL_CALLBACK *hchannel, wStream *s)
 
static UINT ecam_dev_send_current_media_type_response (CameraDevice *dev, GENERIC_CHANNEL_CALLBACK *hchannel, CAM_MEDIA_TYPE_DESCRIPTION *mediaType)
 
static UINT ecam_dev_process_sample_request (CameraDevice *dev, GENERIC_CHANNEL_CALLBACK *hchannel, wStream *s)
 
static UINT ecam_dev_process_current_media_type_request (CameraDevice *dev, GENERIC_CHANNEL_CALLBACK *hchannel, wStream *s)
 
static UINT ecam_dev_send_media_type_list_response (CameraDevice *dev, GENERIC_CHANNEL_CALLBACK *hchannel, CAM_MEDIA_TYPE_DESCRIPTION *mediaTypes, size_t nMediaTypes)
 
static UINT ecam_dev_process_media_type_list_request (CameraDevice *dev, GENERIC_CHANNEL_CALLBACK *hchannel, wStream *s)
 
static UINT ecam_dev_send_stream_list_response (CameraDevice *dev, GENERIC_CHANNEL_CALLBACK *hchannel)
 
static UINT ecam_dev_process_stream_list_request (CameraDevice *dev, GENERIC_CHANNEL_CALLBACK *hchannel, wStream *s)
 
static UINT ecam_dev_process_activate_device_request (CameraDevice *dev, GENERIC_CHANNEL_CALLBACK *hchannel, wStream *s)
 
static UINT ecam_dev_process_deactivate_device_request (CameraDevice *dev, GENERIC_CHANNEL_CALLBACK *hchannel, wStream *s)
 
static UINT ecam_dev_on_data_received (IWTSVirtualChannelCallback *pChannelCallback, wStream *data)
 
static UINT ecam_dev_on_open (IWTSVirtualChannelCallback *pChannelCallback)
 
static UINT ecam_dev_on_close (IWTSVirtualChannelCallback *pChannelCallback)
 
static UINT ecam_dev_on_new_channel_connection (IWTSListenerCallback *pListenerCallback, IWTSVirtualChannel *pChannel, BYTE *Data, BOOL *pbAccept, IWTSVirtualChannelCallback **ppCallback)
 
CameraDeviceecam_dev_create (CameraPlugin *ecam, const char *deviceId, const char *deviceName)
 
void ecam_dev_destroy (void *obj)
 

Variables

static const CAM_MEDIA_FORMAT_INFO supportedFormats []
 
static const size_t nSupportedFormats = ARRAYSIZE(supportedFormats)
 

Macro Definition Documentation

◆ TAG

#define TAG   CHANNELS_TAG("rdpecam-device.client")

FreeRDP: A Remote Desktop Protocol Implementation MS-RDPECAM Implementation, Device Channels

Copyright 2024 Oleg Turovski oleg2.nosp@m.104@.nosp@m.hotma.nosp@m.il.c.nosp@m.om

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ ecam_dev_create()

CameraDevice* ecam_dev_create ( CameraPlugin ecam,
const char *  deviceId,
const char *  deviceName 
)

Function description

Returns
CameraDevice pointer or NULL in case of error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_destroy()

void ecam_dev_destroy ( void *  obj)

Function description

OBJECT_FREE_FN for devices hash table value

Returns
void
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_on_close()

static UINT ecam_dev_on_close ( IWTSVirtualChannelCallback *  pChannelCallback)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_on_data_received()

static UINT ecam_dev_on_data_received ( IWTSVirtualChannelCallback *  pChannelCallback,
wStream data 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_on_new_channel_connection()

static UINT ecam_dev_on_new_channel_connection ( IWTSListenerCallback *  pListenerCallback,
IWTSVirtualChannel *  pChannel,
BYTE Data,
BOOL *  pbAccept,
IWTSVirtualChannelCallback **  ppCallback 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_on_open()

static UINT ecam_dev_on_open ( IWTSVirtualChannelCallback *  pChannelCallback)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_print_media_type()

static void ecam_dev_print_media_type ( CAM_MEDIA_TYPE_DESCRIPTION mediaType)
static

Function description

Returns
void
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_process_activate_device_request()

static UINT ecam_dev_process_activate_device_request ( CameraDevice dev,
GENERIC_CHANNEL_CALLBACK hchannel,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_process_current_media_type_request()

static UINT ecam_dev_process_current_media_type_request ( CameraDevice dev,
GENERIC_CHANNEL_CALLBACK hchannel,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_process_deactivate_device_request()

static UINT ecam_dev_process_deactivate_device_request ( CameraDevice dev,
GENERIC_CHANNEL_CALLBACK hchannel,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_process_media_type_list_request()

static UINT ecam_dev_process_media_type_list_request ( CameraDevice dev,
GENERIC_CHANNEL_CALLBACK hchannel,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_process_property_list_request()

static UINT ecam_dev_process_property_list_request ( CameraDevice dev,
GENERIC_CHANNEL_CALLBACK hchannel,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_process_sample_request()

static UINT ecam_dev_process_sample_request ( CameraDevice dev,
GENERIC_CHANNEL_CALLBACK hchannel,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_process_start_streams_request()

static UINT ecam_dev_process_start_streams_request ( CameraDevice dev,
GENERIC_CHANNEL_CALLBACK hchannel,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_process_stop_streams_request()

static UINT ecam_dev_process_stop_streams_request ( CameraDevice dev,
GENERIC_CHANNEL_CALLBACK hchannel,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_process_stream_list_request()

static UINT ecam_dev_process_stream_list_request ( CameraDevice dev,
GENERIC_CHANNEL_CALLBACK hchannel,
wStream s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_read_media_type()

static BOOL ecam_dev_read_media_type ( wStream s,
CAM_MEDIA_TYPE_DESCRIPTION mediaType 
)
static

Function description

Returns
TRUE if success
Here is the caller graph for this function:

◆ ecam_dev_sample_captured_callback()

static UINT ecam_dev_sample_captured_callback ( CameraDevice dev,
int  streamIndex,
const BYTE sample,
size_t  size 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_send_current_media_type_response()

static UINT ecam_dev_send_current_media_type_response ( CameraDevice dev,
GENERIC_CHANNEL_CALLBACK hchannel,
CAM_MEDIA_TYPE_DESCRIPTION mediaType 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_send_media_type_list_response()

static UINT ecam_dev_send_media_type_list_response ( CameraDevice dev,
GENERIC_CHANNEL_CALLBACK hchannel,
CAM_MEDIA_TYPE_DESCRIPTION mediaTypes,
size_t  nMediaTypes 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_send_sample_response()

static UINT ecam_dev_send_sample_response ( CameraDevice dev,
size_t  streamIndex,
const BYTE sample,
size_t  size 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_send_stream_list_response()

static UINT ecam_dev_send_stream_list_response ( CameraDevice dev,
GENERIC_CHANNEL_CALLBACK hchannel 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_stop_stream()

static void ecam_dev_stop_stream ( CameraDevice dev,
size_t  streamIndex 
)
static

Function description

Returns
void
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_dev_write_media_type()

static void ecam_dev_write_media_type ( wStream s,
CAM_MEDIA_TYPE_DESCRIPTION mediaType 
)
static

Function description

Returns
void
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ nSupportedFormats

const size_t nSupportedFormats = ARRAYSIZE(supportedFormats)
static

◆ supportedFormats

const CAM_MEDIA_FORMAT_INFO supportedFormats[]
static
Initial value:
= {
}
@ CAM_MEDIA_FORMAT_RGB24
Definition: channels/rdpecam.h:179
@ CAM_MEDIA_FORMAT_NV12
Definition: channels/rdpecam.h:177
@ CAM_MEDIA_FORMAT_YUY2
Definition: channels/rdpecam.h:176
@ CAM_MEDIA_FORMAT_H264
Definition: channels/rdpecam.h:174
@ CAM_MEDIA_FORMAT_RGB32
Definition: channels/rdpecam.h:180
@ CAM_MEDIA_FORMAT_I420
Definition: channels/rdpecam.h:178