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
|
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
|