@Test public void testCreatePartialTracks() throws Exception { List<String> command = Arrays.asList("ffmpeg", "-y", "-v", "warning", "-nostats", "-max_error_rate", "1.0", "-filter_complex", "color=c=0xFF00FF:s=320x180:r=24,trim=end=3.14", "-an", "-codec", "h264", "-q:v", "2", "-g", "240", "-pix_fmt", "yuv420p", "-r", "24"); List<List<String>> commands = new ArrayList<>(); commands.add(command); commands.add(command); Job job = videoGridService.createPartialTracks(commands); Gson gson = new Gson(); List<URI> uris = gson.fromJson(job.getPayload(), new TypeToken<List<URI>>() { }.getType()); Assert.assertEquals(2, uris.size()); }
@Override public Job createPartialTracks(List<List<String>> commands) throws VideoGridServiceException { List<String> jobArguments = Arrays.asList(gson.toJson(commands)); try { logger.debug("Create videogrid service job"); return serviceRegistry.createJob(JOB_TYPE, OPERATION, jobArguments, jobLoad); } catch (ServiceRegistryException e) { throw new VideoGridServiceException(e); } }
VideoGridServiceImpl extends AbstractJobProducer implements VideoGridService, ManagedService { @Override public Job createPartialTracks(List<List<String>> commands) throws VideoGridServiceException { List<String> jobArguments = Arrays.asList(gson.toJson(commands)); try { logger.debug("Create videogrid service job"); return serviceRegistry.createJob(JOB_TYPE, OPERATION, jobArguments, jobLoad); } catch (ServiceRegistryException e) { throw new VideoGridServiceException(e); } } }
VideoGridServiceImpl extends AbstractJobProducer implements VideoGridService, ManagedService { @Override public Job createPartialTracks(List<List<String>> commands) throws VideoGridServiceException { List<String> jobArguments = Arrays.asList(gson.toJson(commands)); try { logger.debug("Create videogrid service job"); return serviceRegistry.createJob(JOB_TYPE, OPERATION, jobArguments, jobLoad); } catch (ServiceRegistryException e) { throw new VideoGridServiceException(e); } } VideoGridServiceImpl(); }
VideoGridServiceImpl extends AbstractJobProducer implements VideoGridService, ManagedService { @Override public Job createPartialTracks(List<List<String>> commands) throws VideoGridServiceException { List<String> jobArguments = Arrays.asList(gson.toJson(commands)); try { logger.debug("Create videogrid service job"); return serviceRegistry.createJob(JOB_TYPE, OPERATION, jobArguments, jobLoad); } catch (ServiceRegistryException e) { throw new VideoGridServiceException(e); } } VideoGridServiceImpl(); @Override void activate(ComponentContext cc); @Override void updated(Dictionary properties); @Override Job createPartialTracks(List<List<String>> commands); void setWorkspace(Workspace workspace); void setServiceRegistry(ServiceRegistry jobManager); void setSecurityService(SecurityService securityService); void setUserDirectoryService(UserDirectoryService userDirectoryService); void setOrganizationDirectoryService(OrganizationDirectoryService organizationDirectoryService); }
VideoGridServiceImpl extends AbstractJobProducer implements VideoGridService, ManagedService { @Override public Job createPartialTracks(List<List<String>> commands) throws VideoGridServiceException { List<String> jobArguments = Arrays.asList(gson.toJson(commands)); try { logger.debug("Create videogrid service job"); return serviceRegistry.createJob(JOB_TYPE, OPERATION, jobArguments, jobLoad); } catch (ServiceRegistryException e) { throw new VideoGridServiceException(e); } } VideoGridServiceImpl(); @Override void activate(ComponentContext cc); @Override void updated(Dictionary properties); @Override Job createPartialTracks(List<List<String>> commands); void setWorkspace(Workspace workspace); void setServiceRegistry(ServiceRegistry jobManager); void setSecurityService(SecurityService securityService); void setUserDirectoryService(UserDirectoryService userDirectoryService); void setOrganizationDirectoryService(OrganizationDirectoryService organizationDirectoryService);  }