locked
Transform manager sdk RRS feed

  • Question

  • User251377255 posted
    I was playing with the previous versions of the sdk and i had this line of code: var elements = metadata.TaskMetadata.Descendants().Where(e => e.Name.Namespace == taskNamespace); where metadata is an instance of IJobMetadata and the taskNamespace is a namespace arbitrarily assigned to a custom task (task plugins created by customs) in the new sdk IJobMetadata has no more a TaskMetadata property. Any Idea how I can reach the collection of metadata for a given task in the new sdk? By the way, the purpose of this is reading the value of the properties of each custom task Thanks
    Monday, May 9, 2011 11:02 AM

Answers

  • User252105461 posted

    Hi,

     The injected IJobMetadata object instance exposes a TaskElement XElement that you can use instead.  It contains all the properties pertaining to the task in question.  See the example below, I've bolded the ee namespace and ee properties witch are the Expression Encoder 4 task properties. I hope this helps... let me know if you need more information.

    _jobMetadata.TaskElement :

    <iisms:task rdf:about="guid:A72D7A5D-3022-45f2-89B4-1DDC5457CC12" xmlns:ee="http://schemas.microsoft.com/Expression/Encoder/V4#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:iisms="http://schemas.microsoft.com/iis/media/v4/TM#">

    <iisms:id>A72D7A5D-3022-45f2-89B4-1DDC5457CC12</iisms:id>

    <iisms:logLevel>Information</iisms:logLevel>

    <iisms:outputFolder>EE4Output</iisms:outputFolder>

    <ee:preset>%ProgramData%\Microsoft\IIS\Transform Manager\Configuration\Presets\VC-1 IIS Smooth Streaming - 720p CBR.xml</ee:preset>

    <ee:createSubdirectory>false</ee:createSubdirectory>

    <ee:templateName>Standard</ee:templateName>

    <ee:templatePath>%ProgramFiles(x86)%\Microsoft Expression\Encoder 4\Templates\en\Standard</ee:templatePath>

    <iisms:taskCode>Microsoft.Web.Media.TransformManager.EETask, Microsoft.Web.Media.TransformManager.EETask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</iisms:taskCode>

    <iisms:hasCommandLine>

    <iisms:commandLine>

    <iisms:program>e:\Program Files (x86)\IIS\Transform Manager\TaskEngine.exe</iisms:program>

    <iisms:arguments> /taskIndex 1 /manifest 20110509171920_087B0F24CFBC4470B2E17A85F9823A7C.smil</iisms:arguments>

    </iisms:commandLine>

    </iisms:hasCommandLine>

    <iisms:name>Expression Encoder 4</iisms:name>

    <iisms:description xml:lang="en">Invokes Expression Encoder 4 to encode media files to Smooth Streams. Microsoft Expression Encoder 4 must be installed to use this task (H.264/AAC-LC encoding requires Expression Encoder 4 Pro). See http://go.microsoft.com/fwlink/?LinkID=186385.</iisms:description>

    <iisms:inputFolder></iisms:inputFolder>

    </iisms:task>

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, May 9, 2011 1:52 PM

All replies

  • User252105461 posted

    Hi,

     The injected IJobMetadata object instance exposes a TaskElement XElement that you can use instead.  It contains all the properties pertaining to the task in question.  See the example below, I've bolded the ee namespace and ee properties witch are the Expression Encoder 4 task properties. I hope this helps... let me know if you need more information.

    _jobMetadata.TaskElement :

    <iisms:task rdf:about="guid:A72D7A5D-3022-45f2-89B4-1DDC5457CC12" xmlns:ee="http://schemas.microsoft.com/Expression/Encoder/V4#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:iisms="http://schemas.microsoft.com/iis/media/v4/TM#">

    <iisms:id>A72D7A5D-3022-45f2-89B4-1DDC5457CC12</iisms:id>

    <iisms:logLevel>Information</iisms:logLevel>

    <iisms:outputFolder>EE4Output</iisms:outputFolder>

    <ee:preset>%ProgramData%\Microsoft\IIS\Transform Manager\Configuration\Presets\VC-1 IIS Smooth Streaming - 720p CBR.xml</ee:preset>

    <ee:createSubdirectory>false</ee:createSubdirectory>

    <ee:templateName>Standard</ee:templateName>

    <ee:templatePath>%ProgramFiles(x86)%\Microsoft Expression\Encoder 4\Templates\en\Standard</ee:templatePath>

    <iisms:taskCode>Microsoft.Web.Media.TransformManager.EETask, Microsoft.Web.Media.TransformManager.EETask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</iisms:taskCode>

    <iisms:hasCommandLine>

    <iisms:commandLine>

    <iisms:program>e:\Program Files (x86)\IIS\Transform Manager\TaskEngine.exe</iisms:program>

    <iisms:arguments> /taskIndex 1 /manifest 20110509171920_087B0F24CFBC4470B2E17A85F9823A7C.smil</iisms:arguments>

    </iisms:commandLine>

    </iisms:hasCommandLine>

    <iisms:name>Expression Encoder 4</iisms:name>

    <iisms:description xml:lang="en">Invokes Expression Encoder 4 to encode media files to Smooth Streams. Microsoft Expression Encoder 4 must be installed to use this task (H.264/AAC-LC encoding requires Expression Encoder 4 Pro). See http://go.microsoft.com/fwlink/?LinkID=186385.</iisms:description>

    <iisms:inputFolder></iisms:inputFolder>

    </iisms:task>

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, May 9, 2011 1:52 PM
  • User251377255 posted
    Yep. That looks like it. Thanks for the tip.
    Tuesday, May 10, 2011 5:25 AM