Namespaces | |
liteav | |
Data Structures | |
struct | TXCameraCaptureParam |
class | ITXDeviceInfo |
class | ITXDeviceCollection |
class | ITXDeviceObserver |
class | ITXDeviceManager |
Macros | |
#define | __ITXDEVICEMANAGER_H__ |
Tencent Cloud Device Management Module.
Module: audio/video device management module Description: manages audio/video devices such as camera, mic, and speaker.
struct liteav::TXCameraCaptureParam |
Camera acquisition parameters
This setting determines the quality of the local preview image.
class liteav::ITXDeviceInfo |
Audio/Video device information (for desktop OS)
This structure describes key information (such as device ID and device name) of an audio/video device, so that users can choose on the UI the device to use.
Public Member Functions | |
virtual const char * | getDeviceName ()=0 |
virtual const char * | getDevicePID ()=0 |
virtual void | release ()=0 |
Protected Member Functions | |
virtual | ~ITXDeviceInfo () |
|
inlineprotectedvirtual |
|
pure virtual |
device name (UTF-8)
|
pure virtual |
device PID (UTF-8)
|
pure virtual |
release function, don't use delete!!!
class liteav::ITXDeviceCollection |
Device information list (for desktop OS)
This structure functions as std::vector<ITXDeviceInfo> does. It solves the binary compatibility issue between different versions of STL containers.
Public Member Functions | |
virtual uint32_t | getCount ()=0 |
virtual const char * | getDeviceName (uint32_t index)=0 |
virtual const char * | getDevicePID (uint32_t index)=0 |
virtual const char * | getDeviceProperties (uint32_t index)=0 |
virtual void | release ()=0 |
Protected Member Functions | |
virtual | ~ITXDeviceCollection () |
|
inlineprotectedvirtual |
|
pure virtual |
Size of this list.
|
pure virtual |
device name (UTF-8)
index | value in [0,getCount) |
|
pure virtual |
device PID (UTF-8)
index | value in [0,getCount) |
|
pure virtual |
device properties (json format)
index | value in [0,getCount) |
|
pure virtual |
release function, don't use delete!!!
class liteav::ITXDeviceObserver |
Public Member Functions | |
virtual | ~ITXDeviceObserver () |
virtual void | onDeviceChanged (const char *deviceId, TXMediaDeviceType type, TXMediaDeviceState state) |
|
inlinevirtual |
|
inlinevirtual |
The status of a local device changed (for desktop OS only)
The SDK returns this callback when a local device (camera, mic, or speaker) is connected or disconnected.
deviceId | Device ID |
type | Device type |
state | Device status. 0 : connected; 1 : disconnected; 2 : started |
class liteav::ITXDeviceManager |
Protected Member Functions | |
ITXDeviceManager () | |
virtual | ~ITXDeviceManager () |
Device APIs for mobile OS | |
virtual bool | isFrontCamera ()=0 |
virtual int | switchCamera (bool frontCamera)=0 |
virtual float | getCameraZoomMaxRatio ()=0 |
virtual int | setCameraZoomRatio (float zoomRatio)=0 |
virtual bool | isAutoFocusEnabled ()=0 |
virtual int | enableCameraAutoFocus (bool enabled)=0 |
virtual int | setCameraFocusPosition (float x, float y)=0 |
virtual int | enableCameraTorch (bool enabled)=0 |
virtual int | setAudioRoute (TXAudioRoute route)=0 |
Device APIs for desktop OS | |
virtual ITXDeviceCollection * | getDevicesList (TXMediaDeviceType type)=0 |
virtual int | setCurrentDevice (TXMediaDeviceType type, const char *deviceId)=0 |
virtual ITXDeviceInfo * | getCurrentDevice (TXMediaDeviceType type)=0 |
virtual int | setCurrentDeviceVolume (TXMediaDeviceType type, uint32_t volume)=0 |
virtual uint32_t | getCurrentDeviceVolume (TXMediaDeviceType type)=0 |
virtual int | setCurrentDeviceMute (TXMediaDeviceType type, bool mute)=0 |
virtual bool | getCurrentDeviceMute (TXMediaDeviceType type)=0 |
virtual int | startCameraDeviceTest (void *view)=0 |
virtual int | stopCameraDeviceTest ()=0 |
virtual int | startMicDeviceTest (uint32_t interval)=0 |
virtual int | stopMicDeviceTest ()=0 |
virtual int | startSpeakerDeviceTest (const char *filePath)=0 |
virtual int | stopSpeakerDeviceTest ()=0 |
virtual int | startCameraDeviceTest (ITRTCVideoRenderCallback *callback)=0 |
virtual int | setApplicationPlayVolume (int volume)=0 |
virtual int | getApplicationPlayVolume ()=0 |
virtual int | setApplicationMuteState (bool bMute)=0 |
virtual bool | getApplicationMuteState ()=0 |
virtual void | setCameraCapturerParam (const TXCameraCaptureParam ¶ms)=0 |
virtual void | setDeviceObserver (ITXDeviceObserver *observer)=0 |
Disused APIs (the corresponding new APIs are recommended) | |
virtual int | setSystemVolumeType (TXSystemVolumeType type)=0 |
|
inlineprotected |
|
inlineprotectedvirtual |
|
pure virtual |
Enabling auto focus (for mobile OS)
After auto focus is enabled, the camera will automatically detect and always focus on faces.
|
pure virtual |
Enabling/Disabling flash, i.e., the torch mode (for mobile OS)
|
pure virtual |
Querying whether the current process is muted in the volume mixer (for Windows)
|
pure virtual |
Getting the volume of the current process in the volume mixer (for Windows)
|
pure virtual |
Getting the maximum zoom ratio of the camera (for mobile OS)
|
pure virtual |
Getting the device currently in use (for desktop OS)
|
pure virtual |
Querying whether the current device is muted (for desktop OS)
This API is used to query whether the mic or speaker is muted. Camera muting is not supported.
|
pure virtual |
Getting the volume of the current device (for desktop OS)
This API is used to get the capturing volume of the mic or playback volume of the speaker, but not the volume of the camera.
|
pure virtual |
Getting the device list (for desktop OS)
type | Device type. Set it to the type of device you want to get. For details, please see the definition of TXMediaDeviceType . |
ITXDeviceCollection
object, after using this API, please call the release
method to release the resources.delete
to release the Collection object returned as deleting the ITXDeviceCollection* pointer will cause crash.type
are TXMediaDeviceTypeMic
, TXMediaDeviceTypeSpeaker
, and TXMediaDeviceTypeCamera
.
|
pure virtual |
Querying whether automatic face detection is supported (for mobile OS)
|
pure virtual |
Querying whether the front camera is being used
|
pure virtual |
Muting the current process in the volume mixer (for Windows)
|
pure virtual |
Setting the volume of the current process in the volume mixer (for Windows)
|
pure virtual |
Setting the audio route (for mobile OS)
A mobile phone has two audio playback devices: the receiver at the top and the speaker at the bottom. If the audio route is set to the receiver, the volume is relatively low, and audio can be heard only when the phone is put near the ear. This mode has a high level of privacy and is suitable for answering calls. If the audio route is set to the speaker, the volume is relatively high, and there is no need to put the phone near the ear. This mode enables the "hands-free" feature.
|
pure virtual |
Set camera acquisition preferences
|
pure virtual |
Adjusting the focus (for mobile OS)
This API can be used to achieve the following:
position | The spot to focus on. Pass in the coordinates of the spot you want to focus on. |
|
pure virtual |
Setting the camera zoom ratio (for mobile OS)
zoomRatio | Value range: 1-5. 1 indicates the widest angle of view (original), and 5 the narrowest angle of view (zoomed in). |
|
pure virtual |
Setting the device to use (for desktop OS)
type | Device type. For details, please see the definition of TXMediaDeviceType . |
deviceId | Device ID. You can get the ID of a device using the getDevicesList API. |
|
pure virtual |
Muting the current device (for desktop OS)
This API is used to mute the mic or speaker, but not the camera.
|
pure virtual |
Setting the volume of the current device (for desktop OS)
This API is used to set the capturing volume of the mic or playback volume of the speaker, but not the volume of the camera.
volume | Volume. Value range: 0-100; default: 100 |
|
pure virtual |
set onDeviceChanged callback
|
pure virtual |
Setting the system volume type (for mobile OS)
startLocalAudio(quality)
API in TRTCCloud instead, which param quality
is used to decide audio quality.
|
pure virtual |
Starting camera testing (for Windows)
This API supports custom rendering, meaning that you can use the callback API ITRTCVideoRenderCallback
to get the images captured by the camera for custom rendering.
|
pure virtual |
Starting camera testing (for desktop OS)
|
pure virtual |
Starting mic testing (for desktop OS)
This API is used to test whether the mic functions properly. The mic volume detected (value range: 0-100) is returned via a callback.
interval | Interval of volume callbacks |
|
pure virtual |
Starting speaker testing (for desktop OS)
This API is used to test whether the audio playback device functions properly by playing a specified audio file. If users can hear audio during testing, the device functions properly.
filePath | Path of the audio file |
|
pure virtual |
Ending camera testing (for desktop OS)
|
pure virtual |
Ending mic testing (for desktop OS)
|
pure virtual |
Ending speaker testing (for desktop OS)
|
pure virtual |
Switching to the front/rear camera (for mobile OS)
#define __ITXDEVICEMANAGER_H__ |