#include <QSpinBox>
#include <QSlider>
#include <QComboBox>
-#include <QCheckBox>
#include <QPushButton>
#include <QToolButton>
#include <QLineEdit>
formatSection(fmt);
capture_method:
- addLabel("Capture Method");
+ addLabel("Streaming Method");
m_capMethods = new QComboBox(parent);
if (has_streaming()) {
cv4l_queue q;
}
addWidget(m_capMethods);
+ addLabel("Use Record Priority");
+ m_recordPrio = new QCheckBox(parentWidget());
+ addWidget(m_recordPrio);
+
if (!isRadio() && !isVbi() && !m_isOutput && (has_crop() || has_compose())) {
addTitle("Cropping & Compose Settings");
cropSection();
#include <config.h>
#include <QSpinBox>
+#include <QCheckBox>
#include <QDoubleSpinBox>
#include <QStackedWidget>
#include <sys/time.h>
bool isVbi() const { return m_isVbi; }
bool isSlicedVbi() const;
bool isPlanar() const { return m_isPlanar; }
+ __u32 usePrio() const
+ {
+ return m_recordPrio->isChecked() ?
+ V4L2_PRIORITY_RECORD : V4L2_PRIORITY_DEFAULT;
+ }
void setHaveBuffers(bool haveBuffers);
void sourceChange(const v4l2_event &ev);
void sourceChangeSubscribe();
int query_dv_timings(v4l2_dv_timings &timings) { return m_fd->query_dv_timings(timings); }
int g_frequency(v4l2_frequency &freq, unsigned index = 0) { return m_fd->g_frequency(freq, index); }
int s_frequency(v4l2_frequency &freq) { return m_fd->s_frequency(freq); }
+ int g_priority(__u32 &prio) { return m_fd->g_priority(prio); }
+ int s_priority(__u32 prio = V4L2_PRIORITY_DEFAULT) { return m_fd->s_priority(prio); }
int streamon(__u32 type = 0) { return m_fd->streamon(type); }
int streamoff(__u32 type = 0) { return m_fd->streamoff(type); }
int querybuf(v4l_buffer &buf, unsigned index) { return m_fd->querybuf(buf, index); }
QComboBox *m_frameInterval;
QComboBox *m_vidOutFormats;
QComboBox *m_capMethods;
+ QCheckBox *m_recordPrio;
QComboBox *m_vbiMethods;
QComboBox *m_audioInDevice;
QComboBox *m_audioOutDevice;
{
startAudio();
- if (m_genTab->isRadio())
+ if (m_genTab->isRadio()) {
+ s_priority(m_genTab->usePrio());
return true;
+ }
m_queue.init(g_type(), m_capMethod);
case methodRead:
m_snapshotAct->setEnabled(true);
m_genTab->setHaveBuffers(true);
+ s_priority(m_genTab->usePrio());
/* Nothing to do. */
return true;
}
m_snapshotAct->setEnabled(true);
m_genTab->setHaveBuffers(true);
+ s_priority(m_genTab->usePrio());
return true;
}
{
stopAudio();
+ s_priority(V4L2_PRIORITY_DEFAULT);
+
if (m_genTab->isRadio())
return;
return cv4l_ioctl(VIDIOC_S_FREQUENCY, &freq);
}
+ int g_priority(__u32 &prio)
+ {
+ return cv4l_ioctl(VIDIOC_G_PRIORITY, &prio);
+ }
+
+ int s_priority(__u32 prio = V4L2_PRIORITY_DEFAULT)
+ {
+ return cv4l_ioctl(VIDIOC_S_PRIORITY, &prio);
+ }
+
int streamon(__u32 type = 0)
{
if (type == 0)