本文整理汇总了C++中MythMediaDevice::getDevicePath方法的典型用法代码示例。如果您正苦于以下问题:C++ MythMediaDevice::getDevicePath方法的具体用法?C++ MythMediaDevice::getDevicePath怎么用?C++ MythMediaDevice::getDevicePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythMediaDevice
的用法示例。
在下文中一共展示了MythMediaDevice::getDevicePath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: defaultDevice
QString MediaMonitor::defaultDevice(QString dbSetting,
QString label,
const char *hardCodedDefault)
{
QString device = gCoreContext->GetSetting(dbSetting);
LOG(VB_MEDIA, LOG_DEBUG,
QString("MediaMonitor::defaultDevice(%1,..,%2) dbSetting='%3'")
.arg(dbSetting).arg(hardCodedDefault).arg(device));
// No settings database defaults? Try to choose one:
if (device.isEmpty() || device == "default")
{
device = hardCodedDefault;
if (!c_monitor)
c_monitor = GetMediaMonitor();
if (c_monitor)
{
MythMediaDevice *d = c_monitor->selectDrivePopup(label, false, true);
if (d == (MythMediaDevice *) -1) // User cancelled
{
device.clear(); // If user has explicitly cancelled return empty string
d = NULL;
}
if (d && c_monitor->ValidateAndLock(d))
{
device = d->getDevicePath();
c_monitor->Unlock(d);
}
}
}
LOG(VB_MEDIA, LOG_DEBUG,
"MediaMonitor::defaultDevice() returning " + device);
return device;
}
示例2: defaultDevice
QString MediaMonitor::defaultDevice(QString dbSetting,
QString label,
const char *hardCodedDefault)
{
QString device = gCoreContext->GetSetting(dbSetting);
VERBOSE(VB_MEDIA+VB_EXTRA,
QString("MediaMonitor::defaultDevice(%1,..,%2) dbSetting='%3'")
.arg(dbSetting).arg(hardCodedDefault).arg(device));
// No settings database defaults? Try to choose one:
if (device.isEmpty() || device == "default")
{
device = hardCodedDefault;
if (!c_monitor)
c_monitor = GetMediaMonitor();
if (c_monitor)
{
MythMediaDevice *d = c_monitor->selectDrivePopup(label);
if (d == (MythMediaDevice *) -1) // User cancelled
d = NULL;
if (d && c_monitor->ValidateAndLock(d))
{
device = d->getDevicePath();
c_monitor->Unlock(d);
}
}
}
VERBOSE(VB_MEDIA+VB_EXTRA,
"MediaMonitor::defaultDevice() returning " + device);
return device;
}