[gnac/devel: 3/5] Prepare and move some code do disconnect output from meia-item and gst
- From: David Joaquim <djoaquim src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnac/devel: 3/5] Prepare and move some code do disconnect output from meia-item and gst
- Date: Sun, 9 May 2010 14:10:24 +0000 (UTC)
commit cb037b4c0157a32cc3acb82a5a14a570b2622f16
Author: David Joaquim <djoaquim src gnome org>
Date: Sun May 9 10:51:09 2010 +0200
Prepare and move some code do disconnect output from meia-item and gst
libgnac/libgnac-gst.c | 8 --------
libgnac/libgnac-gst.h | 1 -
libgnac/libgnac-media-item.c | 10 ++++++++++
libgnac/libgnac-output.c | 14 ++++++++++++++
libgnac/libgnac-output.h | 10 ++++++++++
5 files changed, 34 insertions(+), 9 deletions(-)
---
diff --git a/libgnac/libgnac-gst.c b/libgnac/libgnac-gst.c
index 54b73e0..f97513c 100644
--- a/libgnac/libgnac-gst.c
+++ b/libgnac/libgnac-gst.c
@@ -178,14 +178,6 @@ libgnac_gst_build_pipeline(LibgnacMediaItem *item,
return;
}
- /* output */
- // TODO remove this from here
- libgnac_output_build_output(item, &encoder_error);
- if (encoder_error) {
- libgnac_warning("Output creation failed");
- g_propagate_error(error, encoder_error);
- return;
- }
/* bus */
item->bus = gst_element_get_bus(GST_ELEMENT(item->pipeline));
diff --git a/libgnac/libgnac-gst.h b/libgnac/libgnac-gst.h
index 218c808..5855455 100644
--- a/libgnac/libgnac-gst.h
+++ b/libgnac/libgnac-gst.h
@@ -35,7 +35,6 @@
#include "libgnac-profile.h"
#include "libgnac-media-item.h"
#include "libgnac-converter.h"
-#include "libgnac-output.h"
G_BEGIN_DECLS
diff --git a/libgnac/libgnac-media-item.c b/libgnac/libgnac-media-item.c
index 3fdf6bb..6ba3099 100644
--- a/libgnac/libgnac-media-item.c
+++ b/libgnac/libgnac-media-item.c
@@ -34,6 +34,7 @@
#include "libgnac-gst-utils.h"
#include "libgnac-gst.h"
#include "libgnac-metadata.h"
+#include "libgnac-output.h"
extern LibgnacMetadata *metadata;
@@ -71,6 +72,15 @@ libgnac_item_build(LibgnacMediaItem *item,
g_return_if_fail(error == NULL || *error == NULL);
+ /* output */
+ libgnac_output_build_output(item, &err);
+ if (err) {
+ libgnac_warning("Output creation failed");
+ g_propagate_error(error, err);
+ return;
+ }
+
+
/* is it a video file? */
// TODO why not passing error ?
tags = libgnac_metadata_extract(metadata, item->source, NULL);
diff --git a/libgnac/libgnac-output.c b/libgnac/libgnac-output.c
index ee47a1f..95179d2 100644
--- a/libgnac/libgnac-output.c
+++ b/libgnac/libgnac-output.c
@@ -345,6 +345,14 @@ libgnac_output_get_filename(LibgnacMediaItem *item,
const gchar *rename_pattern,
GError **error)
{
+ /*
+static gchar *
+libgnac_output_get_filename(GFile *input_file,
+ LibgnacOutputConfig *config,
+ GError **error)
+{
+*/
+
GError *err = NULL;
GFile *file = NULL;
LibgnacTags *tags = NULL;
@@ -389,6 +397,12 @@ void
libgnac_output_build_output(LibgnacMediaItem *item,
GError **error)
{
+ /*
+void
+libgnac_output_build_output(GFile *file,
+ LibgnacOutputConfig *config,
+ GError **error)
+{*/
GError *output_error = NULL;
GFile *out_directory;
GFile *parent;
diff --git a/libgnac/libgnac-output.h b/libgnac/libgnac-output.h
index 2aad2cf..57cbbf0 100644
--- a/libgnac/libgnac-output.h
+++ b/libgnac/libgnac-output.h
@@ -69,6 +69,16 @@ G_BEGIN_DECLS
(((LibgnacRenamePattern*)(o))->regex)
typedef struct {
+ gchar *extension;
+ gboolean strip_special;
+ gchar *folder_hierarchy;
+ gchar *folder_path;
+ gchar *rename_pattern;
+ gchar *folder_type;
+
+} LibgnacOutputConfig;
+
+typedef struct {
const GRegex *regex;
gchar *replace;
gchar id; /* single letter representing the pattern */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]