Lines Matching refs:deviceID
459 static HRESULT CreateInstance(ImageGrabber **ppIG, unsigned int deviceID, bool synchronous = false);
467 ImageGrabber(unsigned int deviceID, bool synchronous);
482 static HRESULT CreateInstance(ImageGrabberThread **ppIGT, IMFMediaSource *pSource, unsigned int deviceID, bool synchronious = false);
490 ImageGrabberThread(IMFMediaSource *pSource, unsigned int deviceID, bool synchronious);
674 // Closing video device with deviceID
675 void closeDevice(int deviceID);
676 // Setting callback function for emergency events(for example: removing video device with deviceID) with userData
677 void setEmergencyStopEvent(int deviceID, void *userData, void(*func)(int, void *));
680 // Getting of parametrs of video device with deviceID
681 CamParametrs getParametrs(int deviceID);
682 // Setting of parametrs of video device with deviceID
683 void setParametrs(int deviceID, CamParametrs parametrs);
686 // Getting numbers of formats, which are supported by videodevice with deviceID
687 unsigned int getCountFormats(int deviceID) const;
688 // Getting width of image, which is getting from videodevice with deviceID
689 unsigned int getWidth(int deviceID) const;
690 // Getting height of image, which is getting from videodevice with deviceID
691 unsigned int getHeight(int deviceID) const;
692 // Getting frame rate, which is getting from videodevice with deviceID
693 unsigned int getFrameRate(int deviceID) const;
694 // Getting name of videodevice with deviceID
695 wchar_t *getNameVideoDevice(int deviceID);
696 // Getting interface MediaSource for Media Foundation from videodevice with deviceID
697 IMFMediaSource *getMediaSource(int deviceID);
698 // Getting format with id, which is supported by videodevice with deviceID
699 MediaType getFormat(int deviceID, int unsigned id);
702 // Checking of using the videodevice with deviceID
703 bool isDeviceSetup(int deviceID);
704 // Checking of using MediaSource from videodevice with deviceID
705 bool isDeviceMediaSource(int deviceID);
706 // Checking of using Raw Data of pixels from videodevice with deviceID
707 bool isDeviceRawDataSource(int deviceID);
712 // Initialization of video device with deviceID by media type with id
713 bool setupDevice(int deviceID, unsigned int id = 0);
714 // Initialization of video device with deviceID by wisth w, height h and fps idealFramerate
715 bool setupDevice(int deviceID, unsigned int w, unsigned int h, unsigned int idealFramerate = 30);
716 // Checking of recivig of new frame from video device with deviceID
717 bool isFrameNew(int deviceID);
719 void waitForDevice(int deviceID);
721 // Writing of Raw Data pixels from video device with deviceID with correction of RedAndBlue flipping flipRedAndBlue and vertical flipping flipImage
722 bool getPixels(int deviceID, unsigned char * pixels, bool flipRedAndBlue = false, bool flipImage = false);
1211 ImageGrabber::ImageGrabber(unsigned int deviceID, bool synchronous):
1213 ig_DeviceID(deviceID),
1629 HRESULT ImageGrabber::CreateInstance(ImageGrabber **ppIG, unsigned int deviceID, bool synchronious)
1631 *ppIG = new (std::nothrow) ImageGrabber(deviceID, synchronious);
1636 DebugPrintOut(L"IMAGEGRABBER VIDEODEVICE %i: Creating instance of ImageGrabber\n", deviceID);
1774 HRESULT ImageGrabberThread::CreateInstance(ImageGrabberThread **ppIGT, IMFMediaSource *pSource, unsigned int deviceID, bool synchronious)
1776 *ppIGT = new (std::nothrow) ImageGrabberThread(pSource, deviceID, synchronious);
1779 DebugPrintOut(L"IMAGEGRABBERTHREAD VIDEODEVICE %i: Memory cannot be allocated\n", deviceID);
1783 DebugPrintOut(L"IMAGEGRABBERTHREAD VIDEODEVICE %i: Creating of the instance of ImageGrabberThread\n", deviceID);
1787 ImageGrabberThread::ImageGrabberThread(IMFMediaSource *pSource, unsigned int deviceID, bool synchronious) :
1792 HRESULT hr = ImageGrabber::CreateInstance(&igt_pImageGrabber, deviceID, synchronious);
1793 igt_DeviceID = deviceID;
1799 DebugPrintOut(L"IMAGEGRABBERTHREAD VIDEODEVICE %i: There is a problem with initialization of the instance of the ImageGrabber class\n", deviceID);
1803 DebugPrintOut(L"IMAGEGRABBERTHREAD VIDEODEVICE %i: Initialization of instance of the ImageGrabber class\n", deviceID);
1808 DebugPrintOut(L"IMAGEGRABBERTHREAD VIDEODEVICE %i: There is a problem with creation of the instance of the ImageGrabber class\n", deviceID);
3012 IMFMediaSource *videoInput::getMediaSource(int deviceID)
3016 videoDevice * VD = videoDevices::getInstance().getDevice(deviceID);
3021 DebugPrintOut(L"VideoDevice %i: There is not any suitable IMFMediaSource interface\n", deviceID);
3032 bool videoInput::setupDevice(int deviceID, unsigned int id)
3034 if (deviceID < 0 )
3036 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3042 videoDevice * VD = VDS->getDevice(deviceID);
3047 DebugPrintOut(L"VIDEODEVICE %i: This device cannot be started\n", deviceID);
3058 bool videoInput::setupDevice(int deviceID, unsigned int w, unsigned int h, unsigned int idealFramerate)
3060 if (deviceID < 0 )
3062 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3068 videoDevice * VD = VDS->getDevice(deviceID);
3073 DebugPrintOut(L"VIDEODEVICE %i: this device cannot be started\n", deviceID);
3079 DebugPrintOut(L"VIDEODEVICE(s): There is not any suitable video device\n", deviceID);
3084 MediaType videoInput::getFormat(int deviceID, unsigned int id)
3086 if (deviceID < 0)
3088 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3094 videoDevice * VD = VDS->getDevice(deviceID);
3105 bool videoInput::isDeviceSetup(int deviceID)
3107 if (deviceID < 0)
3109 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3115 videoDevice * VD = VDS->getDevice(deviceID);
3126 bool videoInput::isDeviceMediaSource(int deviceID)
3128 if (deviceID < 0)
3130 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3136 videoDevice * VD = VDS->getDevice(deviceID);
3147 bool videoInput::isDeviceRawDataSource(int deviceID)
3149 if (deviceID < 0)
3151 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3157 videoDevice * VD = VDS->getDevice(deviceID);
3171 bool videoInput::isFrameNew(int deviceID)
3173 if (deviceID < 0)
3175 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3180 if(!isDeviceSetup(deviceID))
3182 if(isDeviceMediaSource(deviceID))
3186 videoDevice * VD = VDS->getDevice(deviceID);
3200 void videoInput::waitForDevice(int deviceID)
3202 if (deviceID < 0)
3204 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3209 if(!isDeviceSetup(deviceID))
3211 if(isDeviceMediaSource(deviceID))
3215 videoDevice * VD = VDS->getDevice(deviceID);
3229 unsigned int videoInput::getCountFormats(int deviceID) const
3231 if (deviceID < 0)
3233 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3239 videoDevice * VD = VDS->getDevice(deviceID);
3257 void videoInput::setParametrs(int deviceID, CamParametrs parametrs)
3259 if (deviceID < 0)
3261 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3267 videoDevice *VD = VDS->getDevice(deviceID);
3277 CamParametrs videoInput::getParametrs(int deviceID)
3280 if (deviceID < 0)
3282 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3288 videoDevice *VD = VDS->getDevice(deviceID);
3299 void videoInput::closeDevice(int deviceID)
3301 if (deviceID < 0)
3303 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3309 videoDevice *VD = VDS->getDevice(deviceID);
3319 unsigned int videoInput::getWidth(int deviceID) const
3321 if (deviceID < 0)
3323 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3329 videoDevice * VD = VDS->getDevice(deviceID);
3340 unsigned int videoInput::getHeight(int deviceID) const
3342 if (deviceID < 0)
3344 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3350 videoDevice * VD = VDS->getDevice(deviceID);
3361 unsigned int videoInput::getFrameRate(int deviceID) const
3363 if (deviceID < 0)
3365 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3370 videoDevice * VD = videoDevices::getInstance().getDevice(deviceID);
3381 wchar_t *videoInput::getNameVideoDevice(int deviceID)
3383 if (deviceID < 0)
3385 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3391 videoDevice * VD = VDS->getDevice(deviceID);
3446 void videoInput::setEmergencyStopEvent(int deviceID, void *userData, void(*func)(int, void *))
3448 if (deviceID < 0)
3450 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3458 videoDevice * VD = VDS->getDevice(deviceID);
3469 bool videoInput::getPixels(int deviceID, unsigned char * dstBuffer, bool flipRedAndBlue, bool flipImage)
3472 if (deviceID < 0)
3474 DebugPrintOut(L"VIDEODEVICE %i: Invalid device ID\n", deviceID);
3479 bool isRaw = isDeviceRawDataSource(deviceID);
3482 videoDevice *VD = videoDevices::getInstance().getDevice(deviceID);
3502 DebugPrintOut(L"ERROR: GetPixels() - Unable to grab frame for device %i\n", deviceID);
3507 DebugPrintOut(L"ERROR: GetPixels() - Not raw data source device %i\n", deviceID);