Created
May 6, 2011 21:46
-
-
Save lfranchi/959849 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index b1fbbb5..c85e07f 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -14,8 +14,8 @@ set(PHONON_GST_PATCH_VERSION "1") | |
set(PHONON_GST_VERSION "${PHONON_GST_MAJOR_VERSION}.${PHONON_GST_MINOR_VERSION}.${PHONON_GST_PATCH_VERSION}") | |
add_definitions(-DPHONON_GST_VERSION="${PHONON_GST_VERSION}") | |
-if (Q_WS_X11) | |
+#if (Q_WS_X11) | |
add_subdirectory(gstreamer) | |
-endif (Q_WS_X11) | |
+#endif (Q_WS_X11) | |
macro_display_feature_log() | |
diff --git a/gstreamer/backend.cpp b/gstreamer/backend.cpp | |
index 49b66d0..5f949e6 100644 | |
--- a/gstreamer/backend.cpp | |
+++ b/gstreamer/backend.cpp | |
@@ -294,14 +294,14 @@ QList<int> Backend::objectDescriptionIndexes(ObjectDescriptionType type) const | |
list.append(deviceList[dev].id); | |
break; | |
} | |
- break; | |
+ break; /* | |
case Phonon::VideoCaptureDeviceType: { | |
QList<VideoCaptureDevice> deviceList = deviceManager()->videoCaptureDevices(); | |
for(int dev = 0 ; dev < deviceList.size() ; ++dev) | |
list.append(deviceList[dev].id); | |
break; | |
} | |
- break; | |
+ break; */ | |
case Phonon::EffectType: { | |
QList<EffectInfo*> effectList = effectManager()->audioEffects(); | |
@@ -336,7 +336,7 @@ QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(ObjectDescripti | |
ret.insert("icon", ad->icon); | |
} | |
} | |
- break; | |
+ break; /* | |
case Phonon::VideoCaptureDeviceType: { | |
VideoCaptureDevice* dev; | |
if ((dev = deviceManager()->videoCaptureDevice(index))) { | |
@@ -349,7 +349,7 @@ QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(ObjectDescripti | |
ret.insert("hasvideo", true); | |
} | |
} | |
- break; | |
+ break; */ | |
case Phonon::EffectType: { | |
QList<EffectInfo*> effectList = effectManager()->audioEffects(); | |
diff --git a/gstreamer/mediaobject.cpp b/gstreamer/mediaobject.cpp | |
index 3e27c59..4688456 100644 | |
--- a/gstreamer/mediaobject.cpp | |
+++ b/gstreamer/mediaobject.cpp | |
@@ -340,25 +340,25 @@ void MediaObject::cb_pad_added(GstElement *decodebin, | |
//gst_object_unref (decodepad); | |
} | |
-bool MediaObject::createV4lPipe(const DeviceAccess &access, const MediaSource &source) | |
-{ | |
- Q_UNUSED(source); | |
- QString v4lDevice = access.second; | |
- if (m_datasource) { | |
- gst_bin_remove(GST_BIN(m_pipeline), m_datasource); | |
- m_datasource = 0; | |
- } | |
- m_datasource = gst_element_factory_make("v4l2src", "v4l2src"); | |
- if (!m_datasource) { | |
- m_backend->logMessage("Couldn't create v4l2src element"); | |
- return false; | |
- } | |
- g_object_set(G_OBJECT(m_datasource), "device", v4lDevice.toUtf8().data(), (const char*)NULL); | |
- m_backend->logMessage("Created video device element"); | |
- gst_bin_add(GST_BIN(m_pipeline), m_datasource); | |
- gst_element_link(m_datasource, m_decodebin); | |
- return true; | |
-} | |
+//bool MediaObject::createV4lPipe(const DeviceAccess &access, const MediaSource &source) | |
+//{ | |
+// Q_UNUSED(source); | |
+// QString v4lDevice = access.second; | |
+// if (m_datasource) { | |
+// gst_bin_remove(GST_BIN(m_pipeline), m_datasource); | |
+// m_datasource = 0; | |
+// } | |
+// m_datasource = gst_element_factory_make("v4l2src", "v4l2src"); | |
+// if (!m_datasource) { | |
+// m_backend->logMessage("Couldn't create v4l2src element"); | |
+// return false; | |
+// } | |
+// g_object_set(G_OBJECT(m_datasource), "device", v4lDevice.toUtf8().data(), (const char*)NULL); | |
+// m_backend->logMessage("Created video device element"); | |
+// gst_bin_add(GST_BIN(m_pipeline), m_datasource); | |
+// gst_element_link(m_datasource, m_decodebin); | |
+// return true; | |
+//} | |
bool MediaObject::createPipefromDVD(const MediaSource &source) | |
{ | |
@@ -449,11 +449,11 @@ bool MediaObject::createPipefromDVD(const MediaSource &source) | |
bool MediaObject::createPipefromDevice(const MediaSource &source) | |
{ | |
- foreach(DeviceAccess access, source.deviceAccessList()) { | |
- if (access.first == "v4l2") { | |
- return createV4lPipe(access, source); | |
- } | |
- } | |
+// foreach(DeviceAccess access, source.deviceAccessList()) { | |
+// if (access.first == "v4l2") { | |
+// return createV4lPipe(access, source); | |
+// } | |
+// } | |
qWarning() << "Only v4l2 devices supported."; | |
return false; | |
} | |
diff --git a/gstreamer/mediaobject.h b/gstreamer/mediaobject.h | |
index ff79796..e08552a 100644 | |
--- a/gstreamer/mediaobject.h | |
+++ b/gstreamer/mediaobject.h | |
@@ -221,7 +221,7 @@ protected: | |
bool createPipefromStream(const MediaSource &); | |
bool createPipefromDevice(const MediaSource &); | |
bool createPipefromDVD(const MediaSource &); | |
- bool createV4lPipe(const DeviceAccess &access, const MediaSource &); | |
+ //bool createV4lPipe(const DeviceAccess &access, const MediaSource &); | |
GstElement *audioElement() | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment