equal
deleted
inserted
replaced
276 if (avformat_find_stream_info(pContext, NULL) < 0) |
276 if (avformat_find_stream_info(pContext, NULL) < 0) |
277 #endif |
277 #endif |
278 return ""; |
278 return ""; |
279 |
279 |
280 int s = float(pContext->duration)/AV_TIME_BASE; |
280 int s = float(pContext->duration)/AV_TIME_BASE; |
281 QString desc = QString(tr("Duration: %1m %2s\n")).arg(s/60).arg(s%60); |
281 QString desc = tr("Duration: %1m %2s").arg(s/60).arg(s%60) + "\n"; |
282 for (int i = 0; i < (int)pContext->nb_streams; i++) |
282 for (int i = 0; i < (int)pContext->nb_streams; i++) |
283 { |
283 { |
284 AVStream* pStream = pContext->streams[i]; |
284 AVStream* pStream = pContext->streams[i]; |
285 if (!pStream) |
285 if (!pStream) |
286 continue; |
286 continue; |
288 if (!pCodec) |
288 if (!pCodec) |
289 continue; |
289 continue; |
290 |
290 |
291 if (pCodec->codec_type == AVMEDIA_TYPE_VIDEO) |
291 if (pCodec->codec_type == AVMEDIA_TYPE_VIDEO) |
292 { |
292 { |
293 desc += QString(tr("Video: %1x%2, ")).arg(pCodec->width).arg(pCodec->height); |
293 desc += QString(tr("Video: %1x%2")).arg(pCodec->width).arg(pCodec->height) + ", "; |
294 if (pStream->avg_frame_rate.den) |
294 if (pStream->avg_frame_rate.den) |
295 { |
295 { |
296 float fps = float(pStream->avg_frame_rate.num)/pStream->avg_frame_rate.den; |
296 float fps = float(pStream->avg_frame_rate.num)/pStream->avg_frame_rate.den; |
297 desc += QString(tr("%1 fps, ")).arg(fps, 0, 'f', 2); |
297 desc += QString(tr("%1 fps")).arg(fps, 0, 'f', 2) + ", "; |
298 } |
298 } |
299 } |
299 } |
300 else if (pCodec->codec_type == AVMEDIA_TYPE_AUDIO) |
300 else if (pCodec->codec_type == AVMEDIA_TYPE_AUDIO) |
301 desc += tr("Audio: "); |
301 desc += tr("Audio: "); |
302 else |
302 else |