"Fossies" - the Fresh Open Source Software Archive

Member "libextractor-1.11/src/plugins/test_gstreamer.c" (30 Jan 2021, 40665 Bytes) of package /linux/privat/libextractor-1.11.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*
    2      This file is part of libextractor.
    3      Copyright (C) 2012 Vidyut Samanta and Christian Grothoff
    4 
    5      libextractor is free software; you can redistribute it and/or modify
    6      it under the terms of the GNU General Public License as published
    7      by the Free Software Foundation; either version 3, or (at your
    8      option) any later version.
    9 
   10      libextractor is distributed in the hope that it will be useful, but
   11      WITHOUT ANY WARRANTY; without even the implied warranty of
   12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   13      General Public License for more details.
   14 
   15      You should have received a copy of the GNU General Public License
   16      along with libextractor; see the file COPYING.  If not, write to the
   17      Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   18      Boston, MA 02110-1301, USA.
   19 */
   20 /**
   21  * @file plugins/test_gstreamer.c
   22  * @brief testcase for gstreamer plugin
   23  * @author LRN
   24  */
   25 #include "platform.h"
   26 #include "test_lib.h"
   27 #include <glib.h>
   28 #include <gst/gst.h>
   29 #include <gst/pbutils/pbutils.h>
   30 
   31 
   32 /**
   33  * This is a miniaturized version of gst-discoverer, its only purpose is
   34  * to detect missing plugins situations and skip a test in such cases.
   35  */
   36 static GstDiscovererResult
   37 discoverer_main (GstDiscoverer *dc, const char *filename)
   38 {
   39   GError *err = NULL;
   40   gchar *uri;
   41   gchar *path;
   42   GstDiscovererInfo *info;
   43   GstDiscovererResult result;
   44 
   45   if (! gst_uri_is_valid (filename))
   46   {
   47     if (! g_path_is_absolute (filename))
   48     {
   49       gchar *cur_dir;
   50 
   51       cur_dir = g_get_current_dir ();
   52       path = g_build_filename (cur_dir, filename, NULL);
   53       g_free (cur_dir);
   54     }
   55     else
   56     {
   57       path = g_strdup (filename);
   58     }
   59 
   60     uri = g_filename_to_uri (path, NULL, &err);
   61     g_free (path);
   62     path = NULL;
   63 
   64     if (err)
   65     {
   66       g_warning ("Couldn't convert filename %s to URI: %s\n", filename,
   67                  err->message);
   68       g_error_free (err);
   69       return GST_DISCOVERER_ERROR;
   70     }
   71   }
   72   else
   73   {
   74     uri = g_strdup (filename);
   75   }
   76   info = gst_discoverer_discover_uri (dc, uri, &err);
   77   result = gst_discoverer_info_get_result (info);
   78   switch (result)
   79   {
   80   case GST_DISCOVERER_OK:
   81     break;
   82   case GST_DISCOVERER_URI_INVALID:
   83     g_print ("URI %s is not valid\n", uri);
   84     break;
   85   case GST_DISCOVERER_ERROR:
   86     g_print ("An error was encountered while discovering the file %s\n",
   87              filename);
   88     g_print (" %s\n", err->message);
   89     break;
   90   case GST_DISCOVERER_TIMEOUT:
   91     g_print ("Analyzing URI %s timed out\n", uri);
   92     break;
   93   case GST_DISCOVERER_BUSY:
   94     g_print ("Discoverer was busy\n");
   95     break;
   96   case GST_DISCOVERER_MISSING_PLUGINS:
   97     g_print ("Will skip %s: missing plugins\n", filename);
   98     break;
   99   default:
  100     g_print ("Unexpected result %d\n", result);
  101     break;
  102   }
  103   if (err)
  104     g_error_free (err);
  105   gst_discoverer_info_unref (info);
  106   g_free (uri);
  107 
  108   return result;
  109 }
  110 
  111 
  112 /**
  113  * Main function for the GStreamer testcase.
  114  *
  115  * @param argc number of arguments (ignored)
  116  * @param argv arguments (ignored)
  117  * @return 0 on success
  118  */
  119 int
  120 main (int argc, char *argv[])
  121 {
  122   GError *err = NULL;
  123   GstDiscoverer *dc;
  124   int result = 0;
  125   GstDiscovererResult pre_test;
  126 
  127   gst_init (&argc, &argv);
  128   dc = gst_discoverer_new (10 * GST_SECOND, &err);
  129   if (NULL == dc)
  130   {
  131     g_print ("Error initializing: %s\n", err->message);
  132     return 0;
  133   }
  134   if (NULL != err)
  135     g_error_free (err);
  136 
  137   pre_test = discoverer_main (dc, "testdata/gstreamer_30_and_33.asf");
  138   if (GST_DISCOVERER_MISSING_PLUGINS != pre_test)
  139   {
  140     int test_result;
  141     struct SolutionData thirty_and_thirtythree_sol[] = {
  142       {
  143         EXTRACTOR_METATYPE_DURATION,
  144         EXTRACTOR_METAFORMAT_UTF8,
  145         "text/plain",
  146         "0:00:05.061000000",
  147         strlen ("0:00:05.061000000") + 1,
  148         0
  149       },
  150       {
  151         EXTRACTOR_METATYPE_TRACK_NUMBER,
  152         EXTRACTOR_METAFORMAT_UTF8,
  153         "text/plain",
  154         "21",
  155         strlen ("21") + 1,
  156         0
  157       },
  158       {
  159         EXTRACTOR_METATYPE_ALBUM,
  160         EXTRACTOR_METAFORMAT_UTF8,
  161         "text/plain",
  162         "Zee Album",
  163         strlen ("Zee Album") + 1,
  164         0
  165       },
  166       {
  167         EXTRACTOR_METATYPE_CREATION_TIME,
  168         EXTRACTOR_METAFORMAT_UTF8,
  169         "text/plain",
  170         "9999",
  171         strlen ("9999") + 1,
  172         0
  173       },
  174       {
  175         EXTRACTOR_METATYPE_ARTIST,
  176         EXTRACTOR_METAFORMAT_UTF8,
  177         "text/plain",
  178         "All performed by Nobody",
  179         strlen ("All performed by Nobody") + 1,
  180         0
  181       },
  182       {
  183         EXTRACTOR_METATYPE_ARTIST,
  184         EXTRACTOR_METAFORMAT_UTF8,
  185         "text/plain",
  186         "This Artist Contributed",
  187         strlen ("This Artist Contributed") + 1,
  188         0
  189       },
  190       {
  191         EXTRACTOR_METATYPE_TITLE,
  192         EXTRACTOR_METAFORMAT_UTF8,
  193         "text/plain",
  194         "Some title",
  195         strlen ("Some title") + 1,
  196         0
  197       },
  198       /* Suggest a fix to gst devs; should be a comment, not description */
  199       {
  200         EXTRACTOR_METATYPE_DESCRIPTION,
  201         EXTRACTOR_METAFORMAT_UTF8,
  202         "text/plain",
  203         "A witty comment",
  204         strlen ("A witty comment") + 1,
  205         0
  206       },
  207       {
  208         EXTRACTOR_METATYPE_CONTAINER_FORMAT,
  209         EXTRACTOR_METAFORMAT_UTF8,
  210         "text/plain",
  211         "ASF",
  212         strlen ("ASF") + 1,
  213         0
  214       },
  215       {
  216         EXTRACTOR_METATYPE_AUDIO_CODEC,
  217         EXTRACTOR_METAFORMAT_UTF8,
  218         "text/plain",
  219         "WMA Version 8",
  220         strlen ("WMA Version 8") + 1,
  221         0
  222       },
  223       {
  224         EXTRACTOR_METATYPE_MIMETYPE,
  225         EXTRACTOR_METAFORMAT_UTF8,
  226         "text/plain",
  227         "video/x-ms-asf",
  228         strlen ("video/x-ms-asf") + 1,
  229         0
  230       },
  231       {
  232         EXTRACTOR_METATYPE_MIMETYPE,
  233         EXTRACTOR_METAFORMAT_UTF8,
  234         "text/plain",
  235         "audio/x-wma",
  236         strlen ("audio/x-wma") + 1,
  237         0
  238       },
  239       {
  240         EXTRACTOR_METATYPE_UNKNOWN,
  241         EXTRACTOR_METAFORMAT_UTF8,
  242         "text/plain",
  243         "wmaversion=2",
  244         strlen ("wmaversion=2") + 1,
  245         0
  246       },
  247       {
  248         EXTRACTOR_METATYPE_UNKNOWN,
  249         EXTRACTOR_METAFORMAT_UTF8,
  250         "text/plain",
  251         "bitrate=96024",
  252         strlen ("bitrate=96024") + 1,
  253         0
  254       },
  255       {
  256         EXTRACTOR_METATYPE_UNKNOWN,
  257         EXTRACTOR_METAFORMAT_UTF8,
  258         "text/plain",
  259         "block_align=4459",
  260         strlen ("block_align=4459") + 1,
  261         0
  262       },
  263       {
  264         EXTRACTOR_METATYPE_AUDIO_LANGUAGE,
  265         EXTRACTOR_METAFORMAT_UTF8,
  266         "text/plain",
  267         "en",
  268         strlen ("en") + 1,
  269         0
  270       },
  271       {
  272         EXTRACTOR_METATYPE_CHANNELS,
  273         EXTRACTOR_METAFORMAT_UTF8,
  274         "text/plain",
  275         "2",
  276         strlen ("2") + 1,
  277         0
  278       },
  279       {
  280         EXTRACTOR_METATYPE_SAMPLE_RATE,
  281         EXTRACTOR_METAFORMAT_UTF8,
  282         "text/plain",
  283         "44100",
  284         strlen ("44100") + 1,
  285         0
  286       },
  287       {
  288         EXTRACTOR_METATYPE_AUDIO_DEPTH,
  289         EXTRACTOR_METAFORMAT_UTF8,
  290         "text/plain",
  291         "16",
  292         strlen ("16") + 1,
  293         0
  294       },
  295       { 0, 0, NULL, NULL, 0, -1 }
  296     };
  297     struct ProblemSet ps[] = {
  298       { "testdata/gstreamer_30_and_33.asf", thirty_and_thirtythree_sol },
  299       { NULL, NULL }
  300     };
  301     g_print ("Running asf test on GStreamer:\n");
  302     test_result = (0 == ET_main ("gstreamer", ps) ? 0 : 1);
  303     g_print ("asf GStreamer test result: %s\n", test_result == 0 ? "OK" :
  304              "FAILED");
  305     result += test_result;
  306   }
  307 
  308   pre_test = discoverer_main (dc, "testdata/gstreamer_barsandtone.flv");
  309   if (pre_test != GST_DISCOVERER_MISSING_PLUGINS)
  310   {
  311     int test_result;
  312     struct SolutionData barsandtone_sol[] = {
  313       {
  314         EXTRACTOR_METATYPE_DURATION,
  315         EXTRACTOR_METAFORMAT_UTF8,
  316         "text/plain",
  317         "0:00:06.060000000",
  318         strlen ("0:00:06.060000000") + 1,
  319         0
  320       },
  321       {
  322         EXTRACTOR_METATYPE_MIMETYPE,
  323         EXTRACTOR_METAFORMAT_UTF8,
  324         "text/plain",
  325         "video/x-flv",
  326         strlen ("video/x-flv") + 1,
  327         0
  328       },
  329       {
  330         EXTRACTOR_METATYPE_MIMETYPE,
  331         EXTRACTOR_METAFORMAT_UTF8,
  332         "text/plain",
  333         "video/x-vp6-flash",
  334         strlen ("video/x-vp6-flash") + 1,
  335         0
  336       },
  337       {
  338         EXTRACTOR_METATYPE_VIDEO_DURATION,
  339         EXTRACTOR_METAFORMAT_UTF8,
  340         "text/plain",
  341         "0:00:06.000000000",
  342         strlen ("0:00:06.000000000") + 1,
  343         0
  344       },
  345       {
  346         EXTRACTOR_METATYPE_AUDIO_CODEC,
  347         EXTRACTOR_METAFORMAT_UTF8,
  348         "text/plain",
  349         "MPEG-1 Layer 3 (MP3)",
  350         strlen ("MPEG-1 Layer 3 (MP3)") + 1,
  351         0
  352       },
  353       {
  354         EXTRACTOR_METATYPE_VIDEO_CODEC,
  355         EXTRACTOR_METAFORMAT_UTF8,
  356         "text/plain",
  357         "On2 VP6/Flash",
  358         strlen ("On2 VP6/Flash") + 1,
  359         0
  360       },
  361       {
  362         EXTRACTOR_METATYPE_VIDEO_DIMENSIONS,
  363         EXTRACTOR_METAFORMAT_UTF8,
  364         "text/plain",
  365         "368x288",
  366         strlen ("368x288") + 1,
  367         0
  368       },
  369       {
  370         EXTRACTOR_METATYPE_FRAME_RATE,
  371         EXTRACTOR_METAFORMAT_UTF8,
  372         "text/plain",
  373         "10/1",
  374         strlen ("10/1") + 1,
  375         0
  376       },
  377       {
  378         EXTRACTOR_METATYPE_PIXEL_ASPECT_RATIO,
  379         EXTRACTOR_METAFORMAT_UTF8,
  380         "text/plain",
  381         "1/1",
  382         strlen ("1/1") + 1,
  383         0
  384       },
  385       {
  386         EXTRACTOR_METATYPE_MIMETYPE,
  387         EXTRACTOR_METAFORMAT_UTF8,
  388         "text/plain",
  389         "audio/mpeg",
  390         strlen ("audio/mpeg") + 1,
  391         0
  392       },
  393       {
  394         EXTRACTOR_METATYPE_UNKNOWN,
  395         EXTRACTOR_METAFORMAT_UTF8,
  396         "text/plain",
  397         "mpegversion=1",
  398         strlen ("mpegversion=1") + 1,
  399         0
  400       },
  401       {
  402         EXTRACTOR_METATYPE_UNKNOWN,
  403         EXTRACTOR_METAFORMAT_UTF8,
  404         "text/plain",
  405         "mpegaudioversion=1",
  406         strlen ("mpegaudioversion=1") + 1,
  407         0
  408       },
  409       {
  410         EXTRACTOR_METATYPE_UNKNOWN,
  411         EXTRACTOR_METAFORMAT_UTF8,
  412         "text/plain",
  413         "layer=3",
  414         strlen ("layer=3") + 1,
  415         0
  416       },
  417       {
  418         EXTRACTOR_METATYPE_UNKNOWN,
  419         EXTRACTOR_METAFORMAT_UTF8,
  420         "text/plain",
  421         "parsed=true",
  422         strlen ("parsed=true") + 1,
  423         0
  424       },
  425       {
  426         EXTRACTOR_METATYPE_AUDIO_DURATION,
  427         EXTRACTOR_METAFORMAT_UTF8,
  428         "text/plain",
  429         "0:00:06.000000000",
  430         strlen ("0:00:06.000000000") + 1,
  431         0
  432       },
  433       /* Yes, again. This seems to be a bug/feature of the element that
  434        * gives us these streams; this doesn't happen when discovering
  435        * Matroska files, for example. Or maybe file itself is made that way.
  436        */
  437       {
  438         EXTRACTOR_METATYPE_AUDIO_CODEC,
  439         EXTRACTOR_METAFORMAT_UTF8,
  440         "text/plain",
  441         "MPEG-1 Layer 3 (MP3)",
  442         strlen ("MPEG-1 Layer 3 (MP3)") + 1,
  443         0
  444       },
  445       {
  446         EXTRACTOR_METATYPE_VIDEO_CODEC,
  447         EXTRACTOR_METAFORMAT_UTF8,
  448         "text/plain",
  449         "On2 VP6/Flash",
  450         strlen ("On2 VP6/Flash") + 1,
  451         0
  452       },
  453       {
  454         EXTRACTOR_METATYPE_UNKNOWN,
  455         EXTRACTOR_METAFORMAT_UTF8,
  456         "text/plain",
  457         "has-crc=false",
  458         strlen ("has-crc=false") + 1,
  459         0
  460       },
  461       {
  462         EXTRACTOR_METATYPE_UNKNOWN,
  463         EXTRACTOR_METAFORMAT_UTF8,
  464         "text/plain",
  465         "channel-mode=joint-stereo",
  466         strlen ("channel-mode=joint-stereo") + 1,
  467         0
  468       },
  469       {
  470         EXTRACTOR_METATYPE_CHANNELS,
  471         EXTRACTOR_METAFORMAT_UTF8,
  472         "text/plain",
  473         "2",
  474         strlen ("2") + 1,
  475         0
  476       },
  477       {
  478         EXTRACTOR_METATYPE_SAMPLE_RATE,
  479         EXTRACTOR_METAFORMAT_UTF8,
  480         "text/plain",
  481         "44100",
  482         strlen ("44100") + 1,
  483         0
  484       },
  485       {
  486         EXTRACTOR_METATYPE_AUDIO_BITRATE,
  487         EXTRACTOR_METAFORMAT_UTF8,
  488         "text/plain",
  489         "96000",
  490         strlen ("96000") + 1,
  491         0
  492       },
  493       { 0, 0, NULL, NULL, 0, -1 }
  494     };
  495     struct ProblemSet ps[] = {
  496       { "testdata/gstreamer_barsandtone.flv", barsandtone_sol },
  497       { NULL, NULL }
  498     };
  499     g_print ("Running flv test on GStreamer:\n");
  500     test_result = (0 == ET_main ("gstreamer", ps) ? 0 : 1);
  501     g_print ("flv GStreamer test result: %s\n", test_result == 0 ? "OK" :
  502              "FAILED");
  503     result += test_result;
  504   }
  505   pre_test = discoverer_main (dc, "testdata/gstreamer_sample_sorenson.mov");
  506   if (pre_test != GST_DISCOVERER_MISSING_PLUGINS)
  507   {
  508     int test_result;
  509     struct SolutionData sample_sorenson_sol[] = {
  510       {
  511         EXTRACTOR_METATYPE_DURATION,
  512         EXTRACTOR_METAFORMAT_UTF8,
  513         "text/plain",
  514         "0:00:05.000000000",
  515         strlen ("0:00:05.000000000") + 1,
  516         0
  517       },
  518       {
  519         EXTRACTOR_METATYPE_MIMETYPE,
  520         EXTRACTOR_METAFORMAT_UTF8,
  521         "text/plain",
  522         "video/quicktime",
  523         strlen ("video/quicktime") + 1,
  524         0
  525       },
  526       {
  527         EXTRACTOR_METATYPE_MIMETYPE,
  528         EXTRACTOR_METAFORMAT_UTF8,
  529         "text/plain",
  530         "audio/x-qdm2",
  531         strlen ("audio/x-qdm2") + 1,
  532         0
  533       },
  534       {
  535         EXTRACTOR_METATYPE_UNKNOWN,
  536         EXTRACTOR_METAFORMAT_UTF8,
  537         "text/plain",
  538         "samplesize=16",
  539         strlen ("samplesize=16") + 1,
  540         0
  541       },
  542       {
  543         EXTRACTOR_METATYPE_AUDIO_CODEC,
  544         EXTRACTOR_METAFORMAT_UTF8,
  545         "text/plain",
  546         "QDesign Music v.2",
  547         strlen ("QDesign Music v.2") + 1,
  548         0
  549       },
  550       {
  551         EXTRACTOR_METATYPE_CREATION_TIME,
  552         EXTRACTOR_METAFORMAT_UTF8,
  553         "text/plain",
  554         "2001-02-19T16:45:54Z",
  555         strlen ("2001-02-19T16:45:54Z") + 1,
  556         0
  557       },
  558       {
  559         EXTRACTOR_METATYPE_TITLE,
  560         EXTRACTOR_METAFORMAT_UTF8,
  561         "text/plain",
  562         "QuickTime Sample Movie",
  563         strlen ("QuickTime Sample Movie") + 1,
  564         0
  565       },
  566       {
  567         EXTRACTOR_METATYPE_COPYRIGHT,
  568         EXTRACTOR_METAFORMAT_UTF8,
  569         "text/plain",
  570         "© Apple Computer, Inc. 2001",
  571         strlen ("© Apple Computer, Inc. 2001") + 1,
  572         0
  573       },
  574       {
  575         EXTRACTOR_METATYPE_CONTAINER_FORMAT,
  576         EXTRACTOR_METAFORMAT_UTF8,
  577         "text/plain",
  578         "ISO MP4/M4A",
  579         strlen ("ISO MP4/M4A") + 1,
  580         0
  581       },
  582       {
  583         EXTRACTOR_METATYPE_AUDIO_LANGUAGE,
  584         EXTRACTOR_METAFORMAT_UTF8,
  585         "text/plain",
  586         "en",
  587         strlen ("en") + 1,
  588         0
  589       },
  590       {
  591         EXTRACTOR_METATYPE_CHANNELS,
  592         EXTRACTOR_METAFORMAT_UTF8,
  593         "text/plain",
  594         "2",
  595         strlen ("2") + 1,
  596         0
  597       },
  598       {
  599         EXTRACTOR_METATYPE_SAMPLE_RATE,
  600         EXTRACTOR_METAFORMAT_UTF8,
  601         "text/plain",
  602         "22050",
  603         strlen ("22050") + 1,
  604         0
  605       },
  606       {
  607         EXTRACTOR_METATYPE_MIMETYPE,
  608         EXTRACTOR_METAFORMAT_UTF8,
  609         "text/plain",
  610         "video/x-svq",
  611         strlen ("video/x-svq") + 1,
  612         0
  613       },
  614       {
  615         EXTRACTOR_METATYPE_UNKNOWN,
  616         EXTRACTOR_METAFORMAT_UTF8,
  617         "text/plain",
  618         "svqversion=1",
  619         strlen ("svqversion=1") + 1,
  620         0
  621       },
  622       /* Yep, again... */
  623       {
  624         EXTRACTOR_METATYPE_CREATION_TIME,
  625         EXTRACTOR_METAFORMAT_UTF8,
  626         "text/plain",
  627         "2001-02-19T16:45:54Z",
  628         strlen ("2001-02-19T16:45:54Z") + 1,
  629         0
  630       },
  631       {
  632         EXTRACTOR_METATYPE_TITLE,
  633         EXTRACTOR_METAFORMAT_UTF8,
  634         "text/plain",
  635         "QuickTime Sample Movie",
  636         strlen ("QuickTime Sample Movie") + 1,
  637         0
  638       },
  639       {
  640         EXTRACTOR_METATYPE_COPYRIGHT,
  641         EXTRACTOR_METAFORMAT_UTF8,
  642         "text/plain",
  643         "© Apple Computer, Inc. 2001",
  644         strlen ("© Apple Computer, Inc. 2001") + 1,
  645         0
  646       },
  647       {
  648         EXTRACTOR_METATYPE_CONTAINER_FORMAT,
  649         EXTRACTOR_METAFORMAT_UTF8,
  650         "text/plain",
  651         "ISO MP4/M4A",
  652         strlen ("ISO MP4/M4A") + 1,
  653         0
  654       },
  655       {
  656         EXTRACTOR_METATYPE_VIDEO_CODEC,
  657         EXTRACTOR_METAFORMAT_UTF8,
  658         "text/plain",
  659         "Sorensen video v.1",
  660         strlen ("Sorensen video v.1") + 1,
  661         0
  662       },
  663       {
  664         EXTRACTOR_METATYPE_VIDEO_LANGUAGE,
  665         EXTRACTOR_METAFORMAT_UTF8,
  666         "text/plain",
  667         "en",
  668         strlen ("en") + 1,
  669         0
  670       },
  671       {
  672         EXTRACTOR_METATYPE_VIDEO_DIMENSIONS,
  673         EXTRACTOR_METAFORMAT_UTF8,
  674         "text/plain",
  675         "190x240",
  676         strlen ("190x240") + 1,
  677         0
  678       },
  679       {
  680         EXTRACTOR_METATYPE_FRAME_RATE,
  681         EXTRACTOR_METAFORMAT_UTF8,
  682         "text/plain",
  683         "12/1",
  684         strlen ("12/1") + 1,
  685         0
  686       },
  687       {
  688         EXTRACTOR_METATYPE_PIXEL_ASPECT_RATIO,
  689         EXTRACTOR_METAFORMAT_UTF8,
  690         "text/plain",
  691         "1/1",
  692         strlen ("1/1") + 1,
  693         0
  694       },
  695       { 0, 0, NULL, NULL, 0, -1 }
  696     };
  697     struct ProblemSet ps[] = {
  698       { "testdata/gstreamer_sample_sorenson.mov", sample_sorenson_sol },
  699       { NULL, NULL }
  700     };
  701     g_print ("Running mov test on GStreamer:\n");
  702     test_result = (0 == ET_main ("gstreamer", ps) ? 0 : 1);
  703     g_print ("mov GStreamer test result: %s\n", test_result == 0 ? "OK" :
  704              "FAILED");
  705     result += test_result;
  706   }
  707 
  708   pre_test = discoverer_main (dc, "testdata/matroska_flame.mkv");
  709   if (pre_test != GST_DISCOVERER_MISSING_PLUGINS)
  710   {
  711     int result_stock;
  712     int result_patched;
  713     struct SolutionData matroska_flame_stock_sol[] = {
  714       {
  715         EXTRACTOR_METATYPE_DURATION,
  716         EXTRACTOR_METAFORMAT_UTF8,
  717         "text/plain",
  718         "0:00:03.143000000",
  719         strlen ("0:00:03.143000000") + 1,
  720         0
  721       },
  722       {
  723         EXTRACTOR_METATYPE_MIMETYPE,
  724         EXTRACTOR_METAFORMAT_UTF8,
  725         "text/plain",
  726         "video/x-matroska",
  727         strlen ("video/x-matroska") + 1,
  728         0
  729       },
  730       {
  731         EXTRACTOR_METATYPE_MIMETYPE,
  732         EXTRACTOR_METAFORMAT_UTF8,
  733         "text/plain",
  734         "video/x-indeo",
  735         strlen ("video/x-indeo") + 1,
  736         0
  737       },
  738       {
  739         EXTRACTOR_METATYPE_UNKNOWN,
  740         EXTRACTOR_METAFORMAT_UTF8,
  741         "text/plain",
  742         "indeoversion=4",
  743         strlen ("indeoversion=4") + 1,
  744         0
  745       },
  746       {
  747         EXTRACTOR_METATYPE_TITLE,
  748         EXTRACTOR_METAFORMAT_UTF8,
  749         "text/plain",
  750         "filesegmenttitle",
  751         strlen ("filesegmenttitle") + 1,
  752         0
  753       },
  754       {
  755         EXTRACTOR_METATYPE_TITLE,
  756         EXTRACTOR_METAFORMAT_UTF8,
  757         "text/plain",
  758         "TITLE",
  759         strlen ("TITLE") + 1,
  760         0
  761       },
  762       {
  763         EXTRACTOR_METATYPE_ARTIST,
  764         EXTRACTOR_METAFORMAT_UTF8,
  765         "text/plain",
  766         "ALBUM/ARTIST",
  767         strlen ("ALBUM/ARTIST") + 1,
  768         0
  769       },
  770       {
  771         EXTRACTOR_METATYPE_ARTIST,
  772         EXTRACTOR_METAFORMAT_UTF8,
  773         "text/plain",
  774         "ARTIST",
  775         strlen ("ARTIST") + 1,
  776         0
  777       },
  778       {
  779         EXTRACTOR_METATYPE_COPYRIGHT,
  780         EXTRACTOR_METAFORMAT_UTF8,
  781         "text/plain",
  782         "COPYRIGHT",
  783         strlen ("COPYRIGHT") + 1,
  784         0
  785       },
  786       {
  787         EXTRACTOR_METATYPE_COMPOSER,
  788         EXTRACTOR_METAFORMAT_UTF8,
  789         "text/plain",
  790         "COMPOSER",
  791         strlen ("COMPOSER") + 1,
  792         0
  793       },
  794       {
  795         EXTRACTOR_METATYPE_GENRE,
  796         EXTRACTOR_METAFORMAT_UTF8,
  797         "text/plain",
  798         "GENRE",
  799         strlen ("GENRE") + 1,
  800         0
  801       },
  802       {
  803         EXTRACTOR_METATYPE_ENCODER,
  804         EXTRACTOR_METAFORMAT_UTF8,
  805         "text/plain",
  806         "ENCODER",
  807         strlen ("ENCODER") + 1,
  808         0
  809       },
  810       {
  811         EXTRACTOR_METATYPE_ISRC,
  812         EXTRACTOR_METAFORMAT_UTF8,
  813         "text/plain",
  814         "ISRC",
  815         strlen ("ISRC") + 1,
  816         0
  817       },
  818       {
  819         EXTRACTOR_METATYPE_CONTAINER_FORMAT,
  820         EXTRACTOR_METAFORMAT_UTF8,
  821         "text/plain",
  822         "Matroska",
  823         strlen ("Matroska") + 1,
  824         0
  825       },
  826       {
  827         EXTRACTOR_METATYPE_VIDEO_CODEC,
  828         EXTRACTOR_METAFORMAT_UTF8,
  829         "text/plain",
  830         "Intel Video 4",
  831         strlen ("Intel Video 4") + 1,
  832         0
  833       },
  834       {
  835         EXTRACTOR_METATYPE_VIDEO_LANGUAGE,
  836         EXTRACTOR_METAFORMAT_UTF8,
  837         "text/plain",
  838         "it",
  839         strlen ("it") + 1,
  840         0
  841       },
  842       {
  843         EXTRACTOR_METATYPE_VIDEO_DIMENSIONS,
  844         EXTRACTOR_METAFORMAT_UTF8,
  845         "text/plain",
  846         "256x240",
  847         strlen ("256x240") + 1,
  848         0
  849       },
  850       {
  851         EXTRACTOR_METATYPE_FRAME_RATE,
  852         EXTRACTOR_METAFORMAT_UTF8,
  853         "text/plain",
  854         "35/1",
  855         strlen ("35/1") + 1,
  856         0
  857       },
  858       {
  859         EXTRACTOR_METATYPE_PIXEL_ASPECT_RATIO,
  860         EXTRACTOR_METAFORMAT_UTF8,
  861         "text/plain",
  862         "1/1",
  863         strlen ("1/1") + 1,
  864         0
  865       },
  866       { 0, 0, NULL, NULL, 0, -1 }
  867     };
  868     struct ProblemSet stock_ps[] = {
  869       { "testdata/matroska_flame.mkv", matroska_flame_stock_sol },
  870       { NULL, NULL }
  871     };
  872 
  873 
  874     struct SolutionData matroska_flame_patched_sol[] = {
  875       {
  876         EXTRACTOR_METATYPE_DURATION,
  877         EXTRACTOR_METAFORMAT_UTF8,
  878         "text/plain",
  879         "0:00:03.143000000",
  880         strlen ("0:00:03.143000000") + 1,
  881         0
  882       },
  883       {
  884         EXTRACTOR_METATYPE_MIMETYPE,
  885         EXTRACTOR_METAFORMAT_UTF8,
  886         "text/plain",
  887         "video/x-matroska",
  888         strlen ("video/x-matroska") + 1,
  889         0
  890       },
  891       {
  892         EXTRACTOR_METATYPE_MIMETYPE,
  893         EXTRACTOR_METAFORMAT_UTF8,
  894         "text/plain",
  895         "video/x-indeo",
  896         strlen ("video/x-indeo") + 1,
  897         0
  898       },
  899       {
  900         EXTRACTOR_METATYPE_UNKNOWN,
  901         EXTRACTOR_METAFORMAT_UTF8,
  902         "text/plain",
  903         "indeoversion=4",
  904         strlen ("indeoversion=4") + 1,
  905         0
  906       },
  907       {
  908         EXTRACTOR_METATYPE_TITLE,
  909         EXTRACTOR_METAFORMAT_UTF8,
  910         "text/plain",
  911         "filesegmenttitle",
  912         strlen ("filesegmenttitle") + 1,
  913         0
  914       },
  915       {
  916         EXTRACTOR_METATYPE_ALBUM,
  917         EXTRACTOR_METAFORMAT_UTF8,
  918         "text/plain",
  919         "ALBUM/TITLE",
  920         strlen ("ALBUM/TITLE") + 1,
  921         0
  922       },
  923       {
  924         EXTRACTOR_METATYPE_TITLE,
  925         EXTRACTOR_METAFORMAT_UTF8,
  926         "text/plain",
  927         "TITLE",
  928         strlen ("TITLE") + 1,
  929         0
  930       },
  931       {
  932         EXTRACTOR_METATYPE_TITLE,
  933         EXTRACTOR_METAFORMAT_UTF8,
  934         "text/plain",
  935         "SUBTITLE",
  936         strlen ("SUBTITLE") + 1,
  937         0
  938       },
  939       {
  940         EXTRACTOR_METATYPE_TITLE,
  941         EXTRACTOR_METAFORMAT_UTF8,
  942         "text/plain",
  943         "VIDEO/TITLE",
  944         strlen ("VIDEO/TITLE") + 1,
  945         0
  946       },
  947       {
  948         EXTRACTOR_METATYPE_ARTIST,
  949         EXTRACTOR_METAFORMAT_UTF8,
  950         "text/plain",
  951         "ALBUM/ARTIST",
  952         strlen ("ALBUM/ARTIST") + 1,
  953         0
  954       },
  955       {
  956         EXTRACTOR_METATYPE_ARTIST,
  957         EXTRACTOR_METAFORMAT_UTF8,
  958         "text/plain",
  959         "ARTIST",
  960         strlen ("ARTIST") + 1,
  961         0
  962       },
  963       {
  964         EXTRACTOR_METATYPE_SONG_COUNT,
  965         EXTRACTOR_METAFORMAT_UTF8,
  966         "text/plain",
  967         "20",
  968         strlen ("20") + 1,
  969         0
  970       },
  971       {
  972         EXTRACTOR_METATYPE_UNKNOWN,
  973         EXTRACTOR_METAFORMAT_UTF8,
  974         "text/plain",
  975         "PART_OFFSET=5",
  976         strlen ("PART_OFFSET=5") + 1,
  977         0
  978       },
  979       {
  980         EXTRACTOR_METATYPE_UNKNOWN,
  981         EXTRACTOR_METAFORMAT_UTF8,
  982         "text/plain",
  983         "ARTIST/INSTRUMENTS=ARTIST/INSTRUMENTS",
  984         strlen ("ARTIST/INSTRUMENTS=ARTIST/INSTRUMENTS") + 1,
  985         0
  986       },
  987       {
  988         EXTRACTOR_METATYPE_UNKNOWN,
  989         EXTRACTOR_METAFORMAT_UTF8,
  990         "text/plain",
  991         "LEAD_PERFORMER=LEAD_PERFORMER",
  992         strlen ("LEAD_PERFORMER=LEAD_PERFORMER") + 1,
  993         0
  994       },
  995       {
  996         EXTRACTOR_METATYPE_UNKNOWN,
  997         EXTRACTOR_METAFORMAT_UTF8,
  998         "text/plain",
  999         "ARRANGER=ARRANGER",
 1000         strlen ("ARRANGER=ARRANGER") + 1,
 1001         0
 1002       },
 1003       {
 1004         EXTRACTOR_METATYPE_UNKNOWN,
 1005         EXTRACTOR_METAFORMAT_UTF8,
 1006         "text/plain",
 1007         "LYRICIST=LYRICIST",
 1008         strlen ("LYRICIST=LYRICIST") + 1,
 1009         0
 1010       },
 1011       {
 1012         EXTRACTOR_METATYPE_MOVIE_DIRECTOR,
 1013         EXTRACTOR_METAFORMAT_UTF8,
 1014         "text/plain",
 1015         "DIRECTOR",
 1016         strlen ("DIRECTOR") + 1,
 1017         0
 1018       },
 1019       {
 1020         EXTRACTOR_METATYPE_UNKNOWN,
 1021         EXTRACTOR_METAFORMAT_UTF8,
 1022         "text/plain",
 1023         "ASSISTANT_DIRECTOR=ASSISTANT_DIRECTOR",
 1024         strlen ("ASSISTANT_DIRECTOR=ASSISTANT_DIRECTOR") + 1,
 1025         0
 1026       },
 1027       {
 1028         EXTRACTOR_METATYPE_UNKNOWN,
 1029         EXTRACTOR_METAFORMAT_UTF8,
 1030         "text/plain",
 1031         "DIRECTOR_OF_PHOTOGRAPHY=DIRECTOR_OF_PHOTOGRAPHY",
 1032         strlen ("DIRECTOR_OF_PHOTOGRAPHY=DIRECTOR_OF_PHOTOGRAPHY") + 1,
 1033         0
 1034       },
 1035       {
 1036         EXTRACTOR_METATYPE_UNKNOWN,
 1037         EXTRACTOR_METAFORMAT_UTF8,
 1038         "text/plain",
 1039         "SOUND_ENGINEER=SOUND_ENGINEER",
 1040         strlen ("SOUND_ENGINEER=SOUND_ENGINEER") + 1,
 1041         0
 1042       },
 1043       {
 1044         EXTRACTOR_METATYPE_UNKNOWN,
 1045         EXTRACTOR_METAFORMAT_UTF8,
 1046         "text/plain",
 1047         "ART_DIRECTOR=ART_DIRECTOR",
 1048         strlen ("ART_DIRECTOR=ART_DIRECTOR") + 1,
 1049         0
 1050       },
 1051       {
 1052         EXTRACTOR_METATYPE_UNKNOWN,
 1053         EXTRACTOR_METAFORMAT_UTF8,
 1054         "text/plain",
 1055         "PRODUCTION_DESIGNER=PRODUCTION_DESIGNER",
 1056         strlen ("PRODUCTION_DESIGNER=PRODUCTION_DESIGNER") + 1,
 1057         0
 1058       },
 1059       {
 1060         EXTRACTOR_METATYPE_UNKNOWN,
 1061         EXTRACTOR_METAFORMAT_UTF8,
 1062         "text/plain",
 1063         "CHOREGRAPHER=CHOREGRAPHER",
 1064         strlen ("CHOREGRAPHER=CHOREGRAPHER") + 1,
 1065         0
 1066       },
 1067       {
 1068         EXTRACTOR_METATYPE_UNKNOWN,
 1069         EXTRACTOR_METAFORMAT_UTF8,
 1070         "text/plain",
 1071         "COSTUME_DESIGNER=COSTUME_DESIGNER",
 1072         strlen ("COSTUME_DESIGNER=COSTUME_DESIGNER") + 1,
 1073         0
 1074       },
 1075       {
 1076         EXTRACTOR_METATYPE_UNKNOWN,
 1077         EXTRACTOR_METAFORMAT_UTF8,
 1078         "text/plain",
 1079         "ACTOR=ACTOR",
 1080         strlen ("ACTOR=ACTOR") + 1,
 1081         0
 1082       },
 1083       {
 1084         EXTRACTOR_METATYPE_UNKNOWN,
 1085         EXTRACTOR_METAFORMAT_UTF8,
 1086         "text/plain",
 1087         "CHARACTER=CHARACTER",
 1088         strlen ("CHARACTER=CHARACTER") + 1,
 1089         0
 1090       },
 1091       {
 1092         EXTRACTOR_METATYPE_WRITER,
 1093         EXTRACTOR_METAFORMAT_UTF8,
 1094         "text/plain",
 1095         "WRITTEN_BY",
 1096         strlen ("WRITTEN_BY") + 1,
 1097         0
 1098       },
 1099       {
 1100         EXTRACTOR_METATYPE_UNKNOWN,
 1101         EXTRACTOR_METAFORMAT_UTF8,
 1102         "text/plain",
 1103         "SCREENPLAY_BY=SCREENPLAY_BY",
 1104         strlen ("SCREENPLAY_BY=SCREENPLAY_BY") + 1,
 1105         0
 1106       },
 1107       {
 1108         EXTRACTOR_METATYPE_UNKNOWN,
 1109         EXTRACTOR_METAFORMAT_UTF8,
 1110         "text/plain",
 1111         "EDITED_BY=EDITED_BY",
 1112         strlen ("EDITED_BY=EDITED_BY") + 1,
 1113         0
 1114       },
 1115       {
 1116         EXTRACTOR_METATYPE_PRODUCER,
 1117         EXTRACTOR_METAFORMAT_UTF8,
 1118         "text/plain",
 1119         "PRODUCER",
 1120         strlen ("PRODUCER") + 1,
 1121         0
 1122       },
 1123       {
 1124         EXTRACTOR_METATYPE_UNKNOWN,
 1125         EXTRACTOR_METAFORMAT_UTF8,
 1126         "text/plain",
 1127         "COPRODUCER=COPRODUCER",
 1128         strlen ("COPRODUCER=COPRODUCER") + 1,
 1129         0
 1130       },
 1131       {
 1132         EXTRACTOR_METATYPE_UNKNOWN,
 1133         EXTRACTOR_METAFORMAT_UTF8,
 1134         "text/plain",
 1135         "EXECUTIVE_PRODUCER=EXECUTIVE_PRODUCER",
 1136         strlen ("EXECUTIVE_PRODUCER=EXECUTIVE_PRODUCER") + 1,
 1137         0
 1138       },
 1139       {
 1140         EXTRACTOR_METATYPE_UNKNOWN,
 1141         EXTRACTOR_METAFORMAT_UTF8,
 1142         "text/plain",
 1143         "DISTRIBUTED_BY=DISTRIBUTED_BY",
 1144         strlen ("DISTRIBUTED_BY=DISTRIBUTED_BY") + 1,
 1145         0
 1146       },
 1147       {
 1148         EXTRACTOR_METATYPE_UNKNOWN,
 1149         EXTRACTOR_METAFORMAT_UTF8,
 1150         "text/plain",
 1151         "MASTERED_BY=MASTERED_BY",
 1152         strlen ("MASTERED_BY=MASTERED_BY") + 1,
 1153         0
 1154       },
 1155       {
 1156         EXTRACTOR_METATYPE_UNKNOWN,
 1157         EXTRACTOR_METAFORMAT_UTF8,
 1158         "text/plain",
 1159         "MIXED_BY=MIXED_BY",
 1160         strlen ("MIXED_BY=MIXED_BY") + 1,
 1161         0
 1162       },
 1163       {
 1164         EXTRACTOR_METATYPE_UNKNOWN,
 1165         EXTRACTOR_METAFORMAT_UTF8,
 1166         "text/plain",
 1167         "REMIXED_BY=REMIXED_BY",
 1168         strlen ("REMIXED_BY=REMIXED_BY") + 1,
 1169         0
 1170       },
 1171       {
 1172         EXTRACTOR_METATYPE_UNKNOWN,
 1173         EXTRACTOR_METAFORMAT_UTF8,
 1174         "text/plain",
 1175         "PRODUCTION_STUDIO=PRODUCTION_STUDIO",
 1176         strlen ("PRODUCTION_STUDIO=PRODUCTION_STUDIO") + 1,
 1177         0
 1178       },
 1179       {
 1180         EXTRACTOR_METATYPE_UNKNOWN,
 1181         EXTRACTOR_METAFORMAT_UTF8,
 1182         "text/plain",
 1183         "THANKS_TO=THANKS_TO",
 1184         strlen ("THANKS_TO=THANKS_TO") + 1,
 1185         0
 1186       },
 1187       {
 1188         EXTRACTOR_METATYPE_PUBLISHER,
 1189         EXTRACTOR_METAFORMAT_UTF8,
 1190         "text/plain",
 1191         "PUBLISHER",
 1192         strlen ("PUBLISHER") + 1,
 1193         0
 1194       },
 1195       {
 1196         EXTRACTOR_METATYPE_UNKNOWN,
 1197         EXTRACTOR_METAFORMAT_UTF8,
 1198         "text/plain",
 1199         "LABEL=LABEL",
 1200         strlen ("LABEL=LABEL") + 1,
 1201         0
 1202       },
 1203       {
 1204         EXTRACTOR_METATYPE_MOOD,
 1205         EXTRACTOR_METAFORMAT_UTF8,
 1206         "text/plain",
 1207         "MOOD",
 1208         strlen ("MOOD") + 1,
 1209         0
 1210       },
 1211       {
 1212         EXTRACTOR_METATYPE_UNKNOWN,
 1213         EXTRACTOR_METAFORMAT_UTF8,
 1214         "text/plain",
 1215         "ORIGINAL_MEDIA_TYPE=ORIGINAL_MEDIA_TYPE",
 1216         strlen ("ORIGINAL_MEDIA_TYPE=ORIGINAL_MEDIA_TYPE") + 1,
 1217         0
 1218       },
 1219       {
 1220         EXTRACTOR_METATYPE_UNKNOWN,
 1221         EXTRACTOR_METAFORMAT_UTF8,
 1222         "text/plain",
 1223         "CONTENT_TYPE=CONTENT_TYPE",
 1224         strlen ("CONTENT_TYPE=CONTENT_TYPE") + 1,
 1225         0
 1226       },
 1227       {
 1228         EXTRACTOR_METATYPE_SUBJECT,
 1229         EXTRACTOR_METAFORMAT_UTF8,
 1230         "text/plain",
 1231         "SUBJECT",
 1232         strlen ("SUBJECT") + 1,
 1233         0
 1234       },
 1235       {
 1236         EXTRACTOR_METATYPE_SUMMARY,
 1237         EXTRACTOR_METAFORMAT_UTF8,
 1238         "text/plain",
 1239         "SUMMARY",
 1240         strlen ("SUMMARY") + 1,
 1241         0
 1242       },
 1243       {
 1244         EXTRACTOR_METATYPE_UNKNOWN,
 1245         EXTRACTOR_METAFORMAT_UTF8,
 1246         "text/plain",
 1247         "SYNOPSIS=SYNOPSIS",
 1248         strlen ("SYNOPSIS=SYNOPSIS") + 1,
 1249         0
 1250       },
 1251       {
 1252         EXTRACTOR_METATYPE_UNKNOWN,
 1253         EXTRACTOR_METAFORMAT_UTF8,
 1254         "text/plain",
 1255         "INITIAL_KEY=INITIAL_KEY",
 1256         strlen ("INITIAL_KEY=INITIAL_KEY") + 1,
 1257         0
 1258       },
 1259       {
 1260         EXTRACTOR_METATYPE_UNKNOWN,
 1261         EXTRACTOR_METAFORMAT_UTF8,
 1262         "text/plain",
 1263         "PERIOD=PERIOD",
 1264         strlen ("PERIOD=PERIOD") + 1,
 1265         0
 1266       },
 1267       {
 1268         EXTRACTOR_METATYPE_UNKNOWN,
 1269         EXTRACTOR_METAFORMAT_UTF8,
 1270         "text/plain",
 1271         "LAW_RATING=LAW_RATING",
 1272         strlen ("LAW_RATING=LAW_RATING") + 1,
 1273         0
 1274       },
 1275       {
 1276         EXTRACTOR_METATYPE_UNKNOWN,
 1277         EXTRACTOR_METAFORMAT_UTF8,
 1278         "text/plain",
 1279         "COMPOSITION_LOCATION=COMPOSITION_LOCATION",
 1280         strlen ("COMPOSITION_LOCATION=COMPOSITION_LOCATION") + 1,
 1281         0
 1282       },
 1283       {
 1284         EXTRACTOR_METATYPE_UNKNOWN,
 1285         EXTRACTOR_METAFORMAT_UTF8,
 1286         "text/plain",
 1287         "COMPOSER_NATIONALITY=COMPOSER_NATIONALITY",
 1288         strlen ("COMPOSER_NATIONALITY=COMPOSER_NATIONALITY") + 1,
 1289         0
 1290       },
 1291       {
 1292         EXTRACTOR_METATYPE_PLAY_COUNTER,
 1293         EXTRACTOR_METAFORMAT_UTF8,
 1294         "text/plain",
 1295         "PLAY_COUNTER",
 1296         strlen ("PLAY_COUNTER") + 1,
 1297         0
 1298       },
 1299       {
 1300         EXTRACTOR_METATYPE_RATING,
 1301         EXTRACTOR_METAFORMAT_UTF8,
 1302         "text/plain",
 1303         "RATING",
 1304         strlen ("RATING") + 1,
 1305         0
 1306       },
 1307       {
 1308         EXTRACTOR_METATYPE_UNKNOWN,
 1309         EXTRACTOR_METAFORMAT_UTF8,
 1310         "text/plain",
 1311         "ENCODER_SETTINGS=ENCODER_SETTINGS",
 1312         strlen ("ENCODER_SETTINGS=ENCODER_SETTINGS") + 1,
 1313         0
 1314       },
 1315       {
 1316         EXTRACTOR_METATYPE_FRAME_RATE,
 1317         EXTRACTOR_METAFORMAT_UTF8,
 1318         "text/plain",
 1319         "FPS",
 1320         strlen ("FPS") + 1,
 1321         0
 1322       },
 1323       {
 1324         EXTRACTOR_METATYPE_UNKNOWN,
 1325         EXTRACTOR_METAFORMAT_UTF8,
 1326         "text/plain",
 1327         "MEASURE=MEASURE",
 1328         strlen ("MEASURE=MEASURE") + 1,
 1329         0
 1330       },
 1331       {
 1332         EXTRACTOR_METATYPE_UNKNOWN,
 1333         EXTRACTOR_METAFORMAT_UTF8,
 1334         "text/plain",
 1335         "TUNING=TUNING",
 1336         strlen ("TUNING=TUNING") + 1,
 1337         0
 1338       },
 1339       {
 1340         EXTRACTOR_METATYPE_UNKNOWN,
 1341         EXTRACTOR_METAFORMAT_UTF8,
 1342         "text/plain",
 1343         "ISBN=ISBN",
 1344         strlen ("ISBN=ISBN") + 1,
 1345         0
 1346       },
 1347       {
 1348         EXTRACTOR_METATYPE_UNKNOWN,
 1349         EXTRACTOR_METAFORMAT_UTF8,
 1350         "text/plain",
 1351         "BARCODE=BARCODE",
 1352         strlen ("BARCODE=BARCODE") + 1,
 1353         0
 1354       },
 1355       {
 1356         EXTRACTOR_METATYPE_UNKNOWN,
 1357         EXTRACTOR_METAFORMAT_UTF8,
 1358         "text/plain",
 1359         "CATALOG_NUMBER=CATALOG_NUMBER",
 1360         strlen ("CATALOG_NUMBER=CATALOG_NUMBER") + 1,
 1361         0
 1362       },
 1363       {
 1364         EXTRACTOR_METATYPE_UNKNOWN,
 1365         EXTRACTOR_METAFORMAT_UTF8,
 1366         "text/plain",
 1367         "LABEL_CODE=LABEL_CODE",
 1368         strlen ("LABEL_CODE=LABEL_CODE") + 1,
 1369         0
 1370       },
 1371       {
 1372         EXTRACTOR_METATYPE_UNKNOWN,
 1373         EXTRACTOR_METAFORMAT_UTF8,
 1374         "text/plain",
 1375         "LCCN=LCCN",
 1376         strlen ("LCCN=LCCN") + 1,
 1377         0
 1378       },
 1379       {
 1380         EXTRACTOR_METATYPE_UNKNOWN,
 1381         EXTRACTOR_METAFORMAT_UTF8,
 1382         "text/plain",
 1383         "PURCHASE_ITEM=PURCHASE_ITEM",
 1384         strlen ("PURCHASE_ITEM=PURCHASE_ITEM") + 1,
 1385         0
 1386       },
 1387       {
 1388         EXTRACTOR_METATYPE_UNKNOWN,
 1389         EXTRACTOR_METAFORMAT_UTF8,
 1390         "text/plain",
 1391         "PURCHASE_INFO=PURCHASE_INFO",
 1392         strlen ("PURCHASE_INFO=PURCHASE_INFO") + 1,
 1393         0
 1394       },
 1395       {
 1396         EXTRACTOR_METATYPE_UNKNOWN,
 1397         EXTRACTOR_METAFORMAT_UTF8,
 1398         "text/plain",
 1399         "PURCHASE_OWNER=PURCHASE_OWNER",
 1400         strlen ("PURCHASE_OWNER=PURCHASE_OWNER") + 1,
 1401         0
 1402       },
 1403       {
 1404         EXTRACTOR_METATYPE_UNKNOWN,
 1405         EXTRACTOR_METAFORMAT_UTF8,
 1406         "text/plain",
 1407         "PURCHASE_PRICE=PURCHASE_PRICE",
 1408         strlen ("PURCHASE_PRICE=PURCHASE_PRICE") + 1,
 1409         0
 1410       },
 1411       {
 1412         EXTRACTOR_METATYPE_UNKNOWN,
 1413         EXTRACTOR_METAFORMAT_UTF8,
 1414         "text/plain",
 1415         "PURCHASE_CURRENCY=PURCHASE_CURRENCY",
 1416         strlen ("PURCHASE_CURRENCY=PURCHASE_CURRENCY") + 1,
 1417         0
 1418       },
 1419       {
 1420         EXTRACTOR_METATYPE_ORIGINAL_TITLE,
 1421         EXTRACTOR_METAFORMAT_UTF8,
 1422         "text/plain",
 1423         "ORIGINAL/TITLE",
 1424         strlen ("ORIGINAL/TITLE") + 1,
 1425         0
 1426       },
 1427       {
 1428         EXTRACTOR_METATYPE_UNKNOWN,
 1429         EXTRACTOR_METAFORMAT_UTF8,
 1430         "text/plain",
 1431         "ORIGINAL/ARTIST/SORT_WITH=ORIGINAL/ARTIST/SORT_WITH",
 1432         strlen ("ORIGINAL/ARTIST/SORT_WITH=ORIGINAL/ARTIST/SORT_WITH") + 1,
 1433         0
 1434       },
 1435       {
 1436         EXTRACTOR_METATYPE_ORIGINAL_ARTIST,
 1437         EXTRACTOR_METAFORMAT_UTF8,
 1438         "text/plain",
 1439         "ORIGINAL/ARTIST",
 1440         strlen ("ORIGINAL/ARTIST") + 1,
 1441         0
 1442       },
 1443       {
 1444         EXTRACTOR_METATYPE_TRACK_NUMBER,
 1445         EXTRACTOR_METAFORMAT_UTF8,
 1446         "text/plain",
 1447         "10",
 1448         strlen ("10") + 1,
 1449         0
 1450       },
 1451       {
 1452         EXTRACTOR_METATYPE_COPYRIGHT,
 1453         EXTRACTOR_METAFORMAT_UTF8,
 1454         "text/plain",
 1455         "COPYRIGHT",
 1456         strlen ("COPYRIGHT") + 1,
 1457         0
 1458       },
 1459       {
 1460         EXTRACTOR_METATYPE_CONTACT_INFORMATION,
 1461         EXTRACTOR_METAFORMAT_UTF8,
 1462         "text/plain",
 1463         "COPYRIGHT/EMAIL",
 1464         strlen ("COPYRIGHT/EMAIL") + 1,
 1465         0
 1466       },
 1467       {
 1468         EXTRACTOR_METATYPE_CONTACT_INFORMATION,
 1469         EXTRACTOR_METAFORMAT_UTF8,
 1470         "text/plain",
 1471         "COPYRIGHT/ADDRESS",
 1472         strlen ("COPYRIGHT/ADDRESS") + 1,
 1473         0
 1474       },
 1475       {
 1476         EXTRACTOR_METATYPE_CREATION_TIME,
 1477         EXTRACTOR_METAFORMAT_UTF8,
 1478         "text/plain",
 1479         "1999-01-01",
 1480         strlen ("1999-01-01") + 1,
 1481         0
 1482       },
 1483       {
 1484         EXTRACTOR_METATYPE_COMMENT,
 1485         EXTRACTOR_METAFORMAT_UTF8,
 1486         "text/plain",
 1487         "The purpose of this file is to hold as many examples of Matroska tags as possible.",
 1488         strlen (
 1489           "The purpose of this file is to hold as many examples of Matroska tags as possible.")
 1490         + 1,
 1491         0
 1492       },
 1493       {
 1494         EXTRACTOR_METATYPE_COMPOSER,
 1495         EXTRACTOR_METAFORMAT_UTF8,
 1496         "text/plain",
 1497         "COMPOSER",
 1498         strlen ("COMPOSER") + 1,
 1499         0
 1500       },
 1501       {
 1502         EXTRACTOR_METATYPE_PERFORMER,
 1503         EXTRACTOR_METAFORMAT_UTF8,
 1504         "text/plain",
 1505         "ACCOMPANIMENT",
 1506         strlen ("ACCOMPANIMENT") + 1,
 1507         0
 1508       },
 1509       {
 1510         EXTRACTOR_METATYPE_PERFORMER,
 1511         EXTRACTOR_METAFORMAT_UTF8,
 1512         "text/plain",
 1513         "CONDUCTOR",
 1514         strlen ("CONDUCTOR") + 1,
 1515         0
 1516       },
 1517       {
 1518         EXTRACTOR_METATYPE_LYRICS,
 1519         EXTRACTOR_METAFORMAT_UTF8,
 1520         "text/plain",
 1521         "LYRICS",
 1522         strlen ("LYRICS") + 1,
 1523         0
 1524       },
 1525       {
 1526         EXTRACTOR_METATYPE_ENCODED_BY,
 1527         EXTRACTOR_METAFORMAT_UTF8,
 1528         "text/plain",
 1529         "ENCODED_BY",
 1530         strlen ("ENCODED_BY") + 1,
 1531         0
 1532       },
 1533       {
 1534         EXTRACTOR_METATYPE_GENRE,
 1535         EXTRACTOR_METAFORMAT_UTF8,
 1536         "text/plain",
 1537         "GENRE",
 1538         strlen ("GENRE") + 1,
 1539         0
 1540       },
 1541       {
 1542         EXTRACTOR_METATYPE_DESCRIPTION,
 1543         EXTRACTOR_METAFORMAT_UTF8,
 1544         "text/plain",
 1545         "DESCRIPTION",
 1546         strlen ("DESCRIPTION") + 1,
 1547         0
 1548       },
 1549       {
 1550         EXTRACTOR_METATYPE_KEYWORDS,
 1551         EXTRACTOR_METAFORMAT_UTF8,
 1552         "text/plain",
 1553         "KEYWORDS",
 1554         strlen ("KEYWORDS") + 1,
 1555         0
 1556       },
 1557       {
 1558         EXTRACTOR_METATYPE_LOCATION_NAME,
 1559         EXTRACTOR_METAFORMAT_UTF8,
 1560         "text/plain",
 1561         "RECORDING_LOCATION",
 1562         strlen ("RECORDING_LOCATION") + 1,
 1563         0
 1564       },
 1565       {
 1566         EXTRACTOR_METATYPE_ENCODER,
 1567         EXTRACTOR_METAFORMAT_UTF8,
 1568         "text/plain",
 1569         "ENCODER",
 1570         strlen ("ENCODER") + 1,
 1571         0
 1572       },
 1573       {
 1574         EXTRACTOR_METATYPE_ISRC,
 1575         EXTRACTOR_METAFORMAT_UTF8,
 1576         "text/plain",
 1577         "ISRC",
 1578         strlen ("ISRC") + 1,
 1579         0
 1580       },
 1581       {
 1582         EXTRACTOR_METATYPE_LICENSE,
 1583         EXTRACTOR_METAFORMAT_UTF8,
 1584         "text/plain",
 1585         "LICENSE",
 1586         strlen ("LICENSE") + 1,
 1587         0
 1588       },
 1589       {
 1590         EXTRACTOR_METATYPE_CONTAINER_FORMAT,
 1591         EXTRACTOR_METAFORMAT_UTF8,
 1592         "text/plain",
 1593         "Matroska",
 1594         strlen ("Matroska") + 1,
 1595         0
 1596       },
 1597       {
 1598         EXTRACTOR_METATYPE_VIDEO_CODEC,
 1599         EXTRACTOR_METAFORMAT_UTF8,
 1600         "text/plain",
 1601         "Intel Video 4",
 1602         strlen ("Intel Video 4") + 1,
 1603         0
 1604       },
 1605       {
 1606         EXTRACTOR_METATYPE_VIDEO_LANGUAGE,
 1607         EXTRACTOR_METAFORMAT_UTF8,
 1608         "text/plain",
 1609         "it",
 1610         strlen ("it") + 1,
 1611         0
 1612       },
 1613       {
 1614         EXTRACTOR_METATYPE_VIDEO_DIMENSIONS,
 1615         EXTRACTOR_METAFORMAT_UTF8,
 1616         "text/plain",
 1617         "256x240",
 1618         strlen ("256x240") + 1,
 1619         0
 1620       },
 1621       {
 1622         EXTRACTOR_METATYPE_FRAME_RATE,
 1623         EXTRACTOR_METAFORMAT_UTF8,
 1624         "text/plain",
 1625         "35/1",
 1626         strlen ("35/1") + 1,
 1627         0
 1628       },
 1629       {
 1630         EXTRACTOR_METATYPE_PIXEL_ASPECT_RATIO,
 1631         EXTRACTOR_METAFORMAT_UTF8,
 1632         "text/plain",
 1633         "1/1",
 1634         strlen ("1/1") + 1,
 1635         0
 1636       },
 1637       { 0, 0, NULL, NULL, 0, -1 }
 1638     };
 1639     struct ProblemSet patched_ps[] = {
 1640       { "testdata/matroska_flame.mkv", matroska_flame_patched_sol },
 1641       { NULL, NULL }
 1642     };
 1643     g_print ("Running mkv test on GStreamer, assuming old version:\n");
 1644     result_stock = (0 == ET_main ("gstreamer", stock_ps));
 1645     g_print ("Old GStreamer test result: %s\n", result_stock == 0 ? "OK" :
 1646              "FAILED");
 1647     g_print ("Running mkv test on GStreamer, assuming new version:\n");
 1648     result_patched = (0 == ET_main ("gstreamer", patched_ps));
 1649     g_print ("New GStreamer test result: %s\n", result_patched == 0 ? "OK" :
 1650              "FAILED");
 1651     if ((! result_stock) && (! result_patched))
 1652       result++;
 1653   }
 1654   g_object_unref (dc);
 1655   if (0 != result)
 1656   {
 1657     fprintf (stderr,
 1658              "gstreamer library did not work perfectly --- consider updating it.\n");
 1659     /* do not fail hard, as we know many users have outdated gstreamer packages */
 1660     result = 0;
 1661   }
 1662   return result;
 1663 }
 1664 
 1665 
 1666 /* end of test_gstreamer.c */