@Ignore @Test public void test_captureVideo() throws Exception { doNothing().when(videocapture).init(any(IDevice.class), any(String.class)); @SuppressWarnings("unchecked") List<IVideoImageSubscriber> videoImageSubscribers = mock(List.class); when(videoImageSubscribers.isEmpty()).thenReturn(false); doNothing().when(threadexecutor).execute(any(Runnable.class)); rootedAndroidCollectorImpl.startVideoCapture(); assertTrue(true); }
public void startVideoCapture() { String videopath = this.localTraceFolder + Util.FILE_SEPARATOR + "video.mov"; try { Integer api = 0; try { api = Integer.valueOf(aroDevice.getApi()); } catch (NumberFormatException e1) { log.error("unable to obtain api:"+e1.getMessage()); } if (isVideo() && !videoOption.equals(VideoOption.LREZ) && api >= 21) { screenRecorder.init(aroDevice, this.localTraceFolder, videoOption); threadexecutor.execute(screenRecorder); } videocapture.init(device, videopath); threadexecutor.execute(videocapture); } catch (IOException e) { log.error(e.getMessage()); } }
RootedAndroidCollectorImpl implements IDataCollector, IVideoImageSubscriber { public void startVideoCapture() { String videopath = this.localTraceFolder + Util.FILE_SEPARATOR + "video.mov"; try { Integer api = 0; try { api = Integer.valueOf(aroDevice.getApi()); } catch (NumberFormatException e1) { log.error("unable to obtain api:"+e1.getMessage()); } if (isVideo() && !videoOption.equals(VideoOption.LREZ) && api >= 21) { screenRecorder.init(aroDevice, this.localTraceFolder, videoOption); threadexecutor.execute(screenRecorder); } videocapture.init(device, videopath); threadexecutor.execute(videocapture); } catch (IOException e) { log.error(e.getMessage()); } } }
RootedAndroidCollectorImpl implements IDataCollector, IVideoImageSubscriber { public void startVideoCapture() { String videopath = this.localTraceFolder + Util.FILE_SEPARATOR + "video.mov"; try { Integer api = 0; try { api = Integer.valueOf(aroDevice.getApi()); } catch (NumberFormatException e1) { log.error("unable to obtain api:"+e1.getMessage()); } if (isVideo() && !videoOption.equals(VideoOption.LREZ) && api >= 21) { screenRecorder.init(aroDevice, this.localTraceFolder, videoOption); threadexecutor.execute(screenRecorder); } videocapture.init(device, videopath); threadexecutor.execute(videocapture); } catch (IOException e) { log.error(e.getMessage()); } }  }
RootedAndroidCollectorImpl implements IDataCollector, IVideoImageSubscriber { public void startVideoCapture() { String videopath = this.localTraceFolder + Util.FILE_SEPARATOR + "video.mov"; try { Integer api = 0; try { api = Integer.valueOf(aroDevice.getApi()); } catch (NumberFormatException e1) { log.error("unable to obtain api:"+e1.getMessage()); } if (isVideo() && !videoOption.equals(VideoOption.LREZ) && api >= 21) { screenRecorder.init(aroDevice, this.localTraceFolder, videoOption); threadexecutor.execute(screenRecorder); } videocapture.init(device, videopath); threadexecutor.execute(videocapture); } catch (IOException e) { log.error(e.getMessage()); } }  int getMilliSecondsForTimeout(); @Override String getName(); @Override void addDeviceStatusSubscriber(IDeviceStatus devicestatus); @Override void addVideoImageSubscriber(IVideoImageSubscriber subscriber); @Override int getMajorVersion(); @Override String getMinorVersion(); @Override DataCollectorType getType(); @Override boolean isRunning(); @Override String[] getLog(); @Override StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, String password); @Override StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, boolean isLiveViewVideo, String deviceId, Hashtable<String, Object> extraParams, String password); @Override void timeOutShutdown(); @Override void haltCollectorInDevice(); @Override boolean isTrafficCaptureRunning(int seconds); void startVideoCapture(); @Override StatusResult stopCollector(); @Override void receiveImage(BufferedImage videoimage); @Override String getPassword(); @Override boolean setPassword(String requestPassword); @Override String[] getDeviceSerialNumber(StatusResult status); @Override IAroDevice[] getDevices(StatusResult status); @Override boolean isDeviceDataPulled(); }
RootedAndroidCollectorImpl implements IDataCollector, IVideoImageSubscriber { public void startVideoCapture() { String videopath = this.localTraceFolder + Util.FILE_SEPARATOR + "video.mov"; try { Integer api = 0; try { api = Integer.valueOf(aroDevice.getApi()); } catch (NumberFormatException e1) { log.error("unable to obtain api:"+e1.getMessage()); } if (isVideo() && !videoOption.equals(VideoOption.LREZ) && api >= 21) { screenRecorder.init(aroDevice, this.localTraceFolder, videoOption); threadexecutor.execute(screenRecorder); } videocapture.init(device, videopath); threadexecutor.execute(videocapture); } catch (IOException e) { log.error(e.getMessage()); } }  int getMilliSecondsForTimeout(); @Override String getName(); @Override void addDeviceStatusSubscriber(IDeviceStatus devicestatus); @Override void addVideoImageSubscriber(IVideoImageSubscriber subscriber); @Override int getMajorVersion(); @Override String getMinorVersion(); @Override DataCollectorType getType(); @Override boolean isRunning(); @Override String[] getLog(); @Override StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, String password); @Override StatusResult startCollector(boolean isCommandLine, String folderToSaveTrace, VideoOption videoOption_old, boolean isLiveViewVideo, String deviceId, Hashtable<String, Object> extraParams, String password); @Override void timeOutShutdown(); @Override void haltCollectorInDevice(); @Override boolean isTrafficCaptureRunning(int seconds); void startVideoCapture(); @Override StatusResult stopCollector(); @Override void receiveImage(BufferedImage videoimage); @Override String getPassword(); @Override boolean setPassword(String requestPassword); @Override String[] getDeviceSerialNumber(StatusResult status); @Override IAroDevice[] getDevices(StatusResult status); @Override boolean isDeviceDataPulled();  }