| Comments

remember that feature i was mentioning that is a plugin for expression encoder?  you know the one that enables you to publish the output immediately and directly to the silverlight streaming service?

well, how would you like to write your own encoder publishing plugin.  perhaps you have a process with a content delivery network?  or have some custom process you want to implement in your own workflow (save as an encoder job file, etc.) for ongoing media encodings?  james clarke just announced a quickstart guide on developing publisher plug-ins for encoder.

the code looks relatively simple to implement:

[EncoderPlugin("Zip Plugin from scratch","Enables output to be zipped")] 
    public class ZipPublishPlugin : PublishPlugin 
    { 
 
        public override object CreateAdvancedSettingsEditor() 
        { 
            throw new NotImplementedException(); 
        } 
 
        public override object CreateStandardSettingsEditor() 
        { 
            throw new NotImplementedException(); 
        } 
 
        public override void PerformPublish(string rootPath, string[] filesToPublish) 
        { 
            throw new NotImplementedException(); 
        } 
    }

need to implement settings as a part of your plugin?  no problem.  the settings user interface is implemented using some XAML that you mark up so something like this:

<TextBox Height="23" Margin="0,14,2,0" Name="textBox1"  
         VerticalAlignment="Top" 
         HorizontalAlignment="Right" 
         Width="200"> 
  </TextBox> 
     
  <Label Height="23" HorizontalAlignment="Right"  
      Margin="0,14,200,0" 
         VerticalAlignment="Top" 
         Width="61">Folder:</Label> 
     
  <Button Height="21" Margin="0,0,100,11"  
      Name="reset" VerticalAlignment="Bottom"  
      Click="reset_Click" 
      HorizontalAlignment="Right" 
      Width="66">Reset</Button> 
     
  <Button Height="21" HorizontalAlignment="Right"  
      Margin="0,0,13,11" Name="browse"  
      VerticalAlignment="Bottom" 
      Width="66" 
      Click="browse_Click">Browse</Button>

turns into something like this in the user interface:

very cool.  what would you use this for?  perhaps FTP, some blog API, or like i previously mentioned, some process with a CDN already.  i use amazon s3 for a lot of my storage and i'm thinking of hacking up something from encoder to amazon s3 to play around.  of course i've got a few things on my mind at the moment and this is all i needed was another toy to play around with!

at any rate, there's a 10-page doc walking you through the process of writing a plugin.  you can get that doc here.  it's an easy read and i think you'd be able to whip something simple up quickly just to get the feel for it.

have fun!

Please enjoy some of these other recent posts...

Comments