banshee r3673 - in trunk/banshee: . libbanshee



Author: abock
Date: Fri Apr  4 05:09:42 2008
New Revision: 3673
URL: http://svn.gnome.org/viewvc/banshee?rev=3673&view=rev

Log:
2008-04-04  Aaron Bockover  <abock gnome org>

    * libbanshee/banshee-ripper.c: Renamed and new API akin to what I did
    for the player engine; started cleaning up the code, but not finished

    * libbanshee/gst-cd-rip.h:
    * libbanshee/gst-misc.h: Removed, not needed

    * libbanshee/gst-transcode-0.10.c: Fixed bloated ctor and removed dead code



Added:
   trunk/banshee/libbanshee/banshee-ripper.c
      - copied, changed from r3667, /trunk/banshee/libbanshee/gst-cd-rip-0.10.c
Removed:
   trunk/banshee/libbanshee/gst-cd-rip-0.10.c
   trunk/banshee/libbanshee/gst-cd-rip.h
   trunk/banshee/libbanshee/gst-misc.h
Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/libbanshee/Makefile.am
   trunk/banshee/libbanshee/gst-transcode-0.10.c
   trunk/banshee/libbanshee/libbanshee.mdp

Modified: trunk/banshee/libbanshee/Makefile.am
==============================================================================
--- trunk/banshee/libbanshee/Makefile.am	(original)
+++ trunk/banshee/libbanshee/Makefile.am	Fri Apr  4 05:09:42 2008
@@ -19,7 +19,7 @@
 	banshee-player-missing-elements.c \
 	banshee-player-pipeline.c \
 	banshee-player-video.c \
-	gst-cd-rip-0.10.c \
+	banshee-ripper.c \
 	gst-misc-0.10.c \
 	gst-transcode-0.10.c
 
@@ -29,8 +29,6 @@
 	banshee-player-pipeline.h \
 	banshee-player-private.h \
 	banshee-player-video.h \
-	gst-cd-rip.h \
-	gst-misc.h \
 	gst-transcode.h
 
 libbanshee_la_LIBADD = \

Copied: trunk/banshee/libbanshee/banshee-ripper.c (from r3667, /trunk/banshee/libbanshee/gst-cd-rip-0.10.c)
==============================================================================
--- /trunk/banshee/libbanshee/gst-cd-rip-0.10.c	(original)
+++ trunk/banshee/libbanshee/banshee-ripper.c	Fri Apr  4 05:09:42 2008
@@ -1,38 +1,35 @@
-/***************************************************************************
- *  gst-cd-rip-0.10.c
- *
- *  Copyright (C) 2005-2006 Novell, Inc.
- *  Written by Aaron Bockover <aaron abock org>
- ****************************************************************************/
-
-/*  THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW: 
- *
- *  Permission is hereby granted, free of charge, to any person obtaining a
- *  copy of this software and associated documentation files (the "Software"),  
- *  to deal in the Software without restriction, including without limitation  
- *  the rights to use, copy, modify, merge, publish, distribute, sublicense,  
- *  and/or sell copies of the Software, and to permit persons to whom the  
- *  Software is furnished to do so, subject to the following conditions:
- *
- *  The above copyright notice and this permission notice shall be included in 
- *  all copies or substantial portions of the Software.
- *
- *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
- *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
- *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
- *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
- *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
- *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
- *  DEALINGS IN THE SOFTWARE.
- */
+//
+// banshee-ripper.c
+//
+// Author:
+//   Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2005-2008 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #endif
 
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
 #include <string.h>
 
 #include <glib.h>
@@ -42,15 +39,13 @@
 #include <gst/gst.h>
 #include <gst/tag/tag.h>
 
-#include "gst-misc.h"
+typedef struct BansheeRipper BansheeRipper;
 
-typedef struct GstCdRipper GstCdRipper;
+typedef void (* BansheeRipperFinishedCallback) (BansheeRipper *ripper);
+typedef void (* BansheeRipperProgressCallback) (BansheeRipper *ripper, gint msec, gpointer user_info);
+typedef void (* BansheeRipperErrorCallback)    (BansheeRipper *ripper, const gchar *error, const gchar *debug);
 
-typedef void (* GstCdRipperProgressCallback) (GstCdRipper *ripper, gint seconds, gpointer user_info);
-typedef void (* GstCdRipperFinishedCallback) (GstCdRipper *ripper);
-typedef void (* GstCdRipperErrorCallback) (GstCdRipper *ripper, const gchar *error, const gchar *debug);
-
-struct GstCdRipper {
+struct BansheeRipper {
     gboolean is_ripping;
     guint iterate_timeout_id;
     
@@ -66,140 +61,135 @@
     
     GstFormat track_format;
     
-    GstCdRipperProgressCallback progress_cb;
-    GstCdRipperFinishedCallback finished_cb;
-    GstCdRipperErrorCallback error_cb;
+    BansheeRipperProgressCallback progress_cb;
+    BansheeRipperFinishedCallback finished_cb;
+    BansheeRipperErrorCallback error_cb;
 };
 
-// private methods
+// ---------------------------------------------------------------------------
+// Private Functions
+// ---------------------------------------------------------------------------
 
 static void
-gst_cd_ripper_raise_error(GstCdRipper *ripper, const gchar *error, const gchar *debug)
+br_raise_error (BansheeRipper *ripper, const gchar *error, const gchar *debug)
 {
-    g_return_if_fail(ripper != NULL);
-    g_return_if_fail(ripper->error_cb != NULL);
+    g_return_if_fail (ripper != NULL);
+    g_return_if_fail (ripper->error_cb != NULL);
     
-    if(ripper->error_cb != NULL) {
-        ripper->error_cb(ripper, error, debug);
+    if (ripper->error_cb != NULL) {
+        ripper->error_cb (ripper, error, debug);
     }
 }
 
 static gboolean
-gst_cd_ripper_gvfs_allow_overwrite_cb(GstElement *element, gpointer filename,
-    gpointer user_data)
+br_gvfs_allow_overwrite_cb (GstElement *element, gpointer filename, gpointer user_data)
 {
     return TRUE;
 }
 
-static void
-gst_cd_ripper_have_trm_id_cb(GstElement *element, const gchar *trm_id, gpointer user_data)
-{
-    g_printf("MusicBrainz TRM ID: %s\n", trm_id);
-}
-
 static gboolean
-gst_cd_ripper_iterate_timeout(GstCdRipper *ripper)
+br_iterate_timeout (BansheeRipper *ripper)
 {
     GstFormat format = GST_FORMAT_TIME;
     GstState state;
     gint64 position;
     
-    g_return_val_if_fail(ripper != NULL, FALSE);
+    g_return_val_if_fail (ripper != NULL, FALSE);
 
-    gst_element_get_state(ripper->pipeline, &state, NULL, 0);
-    if(state != GST_STATE_PLAYING) {
+    gst_element_get_state (ripper->pipeline, &state, NULL, 0);
+    if (state != GST_STATE_PLAYING) {
         return TRUE;
     }
 
-    if(!gst_element_query_position(ripper->cddasrc, &format, &position)) {
+    if (!gst_element_query_position (ripper->cddasrc, &format, &position)) {
         return TRUE;
     }
     
-    if(ripper->progress_cb != NULL) {
-        ripper->progress_cb(ripper, position / GST_SECOND, NULL);
+    if (ripper->progress_cb != NULL) {
+        ripper->progress_cb (ripper, position / GST_MSECOND, NULL);
     }
 
     return TRUE;
 }
 
 static void
-gst_cd_ripper_start_iterate_timeout(GstCdRipper *ripper)
+br_start_iterate_timeout (BansheeRipper *ripper)
 {
-    g_return_if_fail(ripper != NULL);
+    g_return_if_fail (ripper != NULL);
 
-    if(ripper->iterate_timeout_id != 0) {
+    if (ripper->iterate_timeout_id != 0) {
         return;
     }
     
-    ripper->iterate_timeout_id = g_timeout_add(200, 
-        (GSourceFunc)gst_cd_ripper_iterate_timeout, ripper);
+    ripper->iterate_timeout_id = g_timeout_add (200, (GSourceFunc)br_iterate_timeout, ripper);
 }
 
 static void
-gst_cd_ripper_stop_iterate_timeout(GstCdRipper *ripper)
+br_stop_iterate_timeout (BansheeRipper *ripper)
 {
-    g_return_if_fail(ripper != NULL);
+    g_return_if_fail (ripper != NULL);
     
-    if(ripper->iterate_timeout_id == 0) {
+    if (ripper->iterate_timeout_id == 0) {
         return;
     }
     
-    g_source_remove(ripper->iterate_timeout_id);
+    g_source_remove (ripper->iterate_timeout_id);
     ripper->iterate_timeout_id = 0;
 }
 
 static gboolean
-gst_cd_ripper_bus_callback(GstBus *bus, GstMessage *message, gpointer data)
+br_pipeline_bus_callback (GstBus *bus, GstMessage *message, gpointer data)
 {
-    GstCdRipper *ripper = (GstCdRipper *)data;
+    BansheeRipper *ripper = (BansheeRipper *)data;
 
-    g_return_val_if_fail(ripper != NULL, FALSE);
+    g_return_val_if_fail (ripper != NULL, FALSE);
 
-    switch(GST_MESSAGE_TYPE(message)) {
+    switch (GST_MESSAGE_TYPE (message)) {
         case GST_MESSAGE_ERROR: {
             GError *error;
             gchar *debug;
             
-            if(ripper->error_cb != NULL) {
-                gst_message_parse_error(message, &error, &debug);
-                gst_cd_ripper_raise_error(ripper, error->message, debug);
-                g_error_free(error);
-                g_free(debug);
+            if (ripper->error_cb != NULL) {
+                gst_message_parse_error (message, &error, &debug);
+                br_raise_error (ripper, error->message, debug);
+                g_error_free (error);
+                g_free (debug);
             }
             
             ripper->is_ripping = FALSE;
-            gst_cd_ripper_stop_iterate_timeout(ripper);
-            
+            br_stop_iterate_timeout (ripper);
             break;
-        }        
-        case GST_MESSAGE_EOS:
-            gst_element_set_state(GST_ELEMENT(ripper->pipeline), GST_STATE_NULL);
-            g_object_unref(G_OBJECT(ripper->pipeline));
+        }
+            
+        case GST_MESSAGE_EOS: {
+            gst_element_set_state (GST_ELEMENT (ripper->pipeline), GST_STATE_NULL);
+            g_object_unref (G_OBJECT (ripper->pipeline));
             
             ripper->is_ripping = FALSE;
-            gst_cd_ripper_stop_iterate_timeout(ripper);
+            br_stop_iterate_timeout (ripper);
             
-            if(ripper->finished_cb != NULL) {
-                ripper->finished_cb(ripper);
+            if (ripper->finished_cb != NULL) {
+                ripper->finished_cb (ripper);
             }
             break;
-        default:
-            break;
+        }
+        
+        default: break;
     }
     
     return TRUE;
 }
 
 static GstElement *
-gst_cd_ripper_build_encoder(const gchar *pipeline, GError **error_out)
+br_pipeline_build_encoder (const gchar *pipeline, GError **error_out)
 {
     GstElement *encoder;
     GError *error = NULL;
    
-    encoder = gst_parse_bin_from_description(pipeline, TRUE, &error);
+    encoder = gst_parse_bin_from_description (pipeline, TRUE, &error);
     
-    if(error != NULL) {
-        if(error_out != NULL) {
+    if (error != NULL) {
+        if (error_out != NULL) {
             *error_out = error;
         }
         return NULL;
@@ -209,115 +199,94 @@
 }
 
 static gboolean
-gst_cd_ripper_build_pipeline(GstCdRipper *ripper)
+br_pipeline_construct (BansheeRipper *ripper)
 {
     GstElement *queue;
-    GstElement *mbtrm;
     GError *error = NULL;
     
-    g_return_val_if_fail(ripper != NULL, FALSE);
+    g_return_val_if_fail (ripper != NULL, FALSE);
         
-    ripper->pipeline = gst_pipeline_new("pipeline");
-    if(ripper->pipeline == NULL) {
-        gst_cd_ripper_raise_error(ripper, _("Could not create pipeline"), NULL);
+    ripper->pipeline = gst_pipeline_new ("pipeline");
+    if (ripper->pipeline == NULL) {
+        br_raise_error (ripper, _("Could not create pipeline"), NULL);
         return FALSE;
     }
 
-    ripper->cddasrc = gst_element_make_from_uri(GST_URI_SRC, "cdda://1", "cddasrc");
-    if(ripper->cddasrc == NULL) {
-        gst_cd_ripper_raise_error(ripper, _("Could not initialize element from cdda URI"), NULL);
+    ripper->cddasrc = gst_element_make_from_uri (GST_URI_SRC, "cdda://1", "cddasrc");
+    if (ripper->cddasrc == NULL) {
+        br_raise_error (ripper, _("Could not initialize element from cdda URI"), NULL);
         return FALSE;
     }
   
-    g_object_set(G_OBJECT(ripper->cddasrc), "device", ripper->device, NULL);
+    g_object_set (G_OBJECT (ripper->cddasrc), "device", ripper->device, NULL);
     
-    if(g_object_class_find_property(G_OBJECT_GET_CLASS(ripper->cddasrc), "paranoia-mode")) {
-        g_object_set(G_OBJECT(ripper->cddasrc), "paranoia-mode", ripper->paranoia_mode, NULL);
-    }
-    
-    ripper->track_format = gst_format_get_by_nick("track");
-    
-    mbtrm = gst_element_factory_make("mbtrm", "mbtrm");
-    if(mbtrm == NULL) {
-        gst_cd_ripper_raise_error(ripper, _("Could not create mbtrm plugin"), NULL);
-        return FALSE;
+    if (g_object_class_find_property (G_OBJECT_GET_CLASS (ripper->cddasrc), "paranoia-mode")) {
+        g_object_set (G_OBJECT (ripper->cddasrc), "paranoia-mode", ripper->paranoia_mode, NULL);
     }
     
-    //g_object_set(G_OBJECT(mbtrm), "proxy-address", "http://google.com";, NULL);
-    //g_object_set(G_OBJECT(mbtrm), "proxy-port", 8080, NULL);
+    ripper->track_format = gst_format_get_by_nick ("track");
     
-    g_signal_connect(G_OBJECT(mbtrm), "have-trm-id",
-        G_CALLBACK(gst_cd_ripper_have_trm_id_cb), ripper);
-    
-    ripper->encoder = gst_cd_ripper_build_encoder(ripper->encoder_pipeline, &error);
-    if(ripper->encoder == NULL) {
-        gst_cd_ripper_raise_error(ripper, _("Could not create encoder pipeline"), error->message);
+    ripper->encoder = br_pipeline_build_encoder (ripper->encoder_pipeline, &error);
+    if (ripper->encoder == NULL) {
+        br_raise_error (ripper, _("Could not create encoder pipeline"), error->message);
         return FALSE;
     }
     
-    queue = gst_element_factory_make("queue", "queue");
-    if(queue == NULL) {
-        gst_cd_ripper_raise_error(ripper, _("Could not create queue plugin"), NULL);
+    queue = gst_element_factory_make ("queue", "queue");
+    if (queue == NULL) {
+        br_raise_error (ripper, _("Could not create queue plugin"), NULL);
         return FALSE;
     }
     
-    g_object_set(G_OBJECT(queue), "max-size-time", 120 * GST_SECOND, NULL);
+    g_object_set (G_OBJECT (queue), "max-size-time", 120 * GST_SECOND, NULL);
     
-    ripper->filesink = gst_element_factory_make("gnomevfssink", "gnomevfssink");
-    if(ripper->filesink == NULL) {
-        gst_cd_ripper_raise_error(ripper, _("Could not create GNOME VFS output plugin"), NULL);
+    ripper->filesink = gst_element_factory_make ("gnomevfssink", "gnomevfssink");
+    if (ripper->filesink == NULL) {
+        br_raise_error (ripper, _("Could not create GNOME VFS output plugin"), NULL);
         return FALSE;
     }
     
-    g_signal_connect(G_OBJECT(ripper->filesink), "allow-overwrite",
-        G_CALLBACK(gst_cd_ripper_gvfs_allow_overwrite_cb), ripper);
+    g_signal_connect (G_OBJECT (ripper->filesink), "allow-overwrite", G_CALLBACK (br_gvfs_allow_overwrite_cb), ripper);
     
-    gst_bin_add_many(GST_BIN(ripper->pipeline),
+    gst_bin_add_many (GST_BIN (ripper->pipeline),
         ripper->cddasrc,
-        mbtrm,
         queue,
         ripper->encoder,
         ripper->filesink,
         NULL);
         
-    if(!gst_element_link(ripper->cddasrc, mbtrm)) {
-        gst_cd_ripper_raise_error(ripper, _("Could not link cddasrcsrc to mbtrm"), NULL);
-        return FALSE;
-    }
-        
-    if(!gst_element_link(mbtrm, queue)) {
-        gst_cd_ripper_raise_error(ripper, _("Could not link mbtrm to queue"), NULL);
+    if (!gst_element_link (ripper->cddasrc, queue)) {
+        br_raise_error (ripper, _("Could not link cddasrc to queue"), NULL);
         return FALSE;
     }
-        
-    if(!gst_element_link(queue, ripper->encoder)) {
-        gst_cd_ripper_raise_error(ripper, _("Could not link queue to encoder"), NULL);
+    
+    if (!gst_element_link(queue, ripper->encoder)) {
+        br_raise_error (ripper, _("Could not link queue to encoder"), NULL);
         return FALSE;
     }
         
-    if(!gst_element_link(ripper->encoder, ripper->filesink)) {
-        gst_cd_ripper_raise_error(ripper, _("Could not link encoder to gnomevfssink"), NULL);
+    if (!gst_element_link (ripper->encoder, ripper->filesink)) {
+        br_raise_error (ripper, _("Could not link encoder to gnomevfssink"), NULL);
         return FALSE;
     }
     
-    gst_bus_add_watch(gst_pipeline_get_bus(GST_PIPELINE(ripper->pipeline)), 
-        gst_cd_ripper_bus_callback, ripper);
+    gst_bus_add_watch (gst_pipeline_get_bus (GST_PIPELINE (ripper->pipeline)), br_pipeline_bus_callback, ripper);
 
     return TRUE;
 }
 
-// public methods
+// ---------------------------------------------------------------------------
+// Internal Functions
+// ---------------------------------------------------------------------------
 
-GstCdRipper *
-gst_cd_ripper_new(gchar *device, gint paranoia_mode, gchar *encoder_pipeline)
+BansheeRipper *
+br_new(gchar *device, gint paranoia_mode, gchar *encoder_pipeline)
 {
-    GstCdRipper *ripper = g_new0(GstCdRipper, 1);
+    BansheeRipper *ripper = g_new0(BansheeRipper, 1);
     
     if(ripper == NULL) {
         return NULL;
     }
-    
-    gstreamer_initialize();
         
     ripper->device = g_strdup(device);
     ripper->paranoia_mode = paranoia_mode;
@@ -338,11 +307,11 @@
 }
 
 void 
-gst_cd_ripper_cancel(GstCdRipper *ripper)
+br_cancel(BansheeRipper *ripper)
 {
     g_return_if_fail(ripper != NULL);
     
-    gst_cd_ripper_stop_iterate_timeout(ripper);
+    br_stop_iterate_timeout(ripper);
     
     if(ripper->pipeline != NULL && GST_IS_ELEMENT(ripper->pipeline)) {
         gst_element_set_state(GST_ELEMENT(ripper->pipeline), GST_STATE_NULL);
@@ -354,11 +323,11 @@
 }
 
 void
-gst_cd_ripper_free(GstCdRipper *ripper)
+br_free(BansheeRipper *ripper)
 {
     g_return_if_fail(ripper != NULL);
     
-    gst_cd_ripper_cancel(ripper);
+    br_cancel(ripper);
     
     if(ripper->device != NULL) {
         g_free(ripper->device);
@@ -372,7 +341,7 @@
 }
 
 gboolean
-gst_cd_ripper_rip_track(GstCdRipper *ripper, gchar *uri, gint track_number, 
+br_rip_track(BansheeRipper *ripper, gchar *uri, gint track_number, 
     gchar *md_artist, gchar *md_album, gchar *md_title, gchar *md_genre,
     gint md_track_number, gint md_track_count, gpointer user_info)
 {
@@ -383,7 +352,7 @@
 
     g_return_val_if_fail(ripper != NULL, FALSE);
 
-    if(!gst_cd_ripper_build_pipeline(ripper)) {
+    if(!br_pipeline_construct(ripper)) {
         return FALSE;
     }
     
@@ -436,37 +405,37 @@
     g_object_set(G_OBJECT(ripper->cddasrc), "track", track_number, NULL);
     
     gst_element_set_state(ripper->pipeline, GST_STATE_PLAYING);
-    gst_cd_ripper_start_iterate_timeout(ripper);
+    br_start_iterate_timeout(ripper);
     
     return TRUE;
 }
 
 void
-gst_cd_ripper_set_progress_callback(GstCdRipper *ripper, 
-    GstCdRipperProgressCallback cb)
+br_set_progress_callback(BansheeRipper *ripper, 
+    BansheeRipperProgressCallback cb)
 {
     g_return_if_fail(ripper != NULL);
     ripper->progress_cb = cb;
 }
 
 void
-gst_cd_ripper_set_finished_callback(GstCdRipper *ripper, 
-    GstCdRipperFinishedCallback cb)
+br_set_finished_callback(BansheeRipper *ripper, 
+    BansheeRipperFinishedCallback cb)
 {
     g_return_if_fail(ripper != NULL);
     ripper->finished_cb = cb;
 }
 
 void
-gst_cd_ripper_set_error_callback(GstCdRipper *ripper, 
-    GstCdRipperErrorCallback cb)
+br_set_error_callback(BansheeRipper *ripper, 
+    BansheeRipperErrorCallback cb)
 {
     g_return_if_fail(ripper != NULL);
     ripper->error_cb = cb;
 }
 
 gboolean
-gst_cd_ripper_get_is_ripping(GstCdRipper *ripper)
+br_get_is_ripping(BansheeRipper *ripper)
 {
     g_return_val_if_fail(ripper != NULL, FALSE);
     return ripper->is_ripping;

Modified: trunk/banshee/libbanshee/gst-transcode-0.10.c
==============================================================================
--- trunk/banshee/libbanshee/gst-transcode-0.10.c	(original)
+++ trunk/banshee/libbanshee/gst-transcode-0.10.c	Fri Apr  4 05:09:42 2008
@@ -36,8 +36,6 @@
 
 #include <libgnomevfs/gnome-vfs.h>
 
-#include "gst-misc.h"
-
 typedef struct GstTranscoder GstTranscoder;
 
 typedef void (* GstTranscoderProgressCallback) (GstTranscoder *transcoder, gdouble progress);
@@ -317,24 +315,9 @@
 // public methods
 
 GstTranscoder *
-gst_transcoder_new()
+gst_transcoder_new ()
 {
-    GstTranscoder *transcoder;
-    
-    gstreamer_initialize();
-    
-    transcoder = g_new0(GstTranscoder, 1);
-    transcoder->is_transcoding = FALSE;
-    transcoder->pipeline = NULL;
-    transcoder->sink_bin = NULL;
-    transcoder->conv_elem = NULL;
-    transcoder->output_uri = NULL;
-    transcoder->progress_cb = NULL;
-    transcoder->error_cb = NULL;
-    transcoder->finished_cb = NULL;
-    transcoder->iterate_timeout_id = 0;
-    
-    return transcoder;
+    return g_new0 (GstTranscoder, 1);
 }
 
 void

Modified: trunk/banshee/libbanshee/libbanshee.mdp
==============================================================================
--- trunk/banshee/libbanshee/libbanshee.mdp	(original)
+++ trunk/banshee/libbanshee/libbanshee.mdp	Fri Apr  4 05:09:42 2008
@@ -8,14 +8,12 @@
     </Configuration>
   </Configurations>
   <Contents>
-    <File name="gst-cd-rip-0.10.c" subtype="Code" buildaction="Compile" />
+    <File name="banshee-ripper.c" subtype="Code" buildaction="Compile" />
     <File name="gst-misc-0.10.c" subtype="Code" buildaction="Compile" />
     <File name="banshee-player.c" subtype="Code" buildaction="Compile" />
     <File name="gst-transcode-0.10.c" subtype="Code" buildaction="Compile" />
     <File name="banshee-player-private.h" subtype="Code" buildaction="Nothing" />
     <File name="banshee-player-cdda.h" subtype="Code" buildaction="Nothing" />
-    <File name="gst-cd-rip.h" subtype="Code" buildaction="Nothing" />
-    <File name="gst-misc.h" subtype="Code" buildaction="Nothing" />
     <File name="gst-transcode.h" subtype="Code" buildaction="Nothing" />
     <File name="banshee-player-cdda.c" subtype="Code" buildaction="Compile" />
     <File name="banshee-player-missing-elements.c" subtype="Code" buildaction="Compile" />



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]