@@ -68,7 +68,7 @@ void DefaultAllocator::resize(size_t size) {
6868 size_t alignedSize = (size + 31 ) & ~size_t (31 );
6969 m_data = static_cast <uint8_t *>(ALIGNED_ALLOC (32 , alignedSize));
7070 if (!m_data) {
71- ccap:: reportError (ErrorCode::MemoryAllocationFailed, " Failed to allocate " + std::to_string (alignedSize) + " bytes of aligned memory" );
71+ reportError (ErrorCode::MemoryAllocationFailed, " Failed to allocate " + std::to_string (alignedSize) + " bytes of aligned memory" );
7272 m_size = 0 ;
7373 return ;
7474 }
@@ -119,15 +119,15 @@ ProviderImp* createProvider(std::string_view extraInfo) {
119119 if (warningLogEnabled ()) {
120120 CCAP_LOG_W (" ccap: Unsupported platform!\n " );
121121 }
122- ccap:: reportError (ErrorCode::InitializationFailed, " Unsupported platform" );
122+ reportError (ErrorCode::InitializationFailed, " Unsupported platform" );
123123#endif
124124 return nullptr ;
125125}
126126
127127Provider::Provider () :
128128 m_imp (createProvider(" " )) {
129129 if (!m_imp) {
130- ccap:: reportError (ErrorCode::InitializationFailed, ErrorMessages::FAILED_TO_CREATE_PROVIDER );
130+ reportError (ErrorCode::InitializationFailed, ErrorMessages::FAILED_TO_CREATE_PROVIDER );
131131 }
132132}
133133
@@ -141,7 +141,7 @@ Provider::Provider(std::string_view deviceName, std::string_view extraInfo) :
141141 if (m_imp) {
142142 open (deviceName);
143143 } else {
144- ccap:: reportError (ErrorCode::InitializationFailed, ErrorMessages::FAILED_TO_CREATE_PROVIDER );
144+ reportError (ErrorCode::InitializationFailed, ErrorMessages::FAILED_TO_CREATE_PROVIDER );
145145 }
146146}
147147
@@ -150,23 +150,23 @@ Provider::Provider(int deviceIndex, std::string_view extraInfo) :
150150 if (m_imp) {
151151 open (deviceIndex);
152152 } else {
153- ccap:: reportError (ErrorCode::InitializationFailed, ErrorMessages::FAILED_TO_CREATE_PROVIDER );
153+ reportError (ErrorCode::InitializationFailed, ErrorMessages::FAILED_TO_CREATE_PROVIDER );
154154 }
155155}
156156
157157std::vector<std::string> Provider::findDeviceNames () { return m_imp ? m_imp->findDeviceNames () : std::vector<std::string>(); }
158158
159159bool Provider::open (std::string_view deviceName, bool autoStart) {
160160 if (!m_imp) {
161- ccap:: reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
161+ reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
162162 return false ;
163163 }
164164 return m_imp->open (deviceName) && (!autoStart || m_imp->start ());
165165}
166166
167167bool Provider::open (int deviceIndex, bool autoStart) {
168168 if (!m_imp) {
169- ccap:: reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
169+ reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
170170 return false ;
171171 }
172172
@@ -196,7 +196,7 @@ void Provider::close() {
196196
197197bool Provider::start () {
198198 if (!m_imp) {
199- ccap:: reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
199+ reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
200200 return false ;
201201 }
202202 return m_imp->start ();
@@ -210,7 +210,7 @@ bool Provider::isStarted() const { return m_imp && m_imp->isStarted(); }
210210
211211bool Provider::set (PropertyName prop, double value) {
212212 if (!m_imp) {
213- ccap:: reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
213+ reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
214214 return false ;
215215 }
216216 return m_imp->set (prop, value);
@@ -220,39 +220,39 @@ double Provider::get(PropertyName prop) { return m_imp ? m_imp->get(prop) : NAN;
220220
221221std::shared_ptr<VideoFrame> Provider::grab (uint32_t timeoutInMs) {
222222 if (!m_imp) {
223- ccap:: reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
223+ reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
224224 return nullptr ;
225225 }
226226 return m_imp->grab (timeoutInMs);
227227}
228228
229229void Provider::setNewFrameCallback (std::function<bool (const std::shared_ptr<VideoFrame>&)> callback) {
230230 if (!m_imp) {
231- ccap:: reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
231+ reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
232232 return ;
233233 }
234234 m_imp->setNewFrameCallback (std::move (callback));
235235}
236236
237237void Provider::setFrameAllocator (std::function<std::shared_ptr<Allocator>()> allocatorFactory) {
238238 if (!m_imp) {
239- ccap:: reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
239+ reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
240240 return ;
241241 }
242242 m_imp->setFrameAllocator (std::move (allocatorFactory));
243243}
244244
245245void Provider::setMaxAvailableFrameSize (uint32_t size) {
246246 if (!m_imp) {
247- ccap:: reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
247+ reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
248248 return ;
249249 }
250250 m_imp->setMaxAvailableFrameSize (size);
251251}
252252
253253void Provider::setMaxCacheFrameSize (uint32_t size) {
254254 if (!m_imp) {
255- ccap:: reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
255+ reportError (ErrorCode::InitializationFailed, ErrorMessages::PROVIDER_IMPLEMENTATION_NULL );
256256 return ;
257257 }
258258 m_imp->setMaxCacheFrameSize (size);
0 commit comments