diff options
author | MichaĆ Sawicz <michal@sawicz.net> | 2010-05-14 17:59:06 +0200 |
---|---|---|
committer | Gabriel Burt <gabriel.burt@gmail.com> | 2010-05-14 12:17:12 -0700 |
commit | 25fc28801570cd34b4f23eae26fddf6f6c6d8e5b (patch) | |
tree | efeccb33e9bd7d790b43e6a0dc29f37e14c19568 /libbanshee | |
parent | 146b91e1187bce94afd3900fa27ac7eb52489dae (diff) |
[libbanshee] Don't use filersc element explicitly
Now that Banshee is gio/gvfs-aware, it might not only hold file paths
but also URIs. The transcoder was explicitly using the filesrc element,
which can't handle URIs. This patch makes it use the
gst_element_make_from_uri() on the URI retrieved by SafeUri.AbsoluteUri
instead of SafeUri.LocalPath. (bgo#618585)
Signed-off-by: Gabriel Burt <gabriel.burt@gmail.com>
Diffstat (limited to 'libbanshee')
-rw-r--r-- | libbanshee/banshee-transcoder.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libbanshee/banshee-transcoder.c b/libbanshee/banshee-transcoder.c index f40ab9b78..824a7237b 100644 --- a/libbanshee/banshee-transcoder.c +++ b/libbanshee/banshee-transcoder.c @@ -219,7 +219,7 @@ gst_transcoder_new_decoded_pad(GstElement *decodebin, GstPad *pad, static gboolean gst_transcoder_create_pipeline(GstTranscoder *transcoder, - const char *input_file, const char *output_file, + const char *input_uri, const char *output_uri, const gchar *encoder_pipeline) { GstElement *source_elem; @@ -235,9 +235,9 @@ gst_transcoder_create_pipeline(GstTranscoder *transcoder, transcoder->pipeline = gst_pipeline_new("pipeline"); - source_elem = gst_element_factory_make("filesrc", "source"); + source_elem = gst_element_make_from_uri(GST_URI_SRC, input_uri, "source"); if(source_elem == NULL) { - gst_transcoder_raise_error(transcoder, _("Could not create 'filesrc' plugin"), NULL); + gst_transcoder_raise_error(transcoder, _("Could not create source element"), NULL); return FALSE; } @@ -247,9 +247,9 @@ gst_transcoder_create_pipeline(GstTranscoder *transcoder, return FALSE; } - sink_elem = gst_element_factory_make("filesink", "sink"); + sink_elem = gst_element_make_from_uri(GST_URI_SINK, output_uri, "sink"); if(sink_elem == NULL) { - gst_transcoder_raise_error(transcoder, _("Could not create 'filesink' plugin"), NULL); + gst_transcoder_raise_error(transcoder, _("Could not create sink element"), NULL); return FALSE; } @@ -288,9 +288,6 @@ gst_transcoder_create_pipeline(GstTranscoder *transcoder, gst_element_link(source_elem, decoder_elem); - g_object_set(source_elem, "location", input_file, NULL); - g_object_set(sink_elem, "location", output_file, NULL); - g_signal_connect(decoder_elem, "new-decoded-pad", G_CALLBACK(gst_transcoder_new_decoded_pad), transcoder); |