Tidy up http gstreamer source element.
This commit is contained in:
parent
747ae61620
commit
4862c41477
@ -20,6 +20,13 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
const char* GstEnginePipeline::kHttpGstreamerSource =
|
||||
#ifdef Q_OS_DARWIN
|
||||
"neonhttpsrc";
|
||||
#else
|
||||
"souphttpsrc"; // Does not exist on mac/fink.
|
||||
#endif
|
||||
|
||||
GstEnginePipeline::GstEnginePipeline()
|
||||
: QObject(NULL),
|
||||
valid_(false),
|
||||
@ -59,20 +66,11 @@ bool GstEnginePipeline::Init(const QUrl &url) {
|
||||
// audiosink
|
||||
|
||||
// Source
|
||||
#ifdef Q_OS_DARWIN
|
||||
// giosrc from Fink does not support HTTP.
|
||||
if (url.scheme() == "http") {
|
||||
src_ = GstEngine::CreateElement("neonhttpsrc");
|
||||
src_ = GstEngine::CreateElement(kHttpGstreamerSource);
|
||||
} else {
|
||||
src_ = GstEngine::CreateElement("giosrc");
|
||||
}
|
||||
#else
|
||||
if (url.scheme() == "http") {
|
||||
src_ = GstEngine::CreateElement("souphttpsrc");
|
||||
} else {
|
||||
src_ = GstEngine::CreateElement("giosrc");
|
||||
}
|
||||
#endif
|
||||
if (!src_)
|
||||
return false;
|
||||
|
||||
|
@ -81,6 +81,8 @@ class GstEnginePipeline : public QObject {
|
||||
private:
|
||||
static const int kGstStateTimeoutNanosecs = 10000000;
|
||||
|
||||
static const char* kHttpGstreamerSource;
|
||||
|
||||
bool valid_;
|
||||
QString sink_;
|
||||
QString device_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user