1/*
2 *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
4 *  Use of this source code is governed by a BSD-style license
5 *  that can be found in the LICENSE file in the root of the source
6 *  tree. An additional intellectual property rights grant can be found
7 *  in the file PATENTS.  All contributing project authors may
8 *  be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef WEBRTC_VIDEO_ENGINE_INCLUDE_VIE_ERRORS_H_
12#define WEBRTC_VIDEO_ENGINE_INCLUDE_VIE_ERRORS_H_
13
14enum ViEErrors {
15  // ViEBase.
16  kViENotInitialized = 12000,        // Init has not been called successfully.
17  kViEBaseVoEFailure,                // SetVoiceEngine. ViE failed to use VE instance. Check VE instance pointer.ConnectAudioChannel failed to set voice channel. Have SetVoiceEngine been called? Is the voice channel correct.
18  kViEBaseChannelCreationFailed,     // CreateChannel.
19  kViEBaseInvalidChannelId,          // The channel does not exist.
20  kViEAPIDoesNotExist,               // Release called on Interface that has not been created.
21  kViEBaseInvalidArgument,
22  kViEBaseAlreadySending,            // StartSend called on channel that is already sending.
23  kViEBaseNotSending,                // StopSend called on channel that is not sending.
24  kViEBaseReceiveOnlyChannel,        // Can't send on a receive only channel.
25  kViEBaseAlreadyReceiving,          // StartReceive called on channel that is already receiving.
26  kViEBaseObserverAlreadyRegistered,  // RegisterObserver- an observer has already been set.
27  kViEBaseObserverNotRegistered,     // DeregisterObserver - no observer has been registered.
28  kViEBaseUnknownError,              // An unknown error has occurred. Check the log file.
29
30  // ViECodec.
31  kViECodecInvalidArgument  = 12100,    // Wrong input parameter to function.
32  kViECodecObserverAlreadyRegistered,   // RegisterEncoderObserver, RegisterDecoderObserver.
33  kViECodecObserverNotRegistered,       // DeregisterEncoderObserver, DeregisterDecoderObserver.
34  kViECodecInvalidCodec,                // SetSendCodec,SetReceiveCodec- The codec structure is invalid.
35  kViECodecInvalidChannelId,            // The channel does not exist.
36  kViECodecInUse,                       // SetSendCodec- Can't change codec size or type when multiple channels use the same encoder.
37  kViECodecReceiveOnlyChannel,          // SetSendCodec, can't change receive only channel.
38  kViECodecUnknownError,                // An unknown error has occurred. Check the log file.
39
40  // ViERender.
41  kViERenderInvalidRenderId = 12200,  // No renderer with the ID exist. In AddRenderer - The render ID is invalid. No capture device, channel or file is allocated with that id.
42  kViERenderAlreadyExists,            // AddRenderer: the renderer already exist.
43  kViERenderInvalidFrameFormat,       // AddRender (external renderer). The user has requested a frame format that we don't support.
44  kViERenderUnknownError,             // An unknown error has occurred. Check the log file.
45
46  // ViECapture.
47  kViECaptureDeviceAlreadyConnected = 12300,  // ConnectCaptureDevice - A capture device has already been connected to this video channel.
48  kViECaptureDeviceDoesNotExist,              // No capture device exist with the provided capture id or unique name.
49  kViECaptureDeviceInvalidChannelId,          // ConnectCaptureDevice, DisconnectCaptureDevice- No Channel exist with the provided channel id.
50  kViECaptureDeviceNotConnected,              // DisconnectCaptureDevice- No capture device is connected to the channel.
51  kViECaptureDeviceNotStarted,                // Stop- The capture device is not started.
52  kViECaptureDeviceAlreadyStarted,            // Start- The capture device is already started.
53  kViECaptureDeviceAlreadyAllocated,          // AllocateCaptureDevice The device is already allocated.
54  kViECaptureDeviceMaxNoDevicesAllocated,     // AllocateCaptureDevice Max number of devices already allocated.
55  kViECaptureObserverAlreadyRegistered,       // RegisterObserver- An observer is already registered. Need to deregister first.
56  kViECaptureDeviceObserverNotRegistered,     // DeregisterObserver- No observer is registered.
57  kViECaptureDeviceUnknownError,              // An unknown error has occurred. Check the log file.
58  kViECaptureDeviceMacQtkitNotSupported,      // QTKit handles the capture devices automatically. Thus querying capture capabilities is not supported.
59
60  // ViEFile.
61  kViEFileInvalidChannelId  = 12400,  // No Channel exist with the provided channel id.
62  kViEFileInvalidArgument,            // Incorrect input argument
63  kViEFileAlreadyRecording,           // StartRecordOutgoingVideo - already recording channel
64  kViEFileVoENotSet,                  // StartRecordOutgoingVideo. Failed to access voice engine. Has SetVoiceEngine been called?
65  kViEFileNotRecording,               // StopRecordOutgoingVideo
66  kViEFileMaxNoOfFilesOpened,         // StartPlayFile
67  kViEFileNotPlaying,                 // StopPlayFile. The file with the provided id is not playing.
68  kViEFileObserverAlreadyRegistered,  // RegisterObserver
69  kViEFileObserverNotRegistered,      // DeregisterObserver
70  kViEFileInputAlreadyConnected,      // SendFileOnChannel- the video channel already have a connected input.
71  kViEFileNotConnected,               // StopSendFileOnChannel- No file is being sent on the channel.
72  kViEFileVoEFailure,                 // SendFileOnChannel,StartPlayAudioLocally - failed to play audio stream
73  kViEFileInvalidRenderId,            // SetRenderTimeoutImage and SetRenderStartImage: Renderer with the provided render id does not exist.
74  kViEFileInvalidFile,                // Can't open the file with provided filename. Is the path and file format correct?
75  kViEFileInvalidCapture,             // Can't use ViEPicture. Is the object correct?
76  kViEFileSetRenderTimeoutError,      // SetRenderTimeoutImage- Please see log file.
77  kViEFileSetStartImageError,         // SetRenderStartImage error. Please see log file.
78  kViEFileUnknownError,               // An unknown error has occurred. Check the log file.
79
80  // ViENetwork.
81  kViENetworkInvalidChannelId = 12500,   // No Channel exist with the provided channel id.
82  kViENetworkAlreadyReceiving,           // SetLocalReceiver: Can not change ports while receiving.
83  kViENetworkLocalReceiverNotSet,        // GetLocalReceiver: SetLocalReceiver not called.
84  kViENetworkAlreadySending,             // SetSendDestination
85  kViENetworkDestinationNotSet,          // GetSendDestination
86  kViENetworkInvalidArgument,            // GetLocalIP- Check function  arguments.
87  kViENetworkSendCodecNotSet,            // SetSendGQoS- Need to set the send codec first.
88  kViENetworkServiceTypeNotSupported,    // SetSendGQoS
89  kViENetworkNotSupported,               // SetSendGQoS Not supported on this OS.
90  kViENetworkUnknownError,               // An unknown error has occurred. Check the log file.
91
92  // ViERTP_RTCP.
93  kViERtpRtcpInvalidChannelId = 12600,   // No Channel exist with the provided channel id.
94  kViERtpRtcpAlreadySending,             // The channel is already sending. Need to stop send before calling this API.
95  kViERtpRtcpNotSending,                 // The channel needs to be sending in order for this function to work.
96  kViERtpRtcpRtcpDisabled,               // Functions failed because RTCP is disabled.
97  kViERtpRtcpObserverAlreadyRegistered,  // An observer is already registered. Need to deregister the old first.
98  kViERtpRtcpObserverNotRegistered,      // No observer registered.
99  kViERtpRtcpUnknownError,               // An unknown error has occurred. Check the log file.
100
101  // ViEImageProcess.
102  kViEImageProcessInvalidChannelId  = 12800,  // No Channel exist with the provided channel id.
103  kViEImageProcessInvalidCaptureId,          // No capture device exist with the provided capture id.
104  kViEImageProcessFilterExists,              // RegisterCaptureEffectFilter,RegisterSendEffectFilter,RegisterRenderEffectFilter - Effect filter already registered.
105  kViEImageProcessFilterDoesNotExist,        // DeRegisterCaptureEffectFilter,DeRegisterSendEffectFilter,DeRegisterRenderEffectFilter - Effect filter not registered.
106  kViEImageProcessAlreadyEnabled,            // EnableDeflickering,EnableDenoising,EnableColorEnhancement- Function already enabled.
107  kViEImageProcessAlreadyDisabled,           // EnableDeflickering,EnableDenoising,EnableColorEnhancement- Function already disabled.
108  kViEImageProcessUnknownError               // An unknown error has occurred. Check the log file.
109};
110
111#endif  // WEBRTC_VIDEO_ENGINE_INCLUDE_VIE_ERRORS_H_
112