ekiga r7570 - trunk/lib/engine/components/gstreamer
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7570 - trunk/lib/engine/components/gstreamer
- Date: Sat, 17 Jan 2009 20:28:11 +0000 (UTC)
Author: jpuydt
Date: Sat Jan 17 20:28:11 2009
New Revision: 7570
URL: http://svn.gnome.org/viewvc/ekiga?rev=7570&view=rev
Log:
Added debug printings, fixed the pipeline strings (and made appsrc live), and added SDL output support... it doesn't work yet
Modified:
trunk/lib/engine/components/gstreamer/gst-audiooutput.cpp
trunk/lib/engine/components/gstreamer/gst-audiooutput.h
Modified: trunk/lib/engine/components/gstreamer/gst-audiooutput.cpp
==============================================================================
--- trunk/lib/engine/components/gstreamer/gst-audiooutput.cpp (original)
+++ trunk/lib/engine/components/gstreamer/gst-audiooutput.cpp Sat Jan 17 20:28:11 2009
@@ -100,15 +100,7 @@
gchar* command = NULL;
GError* error = NULL;
GstState current;
-
- command = g_strdup_printf ("appsrc"
- " caps=audio/x-raw-int"
- ",rate=%d"
- ",channels=%d"
- ",width=%d"
- " name=ekiga_src"
- " ! %s",
- samplerate, channels, bits_per_sample,
+ command = g_strdup_printf ("appsrc is-live=true name=ekiga_src ! %s",
devices_by_name[std::pair<std::string,std::string>(current_state[ii].device.source, current_state[ii].device.name)].c_str ());
g_print ("Pipeline: %s\n", command);
pipeline[ii] = gst_parse_launch (command, &error);
@@ -123,7 +115,8 @@
NULL,
GST_SECOND);
- if (current != GST_STATE_PLAYING) {
+ if ( !(current == GST_STATE_PLAYING
+ || current == GST_STATE_PAUSED)) {
gst_element_set_state (pipeline[ii], GST_STATE_NULL);
gst_object_unref (GST_OBJECT (pipeline[ii]));
@@ -164,6 +157,15 @@
g_free (command);
current_state[ii].opened = result;
+
+ std::cout << __PRETTY_FUNCTION__
+ << " result=";
+ if (result)
+ std::cout << "TRUE";
+ else
+ std::cout << "FALSE";
+ std::cout << std::endl;
+
return result;
}
@@ -227,7 +229,6 @@
gst_app_src_push_buffer (GST_APP_SRC (src), buffer);
written = size;
result = true;
- gst_buffer_unref (buffer);
g_object_unref (src);
}
@@ -269,6 +270,8 @@
detect_fakesink_devices ();
detect_alsasink_devices ();
detect_pulsesink_devices ();
+ detect_sdlsink_devices ();
+devices_by_name[std::pair<std::string,std::string>("FILE","/tmp/sound.wav")] = "volume name=ekiga_volume ! filesink location=/tmp/sound.wav";
}
void
@@ -314,7 +317,7 @@
device = g_value_array_get_nth (array, index);
g_object_set_property (G_OBJECT (elt), "device", device);
g_object_get (G_OBJECT (elt), "device-name", &name, NULL);
- descr = g_strdup_printf (" volume name=ekiga_volume ! alsasink device=%s",
+ descr = g_strdup_printf ("volume name=ekiga_volume ! alsasink device=%s",
g_value_get_string (device));
devices_by_name[std::pair<std::string,std::string>("ALSA", name)] = descr;
@@ -360,7 +363,7 @@
device = g_value_array_get_nth (array, index);
g_object_set_property (G_OBJECT (elt), "device", device);
g_object_get (G_OBJECT (elt), "device-name", &name, NULL);
- descr = g_strdup_printf (" volume name=ekiga_volume ! pulsesink device=%s",
+ descr = g_strdup_printf ("volume name=ekiga_volume ! pulsesink device=%s",
g_value_get_string (device));
devices_by_name[std::pair<std::string,std::string>("PULSEAUDIO", name)] = descr;
@@ -374,3 +377,12 @@
gst_object_unref (GST_OBJECT (elt));
}
}
+
+void
+GST::AudioOutputManager::detect_sdlsink_devices ()
+{
+ gchar* descr = NULL;
+ descr = g_strdup_printf ("volume name=ekiga_volume ! sdlaudiosink");
+ devices_by_name[std::pair<std::string,std::string>("SDL", "Default")] = descr;
+ g_free (descr);
+}
Modified: trunk/lib/engine/components/gstreamer/gst-audiooutput.h
==============================================================================
--- trunk/lib/engine/components/gstreamer/gst-audiooutput.h (original)
+++ trunk/lib/engine/components/gstreamer/gst-audiooutput.h Sat Jan 17 20:28:11 2009
@@ -86,6 +86,7 @@
void detect_fakesink_devices ();
void detect_alsasink_devices ();
void detect_pulsesink_devices ();
+ void detect_sdlsink_devices ();
/* we take a user-readable name, and get the string describing
* the actual device */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]