FreeRDP
camera.h File Reference
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libswscale/swscale.h>
#include <libavutil/imgutils.h>
#include <winpr/wlog.h>
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <freerdp/client/channels.h>
#include <freerdp/channels/log.h>
#include <freerdp/channels/rdpecam.h>
#include <freerdp/codecs.h>
#include <freerdp/primitives.h>
This graph shows which files directly or indirectly include this file:

Data Structures

struct  CameraPlugin
 
struct  CAM_MEDIA_FORMAT_INFO
 
struct  CameraDeviceStream
 
struct  CameraDevice
 
struct  ICamHal
 
struct  FREERDP_CAMERA_HAL_ENTRY_POINTS
 

Macros

#define ECAM_PROTO_VERSION   0x02
 
#define ECAM_DEVICE_MAX_STREAMS   1
 
#define ECAM_MAX_MEDIA_TYPE_DESCRIPTORS   256
 
#define ECAM_MAX_SAMPLE_CREDITS   8
 
#define ECAM_SAMPLE_RESPONSE_BUFFER_SIZE   (1024 * 4050)
 

Typedefs

typedef UINT(* ICamHalEnumCallback) (CameraPlugin *ecam, GENERIC_CHANNEL_CALLBACK *hchannel, const char *deviceId, const char *deviceName)
 
typedef UINT(* ICamHalSampleCapturedCallback) (CameraDevice *dev, int streamIndex, const BYTE *sample, size_t size)
 
typedef UINT(* PREGISTERCAMERAHAL) (IWTSPlugin *plugin, ICamHal *hal)
 
typedef FREERDP_CAMERA_HAL_ENTRY_POINTSPFREERDP_CAMERA_HAL_ENTRY_POINTS
 
typedef UINT(* PFREERDP_CAMERA_HAL_ENTRY) (PFREERDP_CAMERA_HAL_ENTRY_POINTS pEntryPoints)
 

Functions

static INLINE CAM_MEDIA_FORMAT streamInputFormat (CameraDeviceStream *stream)
 
static INLINE CAM_MEDIA_FORMAT streamOutputFormat (CameraDeviceStream *stream)
 
UINT ecam_channel_send_generic_msg (CameraPlugin *ecam, GENERIC_CHANNEL_CALLBACK *hchannel, CAM_MSG_ID msg)
 
UINT ecam_channel_send_error_response (CameraPlugin *ecam, GENERIC_CHANNEL_CALLBACK *hchannel, CAM_ERROR_CODE code)
 
UINT ecam_channel_write (CameraPlugin *ecam, GENERIC_CHANNEL_CALLBACK *hchannel, CAM_MSG_ID msg, wStream *out, BOOL freeStream)
 
CameraDeviceecam_dev_create (CameraPlugin *ecam, const char *deviceId, const char *deviceName)
 
void ecam_dev_destroy (void *dev)
 
BOOL ecam_encoder_context_init (CameraDeviceStream *stream)
 
BOOL ecam_encoder_context_free (CameraDeviceStream *stream)
 
BOOL ecam_encoder_compress (CameraDeviceStream *stream, const BYTE *srcData, size_t srcSize, BYTE **ppDstData, size_t *pDstSize)
 

Macro Definition Documentation

◆ ECAM_DEVICE_MAX_STREAMS

#define ECAM_DEVICE_MAX_STREAMS   1

◆ ECAM_MAX_MEDIA_TYPE_DESCRIPTORS

#define ECAM_MAX_MEDIA_TYPE_DESCRIPTORS   256

◆ ECAM_MAX_SAMPLE_CREDITS

#define ECAM_MAX_SAMPLE_CREDITS   8

◆ ECAM_PROTO_VERSION

#define ECAM_PROTO_VERSION   0x02

FreeRDP: A Remote Desktop Protocol Implementation MS-RDPECAM Implementation, main header file

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.

◆ ECAM_SAMPLE_RESPONSE_BUFFER_SIZE

#define ECAM_SAMPLE_RESPONSE_BUFFER_SIZE   (1024 * 4050)

Typedef Documentation

◆ ICamHalEnumCallback

typedef UINT(* ICamHalEnumCallback) (CameraPlugin *ecam, GENERIC_CHANNEL_CALLBACK *hchannel, const char *deviceId, const char *deviceName)

Subsystem (Hardware Abstraction Layer, HAL) Interface

◆ ICamHalSampleCapturedCallback

typedef UINT(* ICamHalSampleCapturedCallback) (CameraDevice *dev, int streamIndex, const BYTE *sample, size_t size)

◆ PFREERDP_CAMERA_HAL_ENTRY

typedef UINT(* PFREERDP_CAMERA_HAL_ENTRY) (PFREERDP_CAMERA_HAL_ENTRY_POINTS pEntryPoints)

◆ PFREERDP_CAMERA_HAL_ENTRY_POINTS

◆ PREGISTERCAMERAHAL

typedef UINT(* PREGISTERCAMERAHAL) (IWTSPlugin *plugin, ICamHal *hal)

Function Documentation

◆ ecam_channel_send_error_response()

UINT ecam_channel_send_error_response ( CameraPlugin ecam,
GENERIC_CHANNEL_CALLBACK hchannel,
CAM_ERROR_CODE  code 
)

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_channel_send_generic_msg()

UINT ecam_channel_send_generic_msg ( CameraPlugin ecam,
GENERIC_CHANNEL_CALLBACK hchannel,
CAM_MSG_ID  msg 
)

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_channel_write()

UINT ecam_channel_write ( CameraPlugin ecam,
GENERIC_CHANNEL_CALLBACK hchannel,
CAM_MSG_ID  msg,
wStream out,
BOOL  freeStream 
)

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_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_encoder_compress()

BOOL ecam_encoder_compress ( CameraDeviceStream stream,
const BYTE srcData,
size_t  srcSize,
BYTE **  ppDstData,
size_t *  pDstSize 
)

Function description

Returns
success/failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_encoder_context_free()

BOOL ecam_encoder_context_free ( CameraDeviceStream stream)

Function description

Returns
success/failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecam_encoder_context_init()

BOOL ecam_encoder_context_init ( CameraDeviceStream stream)

Function description

Returns
success/failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ streamInputFormat()

static INLINE CAM_MEDIA_FORMAT streamInputFormat ( CameraDeviceStream stream)
static
Here is the caller graph for this function:

◆ streamOutputFormat()

static INLINE CAM_MEDIA_FORMAT streamOutputFormat ( CameraDeviceStream stream)
static
Here is the caller graph for this function: