Welcome Guest Search | Active Topics | Members | Log In | Register
Extending GS Pro to handle video conversion Options
RyanONeill
Posted: Tuesday, March 16, 2010 7:35:03 AM
Rank: Newbie

Joined: 3/9/2010
Posts: 3
Location: UK
Hi again,

What is the best approach to extending GS Pro to handle unsupported video formats? I want to upload .MTS files which are Sony HD format and then run them through a conversion service (the service would run on the machine monitoring a queue for work) so that they can come out as web viewable formats.

Obviously I can do the service for video conversion, but where would I slot it into the GS Pro way of doing things?

Thanks again

Ryan
Roger Martin
Posted: Tuesday, March 16, 2010 8:36:34 AM
Rank: Administration

Joined: 8/3/2007
Posts: 1,996
Location: Fort Atkinson, WI
If you can predict the name of the converted file, then the best approach is to modify the constructor of the Video class (in the business layer). Specifically, notice this line in the constructor:

this.Original = DisplayObject.CreateInstance(this, originalFilename, originalWidth, originalHeight, DisplayObjectType.Original, new NullObjects.NullDisplayObjectCreator());

Be sure the variable originalFilename contains the name of the converted video file (e.g. myvideo.flv). Also update the originalWidth and originalHeight to the correct width and height values (in pixels).

This approach assumes the converted file is in the same directory as the original. The save algorithm *might* throw an exception or behave unexpectedly if the converted file does not exist when you try to save it. You'll have to test it.


Roger Martin
Creator and Lead Developer of Gallery Server Pro
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.2 (NET v2.0) - 9/27/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.