[Cctools-cchost] Re: [Clipart] ccHost - how to add file types

Bryce Harrington bryce at bryceharrington.org
Mon Feb 13 23:59:58 PST 2006


On Mon, Feb 13, 2006 at 07:14:07AM -0800, Victor Stone wrote:
> Jon Phillips wrote:
> >On Sun, 2006-02-12 at 21:19 +0100, Tobias Jakobs wrote:
> >
> >>Am Sonntag, den 12.02.2006, 09:35 -0800 schrieb Bryce Harrington:
> >>
> >>>I found where we add file types:  It's in cchost/cclib/cc-getid3.php, in
> >>>list of code elements like this:
> >>>
> >>>
> >>>        $file_formats['audio-aiff-aiff'] =  array(
> >>>          'name'       => 'aif',
> >>>          'description' => 'AIFF Audio',
> >>>          'enabled' => true,
> >>>          'mediatype' => 'audio',
> >>>          );
> >>>
> 
> I don't know that adding file types to that file will "just work" -- I 
> think the list of types in that file represents types that getid3 knows 
> how to verify. If getid3 doesn't know about that file type it will fail 
> no matter what you put into that file. Unless you:
> 
> - extend getid3 itself; not a bad choice and good for the community to 
> give back. THEN you need to add the type to cc-getid3.php

Okay, this sounds like a good idea.

Attached is a first cut at a really basic svg module.  I have no idea
what I'm doing with getid3 though, so could someone look at this and see
if it is on the right track?

Bryce

<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info at getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.graphic.svg.php                                      //
// module for analyzing SVG Image files                        //
// by Bryce W. Harrington                                      //
// dependencies: NONE                                          //
//                                                            ///
/////////////////////////////////////////////////////////////////


class getid3_svg
{
        function getid3_svg(&$fd, &$ThisFileInfo) {
                $ThisFileInfo['fileformat']                  = 'svg';
                $ThisFileInfo['video']['dataformat']         = 'svg';
                $ThisFileInfo['video']['lossless']           = true;

                return false;
        }
}


?>




More information about the clipart mailing list