コード例 #1
0
ファイル: bakacommands.cpp プロジェクト: wcy95/Baka-MPlayer
void BakaEngine::BakaMediaInfo(QStringList &args)
{
    if(args.empty())
        MediaInfo(window->ui->actionMedia_Info->isChecked());
    else
        InvalidParameter(args.join(' '));
}
コード例 #2
0
	void LocalCollection::InitiateScan (const QSet<QString>& newPaths)
	{
		auto resolver = Core::Instance ().GetLocalFileResolver ();

		emit scanStarted (newPaths.size ());
		auto worker = [resolver] (const QString& path) -> MediaInfo
		{
			try
			{
				return resolver->ResolveInfo (path);
			}
			catch (const ResolveError& error)
			{
				qWarning () << Q_FUNC_INFO
						<< "error resolving media info for"
						<< error.GetPath ()
						<< error.what ();
				return MediaInfo ();
			}
		};
		const auto& future = QtConcurrent::mapped (newPaths,
				std::function<MediaInfo (const QString&)> (worker));
		Watcher_->setFuture (future);
	}
コード例 #3
0
MediaInfo VideoPlayerInfo::getMediaInfo(int pin)
{
	MediaInfo	*mn=0;
	switch(pin)
	{
		case pinVIDEO:
		return MediaInfo(MPmediaOUT|MPmediaBITMAP_XRGB, 0x2156788852102641, "video out", "video output");
		case pinPLAY:
		return MediaInfo(MPmediaIN|MPmediaINTEGER, 0x6523567899875884, "play", "play/pause", new MediaInteger(0), new MediaInteger(0), new MediaInteger(1));
		case pinPOS:
		return MediaInfo(MPmediaIN|MPmediaOUT|MPmediaFLOAT, 0x6523345678975884, "position", "current play position", new MediaFloat(0.0f));
		case pinRATE:
		return MediaInfo(MPmediaIN|MPmediaFLOAT, 0x6545678995398884, "rate", "movie play rate", new MediaFloat(0.6f));
		case pinLOOP:
		return MediaInfo(MPmediaIN|MPmediaINTEGER, 0x6594795378975884, "selection", "use selection", new MediaInteger(0), new MediaInteger(0), new MediaInteger(1));
		case pinPALINDROME:
		return MediaInfo(MPmediaIN|MPmediaINTEGER, 0x6594577978975884, "palindrome", "palindrome loop mode", new MediaInteger(0), new MediaInteger(0), new MediaInteger(1));
		case pinLOOPSTART:
		return MediaInfo(MPmediaIN|MPmediaOUT|MPmediaFLOAT, 0x4859872689954741, "loop start", "loop start point", new MediaFloat(0.0f));
		case pinLOOPLENGTH:
		return MediaInfo(MPmediaIN|MPmediaOUT|MPmediaFLOAT, 0x6335679987546721, "loop length", "loop length", new MediaFloat(1.0f));
		case pinSELECTMOVIE:
		return MediaInfo(MPmediaIN|MPmediaSELECTVIEW, 0x6335446789876721, "movies", "movies", new MediaInteger(0), new MediaInteger(0), new MediaInteger(MAXQT-1));
		case pinREVERS:
		return MediaInfo(MPmediaIN|MPmediaINTEGER, 0x6523564688985884, "revers", "revers mode", new MediaInteger(0), new MediaInteger(0), new MediaInteger(1));
		case pinRANDOM:
		return MediaInfo(MPmediaIN|MPmediaFLOAT, 0x6546abcdfff77884, "random", "random mode", new MediaFloat(0.f));
		case pinMODE:
		return MediaInfo(MPmediaIN|MPmediaINTEGER, 0x65567abcd8798432, "mode", "play mode", new MediaInteger(1), new MediaInteger(0), new MediaInteger(1));
	}
	return MediaInfo();
}