QTfrontend/util/libav_iteraction.cpp
changeset 7376 48b79b3ca592
parent 7361 b73d7688dadc
child 7528 f8cf277dca36
equal deleted inserted replaced
7373:d5ec4e4eb2d5 7376:48b79b3ca592
    82 #else
    82 #else
    83         if (!pCodec->encode)
    83         if (!pCodec->encode)
    84 #endif
    84 #endif
    85             continue;
    85             continue;
    86 
    86 
    87         if (pCodec->capabilities & CODEC_CAP_EXPERIMENTAL)
       
    88             continue;
       
    89 
       
    90         if (pCodec->type != AVMEDIA_TYPE_VIDEO && pCodec->type != AVMEDIA_TYPE_AUDIO)
    87         if (pCodec->type != AVMEDIA_TYPE_VIDEO && pCodec->type != AVMEDIA_TYPE_AUDIO)
    91             continue;
    88             continue;
    92 
    89 
    93         // this encoders seems to be buggy
    90         // this encoders seems to be buggy
    94         if (strcmp(pCodec->name, "rv10") == 0 || strcmp(pCodec->name, "rv20") == 0)
    91         if (strcmp(pCodec->name, "rv10") == 0 || strcmp(pCodec->name, "rv20") == 0)
    95             continue;
    92             continue;
    96 
    93 
    97         // doesn't support stereo sound
    94         // doesn't support stereo sound
    98         if (strcmp(pCodec->name, "real_144") == 0)
    95         if (strcmp(pCodec->name, "real_144") == 0)
    99             continue;
    96             continue;
   100 
       
   101 #if LIBAVCODEC_VERSION_MAJOR < 54
       
   102         // FIXME: theese doesn't work for some reason
       
   103         if (strcmp(pCodec->name, "libx264") == 0)
       
   104             continue;
       
   105         if (strcmp(pCodec->name, "libxvid") == 0)
       
   106             continue;
       
   107 #endif
       
   108 
    97 
   109         if (pCodec->type == AVMEDIA_TYPE_VIDEO)
    98         if (pCodec->type == AVMEDIA_TYPE_VIDEO)
   110         {
    99         {
   111             if (pCodec->supported_framerates != NULL)
   100             if (pCodec->supported_framerates != NULL)
   112                 continue;
   101                 continue;
   168 
   157 
   169         if (strcmp(pCodec->name, "mpeg4") == 0 || strcmp(pCodec->name, "ac3_fixed") == 0)
   158         if (strcmp(pCodec->name, "mpeg4") == 0 || strcmp(pCodec->name, "ac3_fixed") == 0)
   170             codec.isRecomended = true;
   159             codec.isRecomended = true;
   171 
   160 
   172         // FIXME: remove next line
   161         // FIXME: remove next line
   173        // codec.longName += QString(" (%1)").arg(codec.shortName);
   162         codec.longName += QString(" (%1)").arg(codec.shortName);
   174     }
   163     }
   175 
   164 
   176     // get list of all formats
   165     // get list of all formats
   177     AVOutputFormat* pFormat = NULL;
   166     AVOutputFormat* pFormat = NULL;
   178     while (pFormat = av_oformat_next(pFormat))
   167     while (pFormat = av_oformat_next(pFormat))
   202         format.extension = ext;
   191         format.extension = ext;
   203         format.shortName = pFormat->name;
   192         format.shortName = pFormat->name;
   204         format.longName = QString("%1 (*.%2)").arg(pFormat->long_name).arg(ext);
   193         format.longName = QString("%1 (*.%2)").arg(pFormat->long_name).arg(ext);
   205 
   194 
   206         // FIXME: remove next line
   195         // FIXME: remove next line
   207        // format.longName += QString(" (%1)").arg(format.shortName);
   196         format.longName += QString(" (%1)").arg(format.shortName);
   208 
   197 
   209         format.isRecomended = strcmp(pFormat->name, "mp4") == 0 || strcmp(pFormat->name, "avi") == 0;
   198         format.isRecomended = strcmp(pFormat->name, "mp4") == 0 || strcmp(pFormat->name, "avi") == 0;
   210 
   199 
   211         formats[pFormat->name] = format;
   200         formats[pFormat->name] = format;
   212     }
   201     }