Пример #1
0
void query_pt4::_configure(const quvi::options& opts) const
{
  if (! opts.stream.empty())
    quvi_setopt(_quvi, QUVIOPT_FORMAT, opts.stream.c_str());

  quvi_setopt(_quvi, QUVIOPT_STATUSFUNCTION, opts.statusfunc);
  quvi_setopt(_quvi, QUVIOPT_NORESOLVE, opts.resolve ? 0L:1L);
  quvi_setopt(_quvi, QUVIOPT_CATEGORY, QUVIPROTO_HTTP);
}
Пример #2
0
QuviMediaInfo::Quvi::Quvi() {
	QUVIcode qc = quvi_init(&q);
	if (qc != QUVI_OK)
		throw qc;
	qc = quvi_setopt(q, QUVIOPT_FORMAT, "best");
	if (qc != QUVI_OK)
		throw qc;
	qc = quvi_setopt(q, QUVIOPT_CATEGORY, QUVIPROTO_HTTP);
	if (qc != QUVI_OK)
		throw qc;
}
Пример #3
0
std::map<std::string,std::string> query_pt4::support() const
{
  quvi_setopt(_quvi, QUVIOPT_CATEGORY, QUVIPROTO_HTTP);

  std::map<std::string,std::string> r;
  char *a, *b;

  while (quvi_next_supported_website(_quvi, &a, &b) == QUVI_OK)
    {
      r[a] = b;
      quvi_free(a);
      quvi_free(b);
    }
  return r;
}