Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Extending GS Pro to handle video conversion
RyanONeill
#1 Posted : Monday, 15 March 2010 11:35:03 PM(UTC)
Rank: Member

Joined: 9/03/2010(UTC)
Posts: 4
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
#2 Posted : Tuesday, 16 March 2010 12:36:34 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,168
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
Rss Feed  Atom Feed
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.