Package com.microsoft.windowsazure.services.media.models

Examples of com.microsoft.windowsazure.services.media.models.JobInfo


        AssetInfo asset = wrapper.createAsset(testAssetPrefix
                + "transformAsset", AssetOption.None);
        wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles());
        String jobName = testJobPrefix + UUID.randomUUID().toString();

        JobInfo job = wrapper.createJob(jobName, asset, wrapper
                .createTaskOptions("Transform", 0, 0,
                        EncoderType.WindowsAzureMediaEncoder));
        signalSetupFinished();

        waitForJobToFinish(job);
View Full Code Here


                + "transformEncryptedAsset", AssetOption.StorageEncrypted);

        wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles(), aesKey);
        String jobName = "my job transformEncryptedAsset"
                + UUID.randomUUID().toString();
        JobInfo job = wrapper.createJob(jobName, asset, wrapper
                .createTaskOptions("Decode", 0, 0,
                        EncoderType.StorageDecryption));
        signalSetupFinished();

        waitForJobToFinish(job);
View Full Code Here

        // upload the encrypted file to the server.
        uploadEncryptedAssetFile(assetInfo, blobWriter, "MPEG4-H264.mp4",
                encryptedContent, contentKeyId, iv);

        // submit and execute the decoding job.
        JobInfo jobInfo = decodeAsset(testJobPrefix
                + "uploadAesProtectedAssetSuccess", assetInfo.getId());

        // assert
        LinkInfo<TaskInfo> taskLinkInfo = jobInfo.getTasksLink();
        List<TaskInfo> taskInfos = service.list(Task.list(taskLinkInfo));
        for (TaskInfo taskInfo : taskInfos) {
            assertEquals(TaskState.Completed, taskInfo.getState());
            ListResult<AssetInfo> outputs = service.list(Asset.list(taskInfo
                    .getOutputAssetsLink()));
            assertEquals(1, outputs.size());
        }
        assertEquals(JobState.Finished, jobInfo.getState());

        // Verify that the contents match
        InputStream expected = getClass().getResourceAsStream(
                "/media/MPEG4-H264.mp4");

        ListResult<AssetInfo> outputAssets = service.list(Asset.list(jobInfo
                .getOutputAssetsLink()));
        assertEquals(1, outputAssets.size());
        AssetInfo outputAsset = outputAssets.get(0);
        ListResult<AssetFileInfo> assetFiles = service.list(AssetFile
                .list(assetInfo.getAssetFilesLink()));
View Full Code Here

                MediaProcessor.list().set("$filter",
                        "Name eq '" + storageDecryptionProcessor + "'")).get(0);

        String taskBody = "<taskBody>"
                + "<inputAsset>JobInputAsset(0)</inputAsset><outputAsset assetCreationOptions=\"0\" assetName=\"Output\">JobOutputAsset(0)</outputAsset></taskBody>";
        JobInfo jobInfo = service.create(Job
                .create()
                .addInputMediaAsset(inputAssetId)
                .addTaskCreator(
                        Task.create(mediaProcessorInfo.getId(), taskBody)
                                .setName(name)));

        JobInfo currentJobInfo = jobInfo;
        int retryCounter = 0;
        while (currentJobInfo.getState().getCode() < 3 && retryCounter < 30) {
            Thread.sleep(10000);
            currentJobInfo = service.get(Job.get(jobInfo.getId()));
            retryCounter++;
        }
        return currentJobInfo;
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.services.media.models.JobInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.