Reputation: 29725
According to the Microsoft documentation, I should be able to submit a new indexing job to Azure Media Services through the SDK using the following code:
// Get a reference to the Azure Media Indexer.
string MediaProcessorName = "Azure Media Indexer",
IMediaProcessor processor = GetLatestMediaProcessorByName(MediaProcessorName);
However, as of the latest version of the SDK (3.5.2) this method is no longer available, in addition, there is a class of MediaProcessorNames, but they are currently limited to:
WindowsAzureMediaEncoder WindowsAzureMediaEncrypter WindowsAzureMediaPackager
I can't seem to find any updated documentation anywhere. How do I submit an indexing job with the new libraries?
Upvotes: 0
Views: 85
Reputation: 37
The method in question is defined later in the documentation code snippet to which you linked:
static IMediaProcessor GetLatestMediaProcessorByName(string mediaProcessorName)
{
var processor = _context.MediaProcessors
.Where(p => p.Name == mediaProcessorName)
.ToList()
.OrderBy(p => new Version(p.Version))
.LastOrDefault();
if (processor == null)
throw new ArgumentException(string.Format("Unknown media processor",
mediaProcessorName));
return processor;
}
For starters, I would recommend checking out my introductory blog post here in order to submit your first Indexing job.
Source: program manager for Azure Media Indexer
Upvotes: 0
Reputation: 1991
Extensions will do a work, since they providing a wrapper methods to quickly do querying. In general system have set of media processors. Each processor might have few versions and you can retrieve this information by querying MediaProcessor entity.
MSDN documentation https://azure.microsoft.com/en-us/documentation/articles/media-services-get-media-processor/ listing existing set of processors with example code how to query them.
Upvotes: 1
Reputation: 29725
After a bit more digging it appears the resources have been moved, or the documentation was missing references.
Now, you need to include the Azure Media Services Extensions library in your project.
From there you can do something like:
var mediaContext = new CloudMediaContext(accountName, accessKey);
var mediaProcessorName = "Azure Media Indexer";
var mediaProcessor = mediaContext.Processors.GetLatestMediaProcessorByName(mediaProcessorName);
Upvotes: 2