You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(28) |
Sep
(20) |
Oct
(20) |
Nov
(6) |
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(17) |
Feb
(28) |
Mar
(13) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <me...@us...> - 2008-06-16 19:28:10
|
Revision: 956
http://gmyth.svn.sourceforge.net/gmyth/?rev=956&view=rev
Author: melunko
Date: 2008-06-16 12:28:13 -0700 (Mon, 16 Jun 2008)
Log Message:
-----------
ttt
Added Paths:
-----------
branches/gmyth-0.1b/tests/ttt
Added: branches/gmyth-0.1b/tests/ttt
===================================================================
--- branches/gmyth-0.1b/tests/ttt (rev 0)
+++ branches/gmyth-0.1b/tests/ttt 2008-06-16 19:28:13 UTC (rev 956)
@@ -0,0 +1 @@
+ttt
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-03-14 13:14:51
|
Revision: 955
http://gmyth.svn.sourceforge.net/gmyth/?rev=955&view=rev
Author: melunko
Date: 2008-03-14 06:14:54 -0700 (Fri, 14 Mar 2008)
Log Message:
-----------
updated changelog to 0.8.2
Modified Paths:
--------------
trunk/packages/gmyth-debian/changelog
Modified: trunk/packages/gmyth-debian/changelog
===================================================================
--- trunk/packages/gmyth-debian/changelog 2008-03-14 13:14:36 UTC (rev 954)
+++ trunk/packages/gmyth-debian/changelog 2008-03-14 13:14:54 UTC (rev 955)
@@ -1,3 +1,9 @@
+gmyth (0.8.2-indt1) gutsy; urgency=low
+
+ * Added several methods to handle with schedule exceptions
+
+ -- Hallyson Melo <hal...@in...> Fri, 14 Mar 2008 10:13:30 -0300
+
gmyth (0.8.1-indt1) gutsy; urgency=low
* Added gmyth_scheduler_is_connected ()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-03-14 13:14:31
|
Revision: 954
http://gmyth.svn.sourceforge.net/gmyth/?rev=954&view=rev
Author: melunko
Date: 2008-03-14 06:14:36 -0700 (Fri, 14 Mar 2008)
Log Message:
-----------
updated configure.ac to 0.8.2
Modified Paths:
--------------
trunk/gmyth/configure.ac
Modified: trunk/gmyth/configure.ac
===================================================================
--- trunk/gmyth/configure.ac 2008-03-14 13:13:18 UTC (rev 953)
+++ trunk/gmyth/configure.ac 2008-03-14 13:14:36 UTC (rev 954)
@@ -1,4 +1,4 @@
-AC_INIT(gmyth, 0.8.1)
+AC_INIT(gmyth, 0.8.2)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.ac)
AC_CANONICAL_BUILD
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-03-14 13:13:20
|
Revision: 953
http://gmyth.svn.sourceforge.net/gmyth/?rev=953&view=rev
Author: melunko
Date: 2008-03-14 06:13:18 -0700 (Fri, 14 Mar 2008)
Log Message:
-----------
Added several functions to handle with schedule exceptions
Modified Paths:
--------------
trunk/gmyth/gmyth/gmyth_remote_util.c
trunk/gmyth/gmyth/gmyth_scheduler.c
trunk/gmyth/gmyth/gmyth_scheduler.h
Modified: trunk/gmyth/gmyth/gmyth_remote_util.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_remote_util.c 2008-03-14 12:45:05 UTC (rev 952)
+++ trunk/gmyth/gmyth/gmyth_remote_util.c 2008-03-14 13:13:18 UTC (rev 953)
@@ -158,7 +158,6 @@
gint recorder_num = (gint) g_ascii_strtoull (row[0], NULL, 10);
GString *hostname = g_string_new (binfo->hostname);
- g_debug ("XXXXXXXXXXXX Recorded found: %d", recorder_num);
recorder = gmyth_recorder_new (recorder_num, hostname, binfo->port);
if (gmyth_recorder_setup (recorder)) {
*list = g_list_append(*list, recorder);
Modified: trunk/gmyth/gmyth/gmyth_scheduler.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_scheduler.c 2008-03-14 12:45:05 UTC (rev 952)
+++ trunk/gmyth/gmyth/gmyth_scheduler.c 2008-03-14 13:13:18 UTC (rev 953)
@@ -273,7 +273,6 @@
GList ** schedule_list,
gchar *filter)
{
-
ScheduleInfo *schedule;
MYSQL_RES *msql_res;
GString *query_str = g_string_new("");
@@ -965,6 +964,133 @@
return res;
}
+gboolean
+gmyth_scheduler_is_exception (GMythScheduler *scheduler, ScheduleInfo *sch_info,
+ gint *recordid, gint *parentid)
+{
+ MYSQL_RES *msql_res;
+ gboolean ret = FALSE;
+ gchar *query_str;
+ gchar *start_time, *start_date;
+ gchar *end_time, *end_date;
+
+ g_return_val_if_fail (scheduler != NULL, FALSE);
+ g_return_val_if_fail (sch_info != NULL, FALSE);
+
+ if (scheduler->msqlquery == NULL) {
+ g_warning("[%s] Scheduler db connection not initialized", __FUNCTION__);
+ return FALSE;
+ }
+
+ start_time = gmyth_util_time_to_string_only_time (sch_info->start_time);
+ start_date = gmyth_util_time_to_string_only_date (sch_info->start_time);
+
+ end_time = gmyth_util_time_to_string_only_time (sch_info->end_time);
+ end_date = gmyth_util_time_to_string_only_date (sch_info->end_time);
+
+ query_str = g_strdup_printf ("SELECT recordid,parentid FROM record WHERE type=8 and "
+ "chanid=\"%d\" and starttime=\"%s\" and startdate=\"%s\" and "
+ "endtime=\"%s\" and enddate=\"%s\";", sch_info->channel_id,
+ start_time, start_date, end_time, end_date);
+
+ msql_res = gmyth_query_process_statement(scheduler->msqlquery, query_str);
+
+ if (msql_res == NULL) {
+ g_warning("DB retrieval of exception schedule info failed");
+ goto clean_me;
+ } else {
+ MYSQL_ROW row = mysql_fetch_row(msql_res);
+ if (row) {
+ *recordid = g_ascii_strtoull (row[0], NULL, 10);
+ *parentid = g_ascii_strtoull (row[1], NULL, 10);
+
+ ret = TRUE;
+ }
+
+ mysql_free_result(msql_res);
+ }
+
+clean_me:
+ g_free (start_time);
+ g_free (start_date);
+ g_free (end_time);
+ g_free (end_date);
+ g_free (query_str);
+
+ return ret;
+}
+
+gboolean
+gmyth_scheduler_remove_all_exceptions (GMythScheduler *scheduler, gint parentid)
+{
+ MYSQL_RES *msql_res;
+ gboolean ret = FALSE;
+ gchar *list_query;
+
+ g_return_val_if_fail (scheduler != NULL, FALSE);
+
+ if (scheduler->msqlquery == NULL) {
+ g_warning("[%s] Scheduler db connection not initialized", __FUNCTION__);
+ return FALSE;
+ }
+
+ list_query = g_strdup_printf ("SELECT recordid FROM record WHERE parentid=%d;",
+ parentid);
+
+ msql_res = gmyth_query_process_statement(scheduler->msqlquery, list_query);
+
+ if (msql_res == NULL) {
+ g_warning("DB retrieval of schedule list failed");
+ goto clean_me;
+ } else {
+ MYSQL_ROW row;
+
+ while ((row = mysql_fetch_row(msql_res)) != NULL) {
+
+ gint recordid = g_ascii_strtoull (row[0], NULL, 10);
+ ret = gmyth_scheduler_remove_exception (scheduler, recordid);
+ if (!ret) {
+ g_warning ("Fail to remove schedule exception");
+ break;
+ }
+ }
+
+ mysql_free_result(msql_res);
+ }
+
+clean_me:
+ g_free (list_query);
+
+ return ret;
+}
+
+gboolean
+gmyth_scheduler_remove_exception (GMythScheduler *scheduler, gint scheduleid)
+{
+ MYSQL_RES *msql_res;
+ gchar *query_str = NULL;
+
+ g_return_val_if_fail (scheduler != NULL, FALSE);
+
+ if (scheduler->msqlquery == NULL) {
+ g_warning("[%s] Scheduler db connection not initialized",
+ __FUNCTION__);
+ return FALSE;
+ }
+
+ query_str = g_strdup_printf ("DELETE FROM record WHERE recordid=%d", scheduleid);
+
+ msql_res = gmyth_query_process_statement(scheduler->msqlquery,
+ query_str);
+
+ mysql_free_result(msql_res);
+ g_free (query_str);
+
+ // Notify the backend of the changes
+ return update_backend(scheduler, scheduleid);
+}
+
+
/** Requests the Mysql database in the backend to remove an existing recorded item.
*
* @param scheduler the GMythScheduler instance.
Modified: trunk/gmyth/gmyth/gmyth_scheduler.h
===================================================================
--- trunk/gmyth/gmyth/gmyth_scheduler.h 2008-03-14 12:45:05 UTC (rev 952)
+++ trunk/gmyth/gmyth/gmyth_scheduler.h 2008-03-14 13:13:18 UTC (rev 953)
@@ -167,9 +167,19 @@
gboolean gmyth_scheduler_add_schedule_full (GMythScheduler * scheduler,
ScheduleInfo * schedule_info,
GMythScheduleType type);
+
+/* Schedule exception handling. When one program is not part of an "all schedule programs */
gboolean gmyth_scheduler_add_exception (GMythScheduler *scheduler,
gint schedule_id,
ScheduleInfo *exception_info);
+gboolean gmyth_scheduler_is_exception (GMythScheduler *scheduler,
+ ScheduleInfo *sch_info,
+ gint *recordid, gint *parentid);
+gboolean gmyth_scheduler_remove_all_exceptions (GMythScheduler *scheduler,
+ gint parentid);
+gboolean gmyth_scheduler_remove_exception (GMythScheduler *scheduler,
+ gint scheduleid);
+
gboolean gmyth_scheduler_delete_schedule (GMythScheduler * scheduler,
gint record_id);
gint gmyth_scheduler_delete_recorded (GMythScheduler * scheduler,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-03-14 12:45:11
|
Revision: 952
http://gmyth.svn.sourceforge.net/gmyth/?rev=952&view=rev
Author: melunko
Date: 2008-03-14 05:45:05 -0700 (Fri, 14 Mar 2008)
Log Message:
-----------
updated debian/changelog to set gmyth 0.8.1
Modified Paths:
--------------
trunk/packages/gmyth-debian/changelog
Modified: trunk/packages/gmyth-debian/changelog
===================================================================
--- trunk/packages/gmyth-debian/changelog 2008-03-13 16:29:38 UTC (rev 951)
+++ trunk/packages/gmyth-debian/changelog 2008-03-14 12:45:05 UTC (rev 952)
@@ -1,3 +1,10 @@
+gmyth (0.8.1-indt1) gutsy; urgency=low
+
+ * Added gmyth_scheduler_is_connected ()
+ * Added gmyth_epg_is_connected ()
+
+ -- Hallyson Melo <hal...@in...> Thu, 13 Mar 2008 13:07:16 -0300
+
gmyth (0.8.0-indt1) gutsy; urgency=low
* Fixed functions related to set recording for running livetv programs.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-03-13 16:29:36
|
Revision: 951
http://gmyth.svn.sourceforge.net/gmyth/?rev=951&view=rev
Author: melunko
Date: 2008-03-13 09:29:38 -0700 (Thu, 13 Mar 2008)
Log Message:
-----------
gmyth now is 0.8.1. Added methods epg_is_connected() and scheduler_is_connected()
Modified Paths:
--------------
trunk/gmyth/configure.ac
trunk/gmyth/gmyth/gmyth_epg.c
trunk/gmyth/gmyth/gmyth_epg.h
trunk/gmyth/gmyth/gmyth_scheduler.c
trunk/gmyth/gmyth/gmyth_scheduler.h
Modified: trunk/gmyth/configure.ac
===================================================================
--- trunk/gmyth/configure.ac 2008-03-04 13:57:55 UTC (rev 950)
+++ trunk/gmyth/configure.ac 2008-03-13 16:29:38 UTC (rev 951)
@@ -1,4 +1,4 @@
-AC_INIT(gmyth, 0.8.0)
+AC_INIT(gmyth, 0.8.1)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.ac)
AC_CANONICAL_BUILD
Modified: trunk/gmyth/gmyth/gmyth_epg.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_epg.c 2008-03-04 13:57:55 UTC (rev 950)
+++ trunk/gmyth/gmyth/gmyth_epg.c 2008-03-13 16:29:38 UTC (rev 951)
@@ -124,6 +124,14 @@
return TRUE;
}
+gboolean
+gmyth_epg_is_connected (GMythEPG *gmyth_epg)
+{
+ g_return_val_if_fail (gmyth_epg != NULL, FALSE);
+
+ return gmyth_query_is_alive (gmyth_epg->sqlquery);
+}
+
/** Disconnects from the Mysql database in the backend.
*
* @param gmyth_epg the GMythEPG instance to be disconnected
Modified: trunk/gmyth/gmyth/gmyth_epg.h
===================================================================
--- trunk/gmyth/gmyth/gmyth_epg.h 2008-03-04 13:57:55 UTC (rev 950)
+++ trunk/gmyth/gmyth/gmyth_epg.h 2008-03-13 16:29:38 UTC (rev 951)
@@ -43,14 +43,7 @@
typedef struct _GMythEPGClass GMythEPGClass;
struct _GMythEPGClass {
- GObjectClass parent_class;
-
- /*
- * callbacks
- */
- /*
- * no one for now
- */
+ GObjectClass parent_class;
};
struct _GMythEPG {
@@ -60,26 +53,28 @@
GMythBackendInfo *backend_info;
};
-GType gmyth_epg_get_type (void) G_GNUC_CONST;;
-GMythEPG* gmyth_epg_new (void);
-gboolean gmyth_epg_connect (GMythEPG *gmyth_epg,
- GMythBackendInfo *backend_info);
-gboolean gmyth_epg_disconnect (GMythEPG *gmyth_epg);
-gint gmyth_epg_get_channel_list (GMythEPG *gmyth_epg,
- GList **glist_ptr);
-gint gmyth_epg_get_program_list (GMythEPG *gmyth_epg,
- GList **proglist,
- gint chanNum,
- GTimeVal *starttime,
- GTimeVal *endtime);
+GType gmyth_epg_get_type (void) G_GNUC_CONST;;
+GMythEPG* gmyth_epg_new (void);
+gboolean gmyth_epg_connect (GMythEPG *gmyth_epg,
+ GMythBackendInfo *backend_info);
+gboolean gmyth_epg_is_connected (GMythEPG *gmyth_epg);
+
+gboolean gmyth_epg_disconnect (GMythEPG *gmyth_epg);
+gint gmyth_epg_get_channel_list (GMythEPG *gmyth_epg,
+ GList **glist_ptr);
+gint gmyth_epg_get_program_list (GMythEPG *gmyth_epg,
+ GList **proglist,
+ gint chanNum,
+ GTimeVal *starttime,
+ GTimeVal *endtime);
GMythChannelInfo*gmyth_epg_get_channel_info (GMythEPG *gmyth_epg,
gint channel_id);
-gboolean gmyth_epg_channel_has_icon (GMythEPG *gmyth_epg,
- GMythChannelInfo *channel);
-gboolean gmyth_epg_channel_get_icon (GMythEPG *gmyth_epg,
- GMythChannelInfo *channel,
- guint8 **data,
- guint *length);
+gboolean gmyth_epg_channel_has_icon (GMythEPG *gmyth_epg,
+ GMythChannelInfo *channel);
+gboolean gmyth_epg_channel_get_icon (GMythEPG *gmyth_epg,
+ GMythChannelInfo *channel,
+ guint8 **data,
+ guint *length);
G_END_DECLS
#endif /* GMYTH_EPG_H_ */
Modified: trunk/gmyth/gmyth/gmyth_scheduler.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_scheduler.c 2008-03-04 13:57:55 UTC (rev 950)
+++ trunk/gmyth/gmyth/gmyth_scheduler.c 2008-03-13 16:29:38 UTC (rev 951)
@@ -210,6 +210,14 @@
return TRUE;
}
+gboolean
+gmyth_scheduler_is_connected (GMythScheduler *scheduler)
+{
+ g_return_val_if_fail (scheduler != NULL, FALSE);
+
+ return gmyth_query_is_alive (scheduler->msqlquery);
+}
+
/** Disconnects from the Mysql database in the backend.
*
* @param scheduler the GMythScheduler instance to be disconnected
Modified: trunk/gmyth/gmyth/gmyth_scheduler.h
===================================================================
--- trunk/gmyth/gmyth/gmyth_scheduler.h 2008-03-04 13:57:55 UTC (rev 950)
+++ trunk/gmyth/gmyth/gmyth_scheduler.h 2008-03-13 16:29:38 UTC (rev 951)
@@ -146,6 +146,7 @@
gboolean gmyth_scheduler_connect_with_timeout (GMythScheduler * scheduler,
GMythBackendInfo * backend_info,
guint timeout);
+gboolean gmyth_scheduler_is_connected (GMythScheduler *scheduler);
gboolean gmyth_scheduler_disconnect (GMythScheduler * scheduler);
gint gmyth_scheduler_get_schedule_list (GMythScheduler * scheduler,
GList ** sched_list);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2008-03-04 13:57:53
|
Revision: 950
http://gmyth.svn.sourceforge.net/gmyth/?rev=950&view=rev
Author: renatofilho
Date: 2008-03-04 05:57:55 -0800 (Tue, 04 Mar 2008)
Log Message:
-----------
timeout interval increased
Modified Paths:
--------------
trunk/gmyth-stream/gmencoder/src/gmencoder.c
Modified: trunk/gmyth-stream/gmencoder/src/gmencoder.c
===================================================================
--- trunk/gmyth-stream/gmencoder/src/gmencoder.c 2008-03-04 13:51:13 UTC (rev 949)
+++ trunk/gmyth-stream/gmencoder/src/gmencoder.c 2008-03-04 13:57:55 UTC (rev 950)
@@ -40,7 +40,7 @@
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), G_TYPE_MENCODER, GMencoderPrivate))
#define USE_MANUAL_SINK
-#define GMENCODER_TIMEOUT 5000
+#define GMENCODER_TIMEOUT 10000
typedef struct _GMencoderPrivate GMencoderPrivate;
typedef struct _SetupInfo SetupInfo;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2008-03-04 13:51:15
|
Revision: 949
http://gmyth.svn.sourceforge.net/gmyth/?rev=949&view=rev
Author: renatofilho
Date: 2008-03-04 05:51:13 -0800 (Tue, 04 Mar 2008)
Log Message:
-----------
clear timeout function when gst emit error
Modified Paths:
--------------
trunk/gmyth-stream/gmencoder/src/gmencoder.c
Modified: trunk/gmyth-stream/gmencoder/src/gmencoder.c
===================================================================
--- trunk/gmyth-stream/gmencoder/src/gmencoder.c 2008-03-03 17:38:32 UTC (rev 948)
+++ trunk/gmyth-stream/gmencoder/src/gmencoder.c 2008-03-04 13:51:13 UTC (rev 949)
@@ -1064,6 +1064,11 @@
gchar *debug;
gchar *err_str;
+ if (priv->timeout_id != 0) {
+ g_source_remove (priv->timeout_id);
+ priv->timeout_id = 0;
+ }
+
if (priv->tick_id != 0) {
g_source_remove(priv->tick_id);
priv->tick_id = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-03-03 17:38:28
|
Revision: 948
http://gmyth.svn.sourceforge.net/gmyth/?rev=948&view=rev
Author: melunko
Date: 2008-03-03 09:38:32 -0800 (Mon, 03 Mar 2008)
Log Message:
-----------
Added new function to retrieve old schedules in order to reactivate them
Modified Paths:
--------------
trunk/gmyth/gmyth/gmyth_recorder.c
trunk/gmyth/gmyth/gmyth_scheduler.c
Modified: trunk/gmyth/gmyth/gmyth_recorder.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_recorder.c 2008-03-03 13:50:41 UTC (rev 947)
+++ trunk/gmyth/gmyth/gmyth_recorder.c 2008-03-03 17:38:32 UTC (rev 948)
@@ -707,14 +707,14 @@
return ret;
}
-static gboolean
+static gboolean
gmyth_recorder_find_if_program_exists(GMythRecorder * recorder,
GMythProgramInfo * prog)
{
- GList *lst = NULL;
+ GList *lst = NULL;
- g_return_val_if_fail(recorder != NULL
- && recorder->progs_info_list != NULL, FALSE);
+ g_return_val_if_fail (recorder != NULL, FALSE);
+ g_return_val_if_fail (recorder->progs_info_list != NULL, FALSE);
for (lst = recorder->progs_info_list; lst != NULL;
lst = g_list_next(lst)) {
@@ -736,7 +736,7 @@
* @return The actual program info.
*/
GMythProgramInfo *
-gmyth_recorder_get_current_program_info(GMythRecorder *recorder)
+gmyth_recorder_get_current_program_info (GMythRecorder *recorder)
{
GMythStringList *str_list = NULL;
GMythProgramInfo *program_info = NULL;
Modified: trunk/gmyth/gmyth/gmyth_scheduler.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_scheduler.c 2008-03-03 13:50:41 UTC (rev 947)
+++ trunk/gmyth/gmyth/gmyth_scheduler.c 2008-03-03 17:38:32 UTC (rev 948)
@@ -65,8 +65,13 @@
gmyth_scheduler_query_schedule_list (GMythScheduler * scheduler,
GList ** schedule_list,
gchar *filter);
+static gint
+gmyth_scheduler_query_schedule_id (GMythScheduler *scheduler,
+ GMythProgramInfo *prog_info);
+static gint gmyth_scheduler_query_old_schedule (GMythScheduler *scheduler,
+ gint channel_id, GTimeVal *startts,
+ gboolean reactivate);
-
static gboolean update_backend(GMythScheduler * scheduler, gint record_id);
G_DEFINE_TYPE(GMythScheduler, gmyth_scheduler, G_TYPE_OBJECT)
@@ -534,7 +539,7 @@
gboolean
gmyth_scheduler_add_schedule_full (GMythScheduler * scheduler,
- ScheduleInfo * schedule_info, GMythScheduleType type)
+ ScheduleInfo *schedule_info, GMythScheduleType type)
{
MYSQL_RES *msql_res;
gchar *query_str = NULL;
@@ -563,11 +568,29 @@
gmyth_scheduler_is_program_live_recorded (scheduler, schedule_info,
&prog_info);
if ((recorder_num > 0) && (prog_info != NULL)) {
+ gboolean res;
gmyth_scheduler_change_record_group (scheduler, prog_info, "Default");
- schedule_info->schedule_id = prog_info->recordid;
- return gmyth_scheduler_set_live_record (scheduler, schedule_info,
+ res = gmyth_scheduler_set_live_record (scheduler, schedule_info,
recorder_num, TRUE);
+ schedule_info->schedule_id = gmyth_scheduler_query_schedule_id (scheduler, prog_info);
+ return res;
+ }
+ }
+
+ /* Now, verifies if there is an old schedule for this program */
+ /* If threre is one, we reactivate it */
+ {
+ gint sched_id;
+ time_t now = time (NULL);
+
+ if (schedule_info->start_time->tv_sec < now) {
+ sched_id = gmyth_scheduler_query_old_schedule (scheduler, schedule_info->channel_id,
+ schedule_info->start_time, TRUE);
+ if (sched_id > 0) {
+ schedule_info->schedule_id = sched_id;
+ return TRUE;
+ }
}
}
@@ -690,6 +713,68 @@
GMYTH_SCHEDULE_ONE_OCCURRENCE);
}
+static gint
+gmyth_scheduler_query_schedule_id (GMythScheduler *scheduler,
+ GMythProgramInfo *prog_info)
+{
+ MYSQL_RES *mysql_res;
+ gint sched_id = -1;
+ gchar *query_str, *startts;
+
+ startts = gmyth_util_time_to_string_from_time_val (prog_info->recstartts);
+ query_str = g_strdup_printf ("SELECT recordid from recorded "
+ "WHERE chanid= \"%d\" AND starttime = \"%s\";",
+ prog_info->channel_id, startts);
+
+ mysql_res = gmyth_query_process_statement(scheduler->msqlquery, query_str);
+
+ if (mysql_res) {
+ MYSQL_ROW msql_row = mysql_fetch_row(mysql_res);
+ if (msql_row) {
+ sched_id = g_ascii_strtoull (msql_row[0], NULL, 10);
+ }
+ }
+
+ return sched_id;
+}
+
+/* Queries if there is an old schedule previously set to this program.
+ * If reactivate flag is set, the recording will be reactivated.
+ * @returns the schedule id.
+ */
+static int
+gmyth_scheduler_query_old_schedule (GMythScheduler *scheduler,
+ gint channel_id, GTimeVal *startts,
+ gboolean reactivate)
+{
+ MYSQL_RES *mysql_res;
+ gint sched_id = -1;
+ gchar *query_str, *startts_str;
+
+ startts_str = gmyth_util_time_to_string_from_time_val (startts);
+ query_str = g_strdup_printf ("SELECT recordid from oldrecorded "
+ "WHERE chanid= \"%d\" AND starttime=\"%s\";",
+ channel_id, startts_str);
+
+ mysql_res = gmyth_query_process_statement(scheduler->msqlquery, query_str);
+ g_free (query_str);
+
+ if (mysql_res) {
+ MYSQL_ROW msql_row = mysql_fetch_row(mysql_res);
+ if (msql_row) {
+ sched_id = g_ascii_strtoull (msql_row[0], NULL, 10);
+ if ((sched_id > 0) && (reactivate)) {
+ query_str = g_strdup_printf ("UPDATE oldrecorded SET reactivate = 1 "
+ "WHERE chanid= \"%d\" AND starttime=\"%s\";",
+ channel_id, startts_str);
+ update_backend (scheduler, 0);
+ }
+ }
+ }
+
+ return sched_id;
+}
+
/** Queries if the given schedule info is currently been recorded by any
* backend recorder.
* @return The recorder num currently recording the scheduled item, or -1
@@ -777,7 +862,7 @@
startts = gmyth_util_time_to_string_from_time_val (prog_info->recstartts);
query_str = g_strdup_printf("UPDATE recorded SET recgroup = \"%s\" "
- "WHERE chanid = \"%d\" AND starttime = \"%s\"",
+ "WHERE chanid = \"%d\" AND starttime = \"%s\";",
new_group, prog_info->channel_id, startts);
gmyth_query_process_statement(scheduler->msqlquery, query_str);
@@ -804,7 +889,6 @@
g_return_val_if_fail (scheduler != NULL, FALSE);
-
if (scheduler->msqlquery == NULL) {
g_warning("[%s] Scheduler db connection not initialized",
__FUNCTION__);
@@ -831,6 +915,7 @@
return ret;
}
}
+
}
query_str = g_string_new("");
@@ -911,37 +996,6 @@
return update_backend(scheduler, record_id);
}
-
-gboolean gmyth_scheduler_was_recorded_before(GMythScheduler* scheduler, gint channel_id,
- time_t start_time)
-{
- MYSQL_RES *msql_res;
- GString *query_str = g_string_new("");
-
- assert(scheduler);
- g_string_printf(query_str, "SELECT callsign FROM channel "
- "WHERE chanid = \"%d\"", channel_id);
-
- msql_res = gmyth_query_process_statement(scheduler->msqlquery, query_str->str);
-
- if (msql_res) {
- MYSQL_ROW msql_row = mysql_fetch_row(msql_res);
- if (msql_row) {
- GString* callsign = g_string_new(msql_row[0]);
- GString* startts = gmyth_util_time_to_string(start_time);
- g_string_printf(query_str, "SELECT * FROM oldrecorded "
- "WHERE station = \"%s\" AND starttime = \"%s\"",
- callsign->str, startts->str);
- msql_res = gmyth_query_process_statement(scheduler->msqlquery, query_str->str);
- g_string_free(callsign, TRUE);
- g_string_free(startts, TRUE);
- g_string_free(query_str, TRUE);
- if (mysql_fetch_row(msql_res)) return TRUE;
- }
- }
- return FALSE;
-}
-
/** Retrieves an existing recorded item information from database. The information
* is used to fill the returned GMythProgramInfo.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2008-03-03 13:50:49
|
Revision: 947
http://gmyth.svn.sourceforge.net/gmyth/?rev=947&view=rev
Author: renatofilho
Date: 2008-03-03 05:50:41 -0800 (Mon, 03 Mar 2008)
Log Message:
-----------
fixed bugs
Modified Paths:
--------------
trunk/gmyth-upnp/src/gmyth_upnp.c
trunk/gmyth-upnp/src/gmyth_upnp.h
trunk/gmyth-upnp/tests/main.c
Modified: trunk/gmyth-upnp/src/gmyth_upnp.c
===================================================================
--- trunk/gmyth-upnp/src/gmyth_upnp.c 2008-03-03 13:12:42 UTC (rev 946)
+++ trunk/gmyth-upnp/src/gmyth_upnp.c 2008-03-03 13:50:41 UTC (rev 947)
@@ -62,7 +62,6 @@
struct _GMythUPnPPrivate {
GHashTable *servers;
- GMythUPnPDeviceStatus last_status;
gboolean upnp_dev_found;
gchar *udn;
GMutex *mutex;
Modified: trunk/gmyth-upnp/src/gmyth_upnp.h
===================================================================
--- trunk/gmyth-upnp/src/gmyth_upnp.h 2008-03-03 13:12:42 UTC (rev 946)
+++ trunk/gmyth-upnp/src/gmyth_upnp.h 2008-03-03 13:50:41 UTC (rev 947)
@@ -32,41 +32,17 @@
#include <glib.h>
#include <glib-object.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <gmyth/gmyth_backendinfo.h>
-
G_BEGIN_DECLS
-#define GMYTH_UPNP_TYPE (gmyth_upnp_get_type ())
-#define GMYTH_UPNP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE, GMythUPnP))
-#define GMYTH_UPNP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE, GMythUPnPClass))
-#define IS_GMYTH_UPNP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE))
-#define IS_GMYTH_UPNP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE))
-#define GMYTH_UPNP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_UPNP_TYPE, GMythUPnPClass))
+#define GMYTH_UPNP_TYPE (gmyth_upnp_get_type ())
+#define GMYTH_UPNP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE, GMythUPnP))
+#define GMYTH_UPNP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE, GMythUPnPClass))
+#define IS_GMYTH_UPNP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE))
+#define IS_GMYTH_UPNP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE))
+#define GMYTH_UPNP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_UPNP_TYPE, GMythUPnPClass))
+
typedef struct _GMythUPnP GMythUPnP;
typedef struct _GMythUPnPClass GMythUPnPClass;
-typedef struct _GMythUPnPDevice GMythUPnPDevice;
-/****************************************
-* Data Type
-****************************************/
-
-typedef enum upnp_device_list_status {
- GMYTH_UPNP_DEVICE_ADDED = 0,
- GMYTH_UPNP_DEVICE_UPDATED,
- GMYTH_UPNP_DEVICE_REMOVED
-} GMythUPnPDeviceStatus;
-
-struct _GMythUPnPDevice {
- gchar *uri;
- gchar *host;
- gint port;
- gchar *protocol;
-};
-
-
struct _GMythUPnPClass {
GObjectClass parent_class;
};
Modified: trunk/gmyth-upnp/tests/main.c
===================================================================
--- trunk/gmyth-upnp/tests/main.c 2008-03-03 13:12:42 UTC (rev 946)
+++ trunk/gmyth-upnp/tests/main.c 2008-03-03 13:50:41 UTC (rev 947)
@@ -28,7 +28,7 @@
#include <glib.h>
-
+#include <gmyth/gmyth.h>
#include "gmyth_upnp.h"
static void
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-03-03 13:12:43
|
Revision: 946
http://gmyth.svn.sourceforge.net/gmyth/?rev=946&view=rev
Author: melunko
Date: 2008-03-03 05:12:42 -0800 (Mon, 03 Mar 2008)
Log Message:
-----------
gmyth debian package version incremented to 0.8
Modified Paths:
--------------
trunk/packages/gmyth-debian/changelog
Modified: trunk/packages/gmyth-debian/changelog
===================================================================
--- trunk/packages/gmyth-debian/changelog 2008-03-03 13:11:54 UTC (rev 945)
+++ trunk/packages/gmyth-debian/changelog 2008-03-03 13:12:42 UTC (rev 946)
@@ -1,3 +1,9 @@
+gmyth (0.8.0-indt1) gutsy; urgency=low
+
+ * Fixed functions related to set recording for running livetv programs.
+
+ -- Hallyson Melo <hal...@in...> Mon, 03 Mar 2008 08:42:10 -0300
+
gmyth (0.7.1-indt1) gutsy; urgency=low
* Release 0.7.1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-03-03 13:12:43
|
Revision: 945
http://gmyth.svn.sourceforge.net/gmyth/?rev=945&view=rev
Author: melunko
Date: 2008-03-03 05:11:54 -0800 (Mon, 03 Mar 2008)
Log Message:
-----------
gmyth library version incremented to 0.8
Modified Paths:
--------------
trunk/gmyth/ChangeLog
trunk/gmyth/configure.ac
Modified: trunk/gmyth/ChangeLog
===================================================================
--- trunk/gmyth/ChangeLog 2008-03-03 11:33:49 UTC (rev 944)
+++ trunk/gmyth/ChangeLog 2008-03-03 13:11:54 UTC (rev 945)
@@ -1,3 +1,9 @@
+
+2008-03-03 Hallyson Melo <hal...@in...>
+ * GMyth 0.8.
+ * Now, set backend recording for livetv is working.
+ * Library is a lot more stable.
+
2006-08-17 Rosfran Borges <ros...@in...>
* Added the correct gstreamer-base package (GSTBASE) at the configure.ac;
GSTBASE_CFLAGS and GSTBASE_LIBS variables had the same values from
Modified: trunk/gmyth/configure.ac
===================================================================
--- trunk/gmyth/configure.ac 2008-03-03 11:33:49 UTC (rev 944)
+++ trunk/gmyth/configure.ac 2008-03-03 13:11:54 UTC (rev 945)
@@ -1,4 +1,4 @@
-AC_INIT(gmyth, 0.7.1)
+AC_INIT(gmyth, 0.8.0)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.ac)
AC_CANONICAL_BUILD
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-03-03 11:33:48
|
Revision: 944
http://gmyth.svn.sourceforge.net/gmyth/?rev=944&view=rev
Author: melunko
Date: 2008-03-03 03:33:49 -0800 (Mon, 03 Mar 2008)
Log Message:
-----------
Now add/cancel a schedule recording while livetv is running is finnaly working fine.
Modified Paths:
--------------
trunk/gmyth/gmyth/gmyth_scheduler.c
trunk/gmyth/gmyth/gmyth_scheduler.h
trunk/gmyth/gmyth/gmyth_util.c
Modified: trunk/gmyth/gmyth/gmyth_scheduler.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_scheduler.c 2008-03-01 23:15:42 UTC (rev 943)
+++ trunk/gmyth/gmyth/gmyth_scheduler.c 2008-03-03 11:33:49 UTC (rev 944)
@@ -61,6 +61,10 @@
GMythProgramInfo *prog_info,
gchar *new_group);
+static gint
+gmyth_scheduler_query_schedule_list (GMythScheduler * scheduler,
+ GList ** schedule_list,
+ gchar *filter);
static gboolean update_backend(GMythScheduler * scheduler, gint record_id);
@@ -225,25 +229,62 @@
* @return The amount of schedules retrieved from database, or -1 if error.
*/
gint
-gmyth_scheduler_get_schedule_list(GMythScheduler * scheduler,
- GList ** schedule_list)
+gmyth_scheduler_get_schedule_list (GMythScheduler * scheduler,
+ GList ** schedule_list)
{
+ return gmyth_scheduler_query_schedule_list (scheduler, schedule_list, NULL);
+}
+
+ScheduleInfo*
+gmyth_scheduler_get_schedule (GMythScheduler * scheduler, gint sched_id)
+{
+ GList *sched_list = NULL;
+ ScheduleInfo *schedule = NULL;
+ gchar *filter;
+ gint count;
+
+ filter = g_strdup_printf ("WHERE recordid=%d", sched_id);
+
+ count = gmyth_scheduler_query_schedule_list (scheduler, &sched_list, filter);
+ if ((count > 0) && (sched_list != NULL)) {
+ schedule = (ScheduleInfo*) sched_list->data;
+ g_list_free (sched_list);
+ }
+
+ g_free (filter);
+ return schedule;
+}
+
+static gint
+gmyth_scheduler_query_schedule_list (GMythScheduler * scheduler,
+ GList ** schedule_list,
+ gchar *filter)
+{
+
ScheduleInfo *schedule;
MYSQL_RES *msql_res;
GString *query_str = g_string_new("");
gchar *date_time = NULL;
assert(scheduler);
-
- g_string_printf(query_str,
- "SELECT recordid,programid,chanid,starttime,startdate,"
- "endtime,enddate,title,subtitle,description,category,type,parentid,seriesid FROM record;");
-
if (scheduler->msqlquery == NULL) {
g_warning("[%s] Scheduler db connection not initialized",
__FUNCTION__);
return -1;
}
+
+ if (filter == NULL) {
+ g_string_printf(query_str,
+ "SELECT recordid,programid,chanid,starttime,startdate,"
+ "endtime,enddate,title,subtitle,description,category,type,parentid,seriesid FROM record;");
+ } else {
+ g_string_printf(query_str,
+ "SELECT recordid,programid,chanid,starttime,startdate,"
+ "endtime,enddate,title,subtitle,description,category,type,parentid,seriesid FROM record "
+ "%s;", filter);
+
+ }
+
msql_res =
gmyth_query_process_statement(scheduler->msqlquery,
query_str->str);
@@ -496,7 +537,7 @@
ScheduleInfo * schedule_info, GMythScheduleType type)
{
MYSQL_RES *msql_res;
- gchar *query_str = "INSERT record (recordid) VALUE (0);";
+ gchar *query_str = NULL;
gchar *station = NULL;
gulong rec_id;
@@ -521,9 +562,9 @@
gint recorder_num =
gmyth_scheduler_is_program_live_recorded (scheduler, schedule_info,
&prog_info);
- if (recorder_num > 0) {
- g_debug ("Recording already found in livetv... setting live record");
+ if ((recorder_num > 0) && (prog_info != NULL)) {
gmyth_scheduler_change_record_group (scheduler, prog_info, "Default");
+ schedule_info->schedule_id = prog_info->recordid;
return gmyth_scheduler_set_live_record (scheduler, schedule_info,
recorder_num, TRUE);
@@ -532,7 +573,8 @@
msql_res =
gmyth_query_process_statement_with_increment(scheduler->msqlquery,
- query_str, &rec_id);
+ "INSERT record (recordid) VALUE (0);",
+ &rec_id);
mysql_free_result(msql_res);
// Retrieves the station info
@@ -665,13 +707,12 @@
GList *iter = list;
while (iter) {
GMythRecorder *recorder = GMYTH_RECORDER ( iter->data );
- g_debug ("XXXX verifying the recorder %d", recorder->recorder_num);
if (gmyth_recorder_is_recording (recorder)) {
GMythProgramInfo *pinfo = gmyth_recorder_get_current_program_info (recorder);
if (pinfo != NULL) {
- if ((schedule_info->channel_id == pinfo->channel_id)) {
- g_debug ("XXXXXX recorder %d is recording the program", recorder->recorder_num);
+ if ((schedule_info->channel_id == pinfo->channel_id) &&
+ (schedule_info->start_time->tv_sec == pinfo->startts->tv_sec)) {
recorder_num = recorder->recorder_num;
*prog_info = pinfo;
break;
@@ -708,7 +749,6 @@
socket = gmyth_backend_info_get_connected_socket (scheduler->backend_info);
if (socket != NULL) {
- g_debug ("XXXX sending command for live recording");
ret = (gmyth_socket_sendreceive_stringlist(socket, strlist) > 0);
g_object_unref (socket);
} else {
@@ -734,10 +774,8 @@
return FALSE;
}
- //prog_info->recstartts->tv_sec += 60*60*2;
startts = gmyth_util_time_to_string_from_time_val (prog_info->recstartts);
- g_debug ("\n\n%s\n\n", startts);
query_str = g_strdup_printf("UPDATE recorded SET recgroup = \"%s\" "
"WHERE chanid = \"%d\" AND starttime = \"%s\"",
new_group, prog_info->channel_id, startts);
@@ -759,12 +797,11 @@
* @return gboolean TRUE if success, FALSE if error
*/
gboolean
-gmyth_scheduler_delete_schedule(GMythScheduler * scheduler, gint schedule_id)
+gmyth_scheduler_delete_schedule (GMythScheduler * scheduler, gint schedule_id)
{
+ MYSQL_RES *msql_res;
+ GString *query_str = NULL;
- MYSQL_RES *msql_res;
- GString *query_str = NULL;
-
g_return_val_if_fail (scheduler != NULL, FALSE);
@@ -774,6 +811,28 @@
return FALSE;
}
+ {
+ /* Before adding the schedule, we need to check if program is been played */
+ GMythProgramInfo *prog_info = NULL;
+ ScheduleInfo *sched_info = NULL;
+
+ sched_info = gmyth_scheduler_get_schedule (scheduler, schedule_id);
+ if (sched_info != NULL) {
+ gint recorder_num =
+ gmyth_scheduler_is_program_live_recorded (scheduler, sched_info,
+ &prog_info);
+ if ((recorder_num > 0) && (prog_info != NULL)) {
+ gboolean ret;
+ gmyth_scheduler_change_record_group (scheduler, prog_info, "LiveTV");
+
+ ret = gmyth_scheduler_set_live_record (scheduler, sched_info,
+ recorder_num, FALSE);
+ gmyth_schedule_info_free (sched_info);
+ return ret;
+ }
+ }
+ }
+
query_str = g_string_new("");
g_string_printf(query_str,
"DELETE FROM record WHERE recordid=%d", schedule_id);
@@ -883,175 +942,6 @@
return FALSE;
}
-
-gboolean gmyth_scheduler_reactivate_schedule(GMythScheduler* scheduler, gint channel_id,
- time_t start_time)
-
-{
- MYSQL_RES *msql_res;
- GString *query_str = g_string_new("");
-
- assert(scheduler);
- g_string_printf(query_str, "SELECT callsign FROM channel "
- "WHERE chanid = \"%d\"", channel_id);
-
- msql_res = gmyth_query_process_statement(scheduler->msqlquery, query_str->str);
- if (msql_res) {
- MYSQL_ROW msql_row = mysql_fetch_row(msql_res);
- if (msql_row) {
- GString* callsign = g_string_new(msql_row[0]);
- GString* startts = gmyth_util_time_to_string(start_time);
- g_string_printf(query_str, "UPDATE oldrecorded SET reactivate = 1 "
- "WHERE station = \"%s\" AND starttime = \"%s\"",
- callsign->str, startts->str);
- gmyth_query_process_statement(scheduler->msqlquery, query_str->str);
- g_string_free(callsign, TRUE);
- g_string_free(startts, TRUE);
- g_string_free(query_str, TRUE);
- return TRUE;
- }
-
- }
-
- return FALSE;
-}
-
-
-/*
- * This should only be used in special situations. We do not know the time that
- * the recording was set. We just know that it is an "ongoing" record and then
- * we have to use this to get it's info. It's always the oldest one -> first on list
- *
- */
-GMythProgramInfo*
-gmyth_scheduler_get_recorded_on_time(GMythScheduler* scheduler,
- guint channel_id)
-{
- MYSQL_RES *msql_res;
- GMythProgramInfo *proginfo = NULL;
- GString *query_str = g_string_new("");
-
- assert(scheduler);
-
- g_string_printf(query_str,
- "SELECT recorded.chanid,starttime,endtime,title,"
- "subtitle,description,channel.channum,"
- "channel.callsign,channel.name,channel.commfree,"
- "channel.outputfilters,seriesid,programid,filesize,"
- "lastmodified,stars,previouslyshown,originalairdate,"
- "hostname,recordid,transcoder,playgroup,"
- "recorded.recpriority,progstart,progend,basename,recgroup,"
- "category,findid,duplicate "
- "FROM recorded " "LEFT JOIN channel "
- "ON recorded.chanid = channel.chanid "
- "WHERE recorded.chanid = %d "
- "ORDER BY starttime DESC", channel_id);
-
- msql_res =
- gmyth_query_process_statement(scheduler->msqlquery, query_str->str);
-
- if (msql_res) {
- MYSQL_ROW msql_row = mysql_fetch_row(msql_res);
-
- if (msql_row) {
- proginfo = gmyth_program_info_new();
-
- proginfo->channel_id = (gint) g_ascii_strtoull (msql_row[0], NULL, 10);
- proginfo->recstartts = gmyth_util_string_to_time_val(msql_row[1]);
- proginfo->recendts = gmyth_util_string_to_time_val(msql_row[2]);
-
- proginfo->title = g_string_new(msql_row[3]);
- proginfo->subtitle = g_string_new(msql_row[4]);
- proginfo->description = g_string_new(msql_row[5]);
-
- proginfo->chanstr = g_string_new(msql_row[6]);
- proginfo->chansign = g_string_new(msql_row[7]);
- proginfo->channame = g_string_new(msql_row[8]);
- proginfo->chancommfree = (gint) g_ascii_strtoull(msql_row[9], NULL, 10);
- proginfo->chanOutputFilters = g_string_new(msql_row[10]);
- proginfo->seriesid = g_string_new(msql_row[11]);
- proginfo->program_id = g_string_new(msql_row[12]);
- proginfo->filesize = g_ascii_strtoull(msql_row[13], NULL, 10);
-
- proginfo->lastmodified = gmyth_util_string_to_time_val(msql_row[14]);
- proginfo->stars = g_ascii_strtod(msql_row[15], NULL);
- proginfo->repeat = (gint)g_ascii_strtoull(msql_row[16], NULL, 10);
-
- if (msql_row[17] == NULL) {
- proginfo->originalAirDate = 0;
- proginfo->hasAirDate = FALSE;
- } else {
- proginfo->originalAirDate = gmyth_util_string_to_time_val(msql_row[17]);
- proginfo->hasAirDate = TRUE;
- }
-
- proginfo->hostname = g_string_new(msql_row[18]);
- proginfo->recordid = (gint) g_ascii_strtoull(msql_row[19], NULL, 10);
- proginfo->transcoder = (gint) g_ascii_strtoull(msql_row[20], NULL, 10);
-
- proginfo->playgroup = g_string_new(msql_row[21]);
- proginfo->recpriority = (gint) g_ascii_strtoull(msql_row[22], NULL, 10);
-
- proginfo->startts = gmyth_util_string_to_time_val(msql_row[23]);
- proginfo->endts = gmyth_util_string_to_time_val(msql_row[24]);
- proginfo->pathname = g_string_new(g_strdup(msql_row[25]));
- proginfo->recgroup = g_string_new(msql_row[26]);
- proginfo->category = g_string_new(msql_row[27]);
- proginfo->findid = (gint) g_ascii_strtoull(msql_row[28], NULL, 10);
-
- proginfo->recpriority2 = 0;
-
- g_string_printf(query_str,
- "SELECT dupmethod,dupin,parentid,type "
- "FROM record WHERE recordid = \"%d\"", proginfo->recordid);
-
- msql_res =
- gmyth_query_process_statement(scheduler->msqlquery,
- query_str->str);
-
- if (msql_res) {
- MYSQL_ROW msql_row = mysql_fetch_row(msql_res);
-
- if (msql_row) {
- proginfo->dupmethod = (gint) g_ascii_strtoull(msql_row[0], NULL, 10);
- proginfo->dupin = (gint) g_ascii_strtoull(msql_row[1], NULL, 10);
- proginfo->parentid = (gint) g_ascii_strtoull(msql_row[2], NULL, 10);
- proginfo->rectype = 0;
- }
- }
-
-
- g_string_printf(query_str,
- "SELECT sourceid,cardid,cardinputid,shareable "
- "FROM cardinput");
-
- msql_res =
- gmyth_query_process_statement(scheduler->msqlquery,
- query_str->str);
-
- if (msql_res) {
- MYSQL_ROW msql_row = mysql_fetch_row(msql_res);
-
- if (msql_row) {
- proginfo->sourceid = 0;
- proginfo->cardid = 0;
- proginfo->inputid = 0;
- if (msql_row[3] != NULL && g_ascii_strcasecmp("Y", msql_row[3]) == 0)
- proginfo->shareable = 1;
- else
- proginfo->shareable = 0;
- }
- }
-
-
-
- }
- }
-
- g_string_free(query_str, TRUE);
- return proginfo;
-}
-
/** Retrieves an existing recorded item information from database. The information
* is used to fill the returned GMythProgramInfo.
*
@@ -1167,115 +1057,7 @@
return proginfo;
}
-gboolean
-gmyth_scheduler_stop_recording (GMythScheduler * scheduler,
- gint channel_id)
-{
- GMythProgramInfo *program;
- GMythSocket *socket;
- gboolean res = FALSE;
- GMythStringList *slist;
- socket = gmyth_backend_info_get_connected_socket (scheduler->backend_info);
- program = gmyth_scheduler_get_recorded_on_time (scheduler, channel_id);
-
- if (program) {
- slist = gmyth_string_list_new();
- gmyth_string_list_append_char_array(slist, "STOP_RECORDING");
-
- gmyth_string_list_append_string(slist, program->title); /* 0 */
- gmyth_string_list_append_string(slist, program->subtitle); /* 1 */
- gmyth_string_list_append_string(slist, program->description); /* 2 */
- gmyth_string_list_append_string(slist, program->category); /* 3 */
- gmyth_string_list_append_int(slist, program->channel_id); /* 4 */
- gmyth_string_list_append_string(slist, program->chanstr); /* 5 */
- gmyth_string_list_append_string(slist, program->chansign); /* 6 */
- gmyth_string_list_append_string(slist, program->channame); /* 7 */
- gmyth_string_list_append_string(slist, program->pathname); /* 8 */
- gmyth_string_list_append_int64(slist, program->filesize); /* 9 */
-
- if (program->startts)
- gmyth_string_list_append_int(slist, program->startts->tv_sec); /* 10 */
- else
- gmyth_string_list_append_int(slist, 0);
-
- if (program->endts)
- gmyth_string_list_append_int(slist, program->endts->tv_sec); /* 11 */
- else
- gmyth_string_list_append_int(slist, 0);
-
- gmyth_string_list_append_int(slist, program->duplicate); /* 12 */
- gmyth_string_list_append_int(slist, program->shareable); /* 13 */
- gmyth_string_list_append_int(slist, program->findid); /* 14 */
- gmyth_string_list_append_string(slist, program->hostname); /* 15 */
- gmyth_string_list_append_int(slist, program->sourceid); /* 16 */
- gmyth_string_list_append_int(slist, program->cardid); /* 17 */
- gmyth_string_list_append_int(slist, program->inputid); /* 18 */
- gmyth_string_list_append_int(slist, program->recpriority); /* 19 */
-
- // recstatus == recording
- gmyth_string_list_append_int(slist, -3); /* 20 */
-
- gmyth_string_list_append_int(slist, program->recordid); /* 21 */
- gmyth_string_list_append_int(slist, program->rectype); /* 22 */
- gmyth_string_list_append_int(slist, program->dupin); /* 23 */
- gmyth_string_list_append_int(slist, program->dupmethod); /* 24 */
-
-
- //fixme
- program->recstartts->tv_sec -= (60*60);
-
- gmyth_string_list_append_int(slist,
- program->recstartts != NULL ?
- program->recstartts->tv_sec : 0); /* 26 */
-
- gmyth_string_list_append_int(slist,
- program->recendts != NULL ?
- program->recendts->tv_sec : 0); /* 27 */
-
- gmyth_string_list_append_int(slist, program->repeat); /* 28 */
- gmyth_string_list_append_int(slist, program->programflags); /* 29 */
-
- gmyth_string_list_append_char_array(slist,
- program->recgroup != NULL ?
- program->recgroup->str : "Default"); /* 30 */
-
- gmyth_string_list_append_int(slist, program->chancommfree); /* 31 */
- gmyth_string_list_append_string(slist, program->chanOutputFilters); /* 32 */
- gmyth_string_list_append_string(slist, program->seriesid); /* 33 */
- gmyth_string_list_append_string(slist, program->program_id); /* 34 */
-
- gmyth_string_list_append_int(slist,
- program->lastmodified != NULL ?
- program->lastmodified->tv_sec : 0); /* 35 */
-
- gmyth_string_list_append_float(slist, program->stars); /* 36 */
-
- gmyth_string_list_append_int(slist,
- program->originalAirDate != NULL ?
- program->originalAirDate->tv_sec : 0); /* 37 */
-
- gmyth_string_list_append_int(slist, program->hasAirDate); /* 38 */
-
- gmyth_string_list_append_char_array(slist,
- program->playgroup != NULL ?
- program->playgroup->str : "Default"); /* 39 */
-
- gmyth_string_list_append_int(slist, program->recpriority2); /* 40 */
- gmyth_string_list_append_int(slist, program->recpriority2); /* 40 */
-
- gmyth_socket_sendreceive_stringlist(socket, slist);
- res = (gmyth_string_list_get_int(slist, 0) == 1);
-
- g_object_unref (program);
- g_object_unref (slist);
- }
-
- g_object_unref (socket);
- return res;
-}
-
-
/** Notifies the backend of an update in the db.
*
* @param record_id the id of the modified recording.
Modified: trunk/gmyth/gmyth/gmyth_scheduler.h
===================================================================
--- trunk/gmyth/gmyth/gmyth_scheduler.h 2008-03-01 23:15:42 UTC (rev 943)
+++ trunk/gmyth/gmyth/gmyth_scheduler.h 2008-03-03 11:33:49 UTC (rev 944)
@@ -149,18 +149,12 @@
gboolean gmyth_scheduler_disconnect (GMythScheduler * scheduler);
gint gmyth_scheduler_get_schedule_list (GMythScheduler * scheduler,
GList ** sched_list);
+ScheduleInfo* gmyth_scheduler_get_schedule (GMythScheduler * scheduler,
+ gint schedule_id);
gint gmyth_scheduler_get_recorded_list (GMythScheduler * scheduler,
GList ** rec_list);
RecordedInfo* gmyth_scheduler_get_recorded_info (GMythScheduler *scheduler,
const char *basename);
-gboolean gmyth_scheduler_was_recorded_before (GMythScheduler* scheduler,
- gint channel_id,
- time_t start_time);
-gboolean gmyth_scheduler_reactivate_schedule (GMythScheduler* scheduler,
- gint channel_id,
- time_t start_time);
-GMythProgramInfo* gmyth_scheduler_get_recorded_on_time (GMythScheduler* scheduler,
- guint channel_id);
GMythProgramInfo* gmyth_scheduler_get_recorded (GMythScheduler * scheduler,
GString * channel,
GTimeVal * starttime);
@@ -179,8 +173,6 @@
gint record_id);
gint gmyth_scheduler_delete_recorded (GMythScheduler * scheduler,
gint record_id);
-gboolean gmyth_scheduler_stop_recording (GMythScheduler * scheduler,
- gint channel_id);
void gmyth_scheduler_recorded_info_get_preview(RecordedInfo * info,
GByteArray * data);
Modified: trunk/gmyth/gmyth/gmyth_util.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_util.c 2008-03-01 23:15:42 UTC (rev 943)
+++ trunk/gmyth/gmyth/gmyth_util.c 2008-03-03 11:33:49 UTC (rev 944)
@@ -95,7 +95,7 @@
* @param time_value the GTimeValue to be converted
* @return GString* the converted isoformat string
*/
-gchar *
+gchar*
gmyth_util_time_to_isoformat_from_time_val_fmt(const gchar * fmt_string,
const GTimeVal * time_val)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-03-01 23:15:41
|
Revision: 943
http://gmyth.svn.sourceforge.net/gmyth/?rev=943&view=rev
Author: melunko
Date: 2008-03-01 15:15:42 -0800 (Sat, 01 Mar 2008)
Log Message:
-----------
Added new functions to add live recording
Modified Paths:
--------------
trunk/gmyth/gmyth/gmyth_livetv.c
trunk/gmyth/gmyth/gmyth_query.c
trunk/gmyth/gmyth/gmyth_query.h
trunk/gmyth/gmyth/gmyth_recorder.c
trunk/gmyth/gmyth/gmyth_recorder.h
trunk/gmyth/gmyth/gmyth_remote_util.c
trunk/gmyth/gmyth/gmyth_remote_util.h
trunk/gmyth/gmyth/gmyth_scheduler.c
trunk/gmyth/gmyth/gmyth_util.c
Modified: trunk/gmyth/gmyth/gmyth_livetv.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_livetv.c 2008-02-29 19:03:41 UTC (rev 942)
+++ trunk/gmyth/gmyth/gmyth_livetv.c 2008-03-01 23:15:42 UTC (rev 943)
@@ -116,7 +116,7 @@
}
if (livetv->recorder != NULL) {
- // gmyth_recorder_close(livetv->recorder);
+ gmyth_recorder_close(livetv->recorder);
g_object_unref(livetv->recorder);
livetv->recorder = NULL;
}
Modified: trunk/gmyth/gmyth/gmyth_query.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_query.c 2008-02-29 19:03:41 UTC (rev 942)
+++ trunk/gmyth/gmyth/gmyth_query.c 2008-03-01 23:15:42 UTC (rev 943)
@@ -181,6 +181,15 @@
return TRUE;
}
+gboolean
+gmyth_query_is_alive (GMythQuery *gmyth_query)
+{
+ g_return_val_if_fail (gmyth_query != NULL, FALSE);
+
+ return (mysql_ping (gmyth_query->conn) == 0);
+}
+
+
/** Disconnects from the Mysql database in the backend.
*
* @param gmyth_query the GMythQuery instance to be disconnected
Modified: trunk/gmyth/gmyth/gmyth_query.h
===================================================================
--- trunk/gmyth/gmyth/gmyth_query.h 2008-02-29 19:03:41 UTC (rev 942)
+++ trunk/gmyth/gmyth/gmyth_query.h 2008-03-01 23:15:42 UTC (rev 943)
@@ -38,12 +38,16 @@
#include "gmyth_backendinfo.h"
G_BEGIN_DECLS
+
+#define GMYTH_QUERY_STANDARD_TIMEOUT 10 /*seconds*/
+
#define GMYTH_QUERY_TYPE (gmyth_query_get_type ())
#define GMYTH_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_QUERY_TYPE, GMythQuery))
#define GMYTH_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_QUERY_TYPE, GMythQueryClass))
#define IS_GMYTH_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMYTH_QUERY_TYPE))
#define IS_GMYTH_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_QUERY_TYPE))
#define GMYTH_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_QUERY_TYPE, GMythQueryClass))
+
typedef struct _GMythQuery GMythQuery;
typedef struct _GMythQueryClass GMythQueryClass;
@@ -84,9 +88,9 @@
gboolean gmyth_query_connect(GMythQuery * gmyth_query,
GMythBackendInfo * backend_info);
gboolean gmyth_query_connect_with_timeout(GMythQuery * gmyth_query,
- GMythBackendInfo *
- backend_info,
+ GMythBackendInfo *backend_info,
guint timeout);
+gboolean gmyth_query_is_alive (GMythQuery *gmyth_query);
gboolean gmyth_query_disconnect(GMythQuery * gmyth_query);
G_END_DECLS
Modified: trunk/gmyth/gmyth/gmyth_recorder.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_recorder.c 2008-02-29 19:03:41 UTC (rev 942)
+++ trunk/gmyth/gmyth/gmyth_recorder.c 2008-03-01 23:15:42 UTC (rev 943)
@@ -69,8 +69,6 @@
{
GMythRecorder *recorder = GMYTH_RECORDER(object);
- gmyth_recorder_close(recorder);
-
if (recorder->mutex != NULL) {
g_mutex_free(recorder->mutex);
recorder->mutex = NULL;
@@ -118,7 +116,7 @@
* @return a new instance of GMythRecorder.
*/
GMythRecorder *
-gmyth_recorder_new(int num, GString * hostname, gshort port)
+gmyth_recorder_new(int num, GString *hostname, gshort port)
{
GMythRecorder *encoder =
GMYTH_RECORDER(g_object_new(GMYTH_RECORDER_TYPE, FALSE));
@@ -738,7 +736,7 @@
* @return The actual program info.
*/
GMythProgramInfo *
-gmyth_recorder_get_current_program_info(GMythRecorder * recorder)
+gmyth_recorder_get_current_program_info(GMythRecorder *recorder)
{
GMythStringList *str_list = NULL;
GMythProgramInfo *program_info = NULL;
@@ -1135,7 +1133,7 @@
* @return <code>true</code>, if the actual remote file is bein recorded.
*/
gboolean
-gmyth_recorder_is_recording(GMythRecorder * recorder)
+gmyth_recorder_is_recording (GMythRecorder* recorder)
{
gboolean ret = TRUE;
Modified: trunk/gmyth/gmyth/gmyth_recorder.h
===================================================================
--- trunk/gmyth/gmyth/gmyth_recorder.h 2008-02-29 19:03:41 UTC (rev 942)
+++ trunk/gmyth/gmyth/gmyth_recorder.h 2008-03-01 23:15:42 UTC (rev 943)
@@ -136,15 +136,13 @@
gboolean gmyth_recorder_pause_recording(GMythRecorder * recorder);
-GMythProgramInfo *gmyth_recorder_get_current_program_info(GMythRecorder *
- recorder);
+GMythProgramInfo *gmyth_recorder_get_current_program_info(GMythRecorder *recorder);
GMythProgramInfo *gmyth_recorder_get_next_program_info(GMythRecorder *
recorder, const
GMythRecorderBrowseDirection
direction);
-GMythRecorder *gmyth_recorder_get_recorder_from_num(gint rec_id);
gint64 gmyth_recorder_get_file_position(GMythRecorder * recorder);
Modified: trunk/gmyth/gmyth/gmyth_remote_util.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_remote_util.c 2008-02-29 19:03:41 UTC (rev 942)
+++ trunk/gmyth/gmyth/gmyth_remote_util.c 2008-03-01 23:15:42 UTC (rev 943)
@@ -34,6 +34,7 @@
#include "gmyth_recorder.h"
#include "gmyth_stringlist.h"
#include "gmyth_debug.h"
+#include "gmyth_query.h"
/**
* Requests the Mythtv backend for a free remote recorder.
@@ -93,7 +94,7 @@
* @return the number of remote encoders instance available, or 0 if no one is actually free..
*/
gint
-gmyth_remote_util_get_free_recorder_count(GMythSocket * socket)
+gmyth_remote_util_get_free_recorder_count (GMythSocket * socket)
{
gint num_recs = 0;
@@ -124,3 +125,51 @@
return num_recs;
}
+
+/* Gets all available recorders in the backend.
+ * @returns the num of recorders found, or -1 if any error happens.
+ **/
+gint
+gmyth_remote_util_get_recorder_list (GMythBackendInfo* binfo, GList **list)
+{
+ GMythQuery *sqlquery;
+ MYSQL_RES *msql_res;
+ gchar *query_str = "SELECT cardid FROM cardinput";
+
+ sqlquery = gmyth_query_new ();
+ if (!gmyth_query_connect_with_timeout (sqlquery, binfo, GMYTH_QUERY_STANDARD_TIMEOUT)) {
+ g_warning ("[%s] Could not connect to mysql server", __FUNCTION__);
+ g_object_unref (sqlquery);
+ return FALSE;
+ }
+
+ /* Retrieves the list of recorders num */
+ msql_res = gmyth_query_process_statement(sqlquery, query_str);
+ if (msql_res == NULL) {
+ g_warning("DB retrieval of recording list failed");
+ return -1;
+ } else {
+ MYSQL_ROW row;
+
+ *list = NULL;
+
+ while ((row = mysql_fetch_row(msql_res)) != NULL) {
+ GMythRecorder *recorder;
+ gint recorder_num = (gint) g_ascii_strtoull (row[0], NULL, 10);
+ GString *hostname = g_string_new (binfo->hostname);
+
+ g_debug ("XXXXXXXXXXXX Recorded found: %d", recorder_num);
+ recorder = gmyth_recorder_new (recorder_num, hostname, binfo->port);
+ if (gmyth_recorder_setup (recorder)) {
+ *list = g_list_append(*list, recorder);
+ } else {
+ g_object_unref (recorder);
+ }
+
+ g_string_free (hostname, TRUE);
+ }
+ }
+
+ return g_list_length (*list);
+}
+
Modified: trunk/gmyth/gmyth/gmyth_remote_util.h
===================================================================
--- trunk/gmyth/gmyth/gmyth_remote_util.h 2008-02-29 19:03:41 UTC (rev 942)
+++ trunk/gmyth/gmyth/gmyth_remote_util.h 2008-03-01 23:15:42 UTC (rev 943)
@@ -28,14 +28,20 @@
#define __REMOTE_UTIL_H__
#include <glib.h>
+
#include "gmyth_recorder.h"
#include "gmyth_socket.h"
+#include "gmyth_backendinfo.h"
G_BEGIN_DECLS
- GMythRecorder * remote_request_next_free_recorder(GMythSocket * socket,
- gint curr);
-gint gmyth_remote_util_get_free_recorder_count(GMythSocket *
- socket);
+GMythRecorder * remote_request_next_free_recorder(GMythSocket *socket,
+ gint curr);
+
+gint gmyth_remote_util_get_free_recorder_count(GMythSocket* socket);
+
+gint gmyth_remote_util_get_recorder_list (GMythBackendInfo* binfo, GList **list);
+
G_END_DECLS
+
#endif
Modified: trunk/gmyth/gmyth/gmyth_scheduler.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_scheduler.c 2008-02-29 19:03:41 UTC (rev 942)
+++ trunk/gmyth/gmyth/gmyth_scheduler.c 2008-03-01 23:15:42 UTC (rev 943)
@@ -39,6 +39,7 @@
#include "gmyth_query.h"
#include "gmyth_socket.h"
#include "gmyth_debug.h"
+#include "gmyth_remote_util.h"
static void gmyth_scheduler_class_init(GMythSchedulerClass * klass);
static void gmyth_scheduler_init(GMythScheduler * object);
@@ -46,6 +47,22 @@
static void gmyth_scheduler_dispose(GObject * object);
static void gmyth_scheduler_finalize(GObject * object);
+
+static gint
+gmyth_scheduler_is_program_live_recorded (GMythScheduler * scheduler,
+ ScheduleInfo *schedule_info,
+ GMythProgramInfo **prog_info);
+static gboolean
+gmyth_scheduler_set_live_record (GMythScheduler * scheduler,
+ ScheduleInfo * schedule_info,
+ gint recorder_num, gboolean enable);
+static gboolean
+gmyth_scheduler_change_record_group (GMythScheduler* scheduler,
+ GMythProgramInfo *prog_info,
+ gchar *new_group);
+
+
+
static gboolean update_backend(GMythScheduler * scheduler, gint record_id);
G_DEFINE_TYPE(GMythScheduler, gmyth_scheduler, G_TYPE_OBJECT)
@@ -491,6 +508,28 @@
return FALSE;
}
+ /*
+ if (!gmyth_query_is_alive (scheduler->msqlquery)) {
+ g_warning ("[%s] MySql connection is not alive", __FUNCTION__);
+ return FALSE;
+ }
+ */
+
+ {
+ /* Before adding the schedule, we need to check if program is been played */
+ GMythProgramInfo *prog_info = NULL;
+ gint recorder_num =
+ gmyth_scheduler_is_program_live_recorded (scheduler, schedule_info,
+ &prog_info);
+ if (recorder_num > 0) {
+ g_debug ("Recording already found in livetv... setting live record");
+ gmyth_scheduler_change_record_group (scheduler, prog_info, "Default");
+
+ return gmyth_scheduler_set_live_record (scheduler, schedule_info,
+ recorder_num, TRUE);
+ }
+ }
+
msql_res =
gmyth_query_process_statement_with_increment(scheduler->msqlquery,
query_str, &rec_id);
@@ -609,6 +648,110 @@
GMYTH_SCHEDULE_ONE_OCCURRENCE);
}
+/** Queries if the given schedule info is currently been recorded by any
+ * backend recorder.
+ * @return The recorder num currently recording the scheduled item, or -1
+ * if program is not been recorded.
+ */
+static gint
+gmyth_scheduler_is_program_live_recorded (GMythScheduler * scheduler,
+ ScheduleInfo *schedule_info,
+ GMythProgramInfo **prog_info)
+{
+ GList *list;
+ gint recorder_num = -1;
+
+ if (gmyth_remote_util_get_recorder_list (scheduler->backend_info, &list) > 0) {
+ GList *iter = list;
+ while (iter) {
+ GMythRecorder *recorder = GMYTH_RECORDER ( iter->data );
+ g_debug ("XXXX verifying the recorder %d", recorder->recorder_num);
+
+ if (gmyth_recorder_is_recording (recorder)) {
+ GMythProgramInfo *pinfo = gmyth_recorder_get_current_program_info (recorder);
+ if (pinfo != NULL) {
+ if ((schedule_info->channel_id == pinfo->channel_id)) {
+ g_debug ("XXXXXX recorder %d is recording the program", recorder->recorder_num);
+ recorder_num = recorder->recorder_num;
+ *prog_info = pinfo;
+ break;
+ }
+ g_object_unref (pinfo);
+ }
+ }
+
+ iter = iter->next;
+ }
+
+ g_list_foreach (list, (GFunc) g_object_unref, NULL);
+ g_list_free (list);
+ }
+
+ return recorder_num;
+
+}
+
+static gboolean
+gmyth_scheduler_set_live_record (GMythScheduler * scheduler,
+ ScheduleInfo * schedule_info,
+ gint recorder_num, gboolean enable)
+{
+ gchar* datastr;
+ GMythSocket *socket;
+ gboolean ret = FALSE;
+ GMythStringList *strlist = gmyth_string_list_new();
+
+ datastr = g_strdup_printf ("QUERY_RECORDER %d", recorder_num);
+ gmyth_string_list_append_char_array (strlist, datastr);
+ gmyth_string_list_append_char_array (strlist, "SET_LIVE_RECORDING");
+ gmyth_string_list_append_int (strlist, enable ? 1 : 0);
+
+ socket = gmyth_backend_info_get_connected_socket (scheduler->backend_info);
+ if (socket != NULL) {
+ g_debug ("XXXX sending command for live recording");
+ ret = (gmyth_socket_sendreceive_stringlist(socket, strlist) > 0);
+ g_object_unref (socket);
+ } else {
+ g_warning("[%s] Connection to backend failed!", __FUNCTION__);
+ }
+
+ g_free(datastr);
+ g_object_unref(strlist);
+ return ret;
+}
+
+static gboolean
+gmyth_scheduler_change_record_group (GMythScheduler* scheduler,
+ GMythProgramInfo *prog_info,
+ gchar *new_group)
+
+{
+ gchar *query_str = NULL;
+ gchar* startts = NULL;
+
+ if (prog_info == NULL) {
+ g_warning ("Scheduler receiver a NULL program info to change its record group");
+ return FALSE;
+ }
+
+ //prog_info->recstartts->tv_sec += 60*60*2;
+ startts = gmyth_util_time_to_string_from_time_val (prog_info->recstartts);
+
+ g_debug ("\n\n%s\n\n", startts);
+ query_str = g_strdup_printf("UPDATE recorded SET recgroup = \"%s\" "
+ "WHERE chanid = \"%d\" AND starttime = \"%s\"",
+ new_group, prog_info->channel_id, startts);
+
+ gmyth_query_process_statement(scheduler->msqlquery, query_str);
+
+ g_free (query_str);
+ g_free (startts);
+
+ return TRUE ;
+}
+
+
+
/** Requests the Mysql database in the backend to remove an existing schedule.
*
* @param scheduler the GMythScheduler instance.
Modified: trunk/gmyth/gmyth/gmyth_util.c
===================================================================
--- trunk/gmyth/gmyth/gmyth_util.c 2008-02-29 19:03:41 UTC (rev 942)
+++ trunk/gmyth/gmyth/gmyth_util.c 2008-03-01 23:15:42 UTC (rev 943)
@@ -255,10 +255,10 @@
* @param time_value the time value to be converted
* @return GString* the converted string
*/
-gchar *
+gchar*
gmyth_util_time_to_string_from_time_val(const GTimeVal * time_val)
{
- gchar *result =
+ gchar *result =
gmyth_util_time_to_isoformat_from_time_val_fmt("%Y-%m-%d %H:%M:%S",
time_val);
@@ -597,7 +597,7 @@
*
* @return a pointer to a GList with all the channels.
*/
-GList *
+GList*
gmyth_util_get_channel_list(GMythBackendInfo * backend_info)
{
GMythRecorder *recorder;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2008-02-29 19:03:57
|
Revision: 942
http://gmyth.svn.sourceforge.net/gmyth/?rev=942&view=rev
Author: renatofilho
Date: 2008-02-29 11:03:41 -0800 (Fri, 29 Feb 2008)
Log Message:
-----------
put back timeout function
Modified Paths:
--------------
trunk/gmyth-stream/gmencoder/src/gmencoder.c
Modified: trunk/gmyth-stream/gmencoder/src/gmencoder.c
===================================================================
--- trunk/gmyth-stream/gmencoder/src/gmencoder.c 2008-02-28 08:10:55 UTC (rev 941)
+++ trunk/gmyth-stream/gmencoder/src/gmencoder.c 2008-02-29 19:03:41 UTC (rev 942)
@@ -708,7 +708,7 @@
if (priv->timeout_id != 0) {
g_source_remove (priv->timeout_id);
}
- //priv->timeout_id = g_timeout_add(GMENCODER_TIMEOUT, _process_timeout_cb, self);
+ priv->timeout_id = g_timeout_add(GMENCODER_TIMEOUT, _process_timeout_cb, self);
}
void
@@ -1237,6 +1237,8 @@
priv->timeout_id = 0;
}
+ priv->timeout_id = g_timeout_add(GMENCODER_TIMEOUT, _process_timeout_cb, user_data);
+
if (priv->send_chunked) {
if (_send_buffer (priv->handle, GST_BUFFER_DATA (buff), GST_BUFFER_SIZE (buff)) == FALSE)
goto error;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-02-28 08:10:50
|
Revision: 941
http://gmyth.svn.sourceforge.net/gmyth/?rev=941&view=rev
Author: melunko
Date: 2008-02-28 00:10:55 -0800 (Thu, 28 Feb 2008)
Log Message:
-----------
gmyth-dbus-server mysql connection timeout increased to 10seconds
Modified Paths:
--------------
trunk/gmyth-dbus/src/gmyth-dbus-server.c
Modified: trunk/gmyth-dbus/src/gmyth-dbus-server.c
===================================================================
--- trunk/gmyth-dbus/src/gmyth-dbus-server.c 2008-02-27 11:00:07 UTC (rev 940)
+++ trunk/gmyth-dbus/src/gmyth-dbus-server.c 2008-02-28 08:10:55 UTC (rev 941)
@@ -1309,7 +1309,7 @@
binfo = gmyth_backend_info_new_full (host, user, password, MYTH_DEFAULT_DB, port);
- ret = gmyth_query_connect_with_timeout (query, binfo, 2 /*seconds*/);
+ ret = gmyth_query_connect_with_timeout (query, binfo, 10 /*seconds*/);
gmyth_query_disconnect (query);
g_object_unref (query);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-02-27 11:00:11
|
Revision: 940
http://gmyth.svn.sourceforge.net/gmyth/?rev=940&view=rev
Author: melunko
Date: 2008-02-27 03:00:07 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
Fixed Renato e-mail address in the copyright
Modified Paths:
--------------
trunk/gmyth-stream/gmencoder/README
trunk/gmyth-stream/gmencoder/src/gmencoder.c
trunk/gmyth-stream/gmencoder/src/gmencoder.h
trunk/gmyth-stream/gmencoder/src/main.c
Modified: trunk/gmyth-stream/gmencoder/README
===================================================================
--- trunk/gmyth-stream/gmencoder/README 2008-02-26 14:10:22 UTC (rev 939)
+++ trunk/gmyth-stream/gmencoder/README 2008-02-27 11:00:07 UTC (rev 940)
@@ -1,7 +1,7 @@
General Information
===================
-This is GMencoder version 0.1. GMencoder is a media transcode tool,
+This is GMencoder version 0.1. GMencoder is a media transcode tool
based on GStreamer elements.
GMencoder is free software, licensed under the GNU GPL.
Modified: trunk/gmyth-stream/gmencoder/src/gmencoder.c
===================================================================
--- trunk/gmyth-stream/gmencoder/src/gmencoder.c 2008-02-26 14:10:22 UTC (rev 939)
+++ trunk/gmyth-stream/gmencoder/src/gmencoder.c 2008-02-27 11:00:07 UTC (rev 940)
@@ -1,7 +1,7 @@
/*
* arch-tag: Implementation gmencoder engine
*
- * Copyright (C) 2007 INdT - Renato Filho <ren...@in...>
+ * Copyright (C) 2007 INdT - Renato Filho <ren...@in...>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: trunk/gmyth-stream/gmencoder/src/gmencoder.h
===================================================================
--- trunk/gmyth-stream/gmencoder/src/gmencoder.h 2008-02-26 14:10:22 UTC (rev 939)
+++ trunk/gmyth-stream/gmencoder/src/gmencoder.h 2008-02-27 11:00:07 UTC (rev 940)
@@ -1,7 +1,7 @@
/*
* arch-tag: Header for gmencoder engine
*
- * Copyright (C) 2007 INdT - Renato Filho <ren...@in...>
+ * Copyright (C) 2007 INdT - Renato Filho <ren...@in...>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: trunk/gmyth-stream/gmencoder/src/main.c
===================================================================
--- trunk/gmyth-stream/gmencoder/src/main.c 2008-02-26 14:10:22 UTC (rev 939)
+++ trunk/gmyth-stream/gmencoder/src/main.c 2008-02-27 11:00:07 UTC (rev 940)
@@ -1,7 +1,7 @@
/*
* arch-tag: GMencoder main file
*
- * Copyright (C) 2007 INdT - Renato Filho <ren...@in...>
+ * Copyright (C) 2007 INdT - Renato Filho <ren...@in...>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2008-02-26 14:10:25
|
Revision: 939
http://gmyth.svn.sourceforge.net/gmyth/?rev=939&view=rev
Author: renatofilho
Date: 2008-02-26 06:10:22 -0800 (Tue, 26 Feb 2008)
Log Message:
-----------
- release 26/02/2008 - 0.7.1
Modified Paths:
--------------
trunk/gmyth/autogen.sh
trunk/gmyth/configure.ac
trunk/gmyth-dbus/Makefile.am
trunk/gmyth-dbus/autogen.sh
trunk/gmyth-dbus/configure.ac
trunk/gmyth-stream/gmencoder/configure.ac
trunk/gmyth-stream/server/setup.py
trunk/gmyth-upnp/configure.ac
trunk/packages/gmencoder-debian/changelog
trunk/packages/gms-debian/changelog
trunk/packages/gmyth-debian/changelog
trunk/packages/gst-debian/changelog
Modified: trunk/gmyth/autogen.sh
===================================================================
--- trunk/gmyth/autogen.sh 2008-02-25 18:40:34 UTC (rev 938)
+++ trunk/gmyth/autogen.sh 2008-02-26 14:10:22 UTC (rev 939)
@@ -16,4 +16,4 @@
echo "You need to install gnome-common from the GNOME CVS"
exit 1
}
-REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 . gnome-autogen.sh -I./m4
+REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 . gnome-autogen.sh
Modified: trunk/gmyth/configure.ac
===================================================================
--- trunk/gmyth/configure.ac 2008-02-25 18:40:34 UTC (rev 938)
+++ trunk/gmyth/configure.ac 2008-02-26 14:10:22 UTC (rev 939)
@@ -1,4 +1,4 @@
-AC_INIT(gmyth, 0.7.0)
+AC_INIT(gmyth, 0.7.1)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.ac)
AC_CANONICAL_BUILD
Modified: trunk/gmyth-dbus/Makefile.am
===================================================================
--- trunk/gmyth-dbus/Makefile.am 2008-02-25 18:40:34 UTC (rev 938)
+++ trunk/gmyth-dbus/Makefile.am 2008-02-26 14:10:22 UTC (rev 939)
@@ -1,7 +1,8 @@
SUBDIRS = src data
-EXTRA_DIST = \
- ChangeLog
-
-DIST_SUBDIRS = \
- src data
+EXTRA_DIST = \
+ autogen.sh \
+ AUTHORS \
+ COPYING \
+ README
+
Modified: trunk/gmyth-dbus/autogen.sh
===================================================================
--- trunk/gmyth-dbus/autogen.sh 2008-02-25 18:40:34 UTC (rev 938)
+++ trunk/gmyth-dbus/autogen.sh 2008-02-26 14:10:22 UTC (rev 939)
@@ -16,4 +16,4 @@
echo "You need to install gnome-common from the GNOME CVS"
exit 1
}
-REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 . gnome-autogen.sh
+REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 . gnome-autogen.sh -I./m4
Modified: trunk/gmyth-dbus/configure.ac
===================================================================
--- trunk/gmyth-dbus/configure.ac 2008-02-25 18:40:34 UTC (rev 938)
+++ trunk/gmyth-dbus/configure.ac 2008-02-26 14:10:22 UTC (rev 939)
@@ -1,49 +1,23 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
+AC_INIT(gmyth-dbus,0.7.0)
+AC_PREREQ(2.52)
+AC_CONFIG_SRCDIR(configure.ac)
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_ISC_POSIX
-AC_PREREQ(2.50)
+AM_INIT_AUTOMAKE(1.6 dist-bzip2)
+AM_CONFIG_HEADER(config.h)
-AC_INIT([gmyth-dbus],[0.7])
-
-AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_HEADER(config.h)
-
-dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
-AM_MAINTAINER_MODE
dnl make aclocal work in maintainer mode
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-
-# Checks for programs.
-# check for tools
-# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
-CFLAGS="$CFLAGS -Wall"
+C_PROG_CXX
AC_PROG_CC
-AC_PROG_LIBTOOL
-
-# Checks for libraries.
-
-# Checks for header files.
+AM_PROG_CC_STDC
AC_HEADER_STDC
+AC_C_BIGENDIAN
+AC_C_CONST
-#Test if --disable-debug given
-AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--disable-debug], [enable debugging mode]))
-if test x"$enable_debug" != xno; then
- CFLAGS="$CFLAGS -g -DMYTH_STREAM_USE_DEBUG"
-else
- CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
-fi
-
-
-AS_AC_EXPAND(DATADIR, $datadir)
-
-DBUS_SERVICES_DIR="$DATADIR/dbus-1/services"
-AC_SUBST(DBUS_SERVICES_DIR)
-AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for DBUS is])
-
-
# Checks required packages ####################################################
###############################################################################
@@ -76,15 +50,9 @@
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
-AC_OUTPUT([
+AC_OUTPUT(
Makefile
src/Makefile
data/Makefile
data/br.org.indt.GMyth.service
-])
-
-if test "x$enable_debug" != "xno"; then
- AC_MSG_NOTICE([Debug: Enabled])
-else
- AC_MSG_NOTICE([Debug: Disabled])
-fi
+)
Modified: trunk/gmyth-stream/gmencoder/configure.ac
===================================================================
--- trunk/gmyth-stream/gmencoder/configure.ac 2008-02-25 18:40:34 UTC (rev 938)
+++ trunk/gmyth-stream/gmencoder/configure.ac 2008-02-26 14:10:22 UTC (rev 939)
@@ -3,7 +3,7 @@
AC_PREREQ(2.50)
-AC_INIT([gmemcoder],[0.1])
+AC_INIT([gmemcoder],[0.7.1])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER(config.h)
Modified: trunk/gmyth-stream/server/setup.py
===================================================================
--- trunk/gmyth-stream/server/setup.py 2008-02-25 18:40:34 UTC (rev 938)
+++ trunk/gmyth-stream/server/setup.py 2008-02-26 14:10:22 UTC (rev 939)
@@ -2,9 +2,9 @@
from glob import glob
setup(name='gms',
- version='0.6',
- description='carman rich view package',
- long_description='carman rich view (SDL based) package',
+ version='0.7.1',
+ description='GMyth Transcode server',
+ long_description='GMyth Transcode server',
url='http://www.indt.org.br',
scripts=['gms.py'],
package_dir={'lib': 'lib', 'plugins' : 'plugins','data' : 'data' },
Modified: trunk/gmyth-upnp/configure.ac
===================================================================
--- trunk/gmyth-upnp/configure.ac 2008-02-25 18:40:34 UTC (rev 938)
+++ trunk/gmyth-upnp/configure.ac 2008-02-26 14:10:22 UTC (rev 939)
@@ -1,4 +1,4 @@
-AC_INIT(gmyth-upnp, 0.7.0)
+AC_INIT(gmyth-upnp, 0.7.1)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.ac)
AC_CANONICAL_BUILD
Modified: trunk/packages/gmencoder-debian/changelog
===================================================================
--- trunk/packages/gmencoder-debian/changelog 2008-02-25 18:40:34 UTC (rev 938)
+++ trunk/packages/gmencoder-debian/changelog 2008-02-26 14:10:22 UTC (rev 939)
@@ -1,3 +1,9 @@
+gmencoder (0.7.1-indt1) gutsy; urgency=low
+
+ * release 02/26/2008
+
+ -- Renato Filho <ren...@in...> Fri, 26 Feb 2008 11:01:00 -0300
+
gmencoder (0.7-indt1) gutsy; urgency=low
* Updated to same gmyth Release 0.7
Modified: trunk/packages/gms-debian/changelog
===================================================================
--- trunk/packages/gms-debian/changelog 2008-02-25 18:40:34 UTC (rev 938)
+++ trunk/packages/gms-debian/changelog 2008-02-26 14:10:22 UTC (rev 939)
@@ -1,3 +1,9 @@
+gms (0.7.1-indt1) gutsy; urgency=low
+
+ * release 02/26/2008
+
+ -- Renato Filho <ren...@in...> Fri, 26 Feb 2008 11:04:00 -0300
+
gms (0.7-indt1) gutsy; urgency=low
* Updated to same gmyth Release 0.7
Modified: trunk/packages/gmyth-debian/changelog
===================================================================
--- trunk/packages/gmyth-debian/changelog 2008-02-25 18:40:34 UTC (rev 938)
+++ trunk/packages/gmyth-debian/changelog 2008-02-26 14:10:22 UTC (rev 939)
@@ -1,3 +1,9 @@
+gmyth (0.7.1-indt1) gutsy; urgency=low
+
+ * Release 0.7.1
+
+ -- Renato Araujo <ren...@in...> Fri, 26 Feb 2008 10:52:08 -0300
+
gmyth (0.7-indt1) gutsy; urgency=low
* Release 0.7
Modified: trunk/packages/gst-debian/changelog
===================================================================
--- trunk/packages/gst-debian/changelog 2008-02-25 18:40:34 UTC (rev 938)
+++ trunk/packages/gst-debian/changelog 2008-02-26 14:10:22 UTC (rev 939)
@@ -1,3 +1,9 @@
+gstreamer0.10-indt-plugins (0.10.14-svn20080226) gutsy; urgency=low
+
+ * Relase 02/26/2007;
+
+ -- Renato Araujo Oliveira Filho <ren...@in...> Mon, 26 Feb 2008 10:57:00 -0300
+
gstreamer0.10-indt-plugins (0.10.14-svn20080107) gutsy; urgency=low
* Relase 01/07/2007;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2008-02-25 18:41:53
|
Revision: 938
http://gmyth.svn.sourceforge.net/gmyth/?rev=938&view=rev
Author: renatofilho
Date: 2008-02-25 10:40:34 -0800 (Mon, 25 Feb 2008)
Log Message:
-----------
fixed autotools scripts
Modified Paths:
--------------
trunk/gmyth-upnp/Makefile.am
trunk/gmyth-upnp/configure.ac
trunk/gmyth-upnp/gmyth-upnp.pc.in
Modified: trunk/gmyth-upnp/Makefile.am
===================================================================
--- trunk/gmyth-upnp/Makefile.am 2008-02-25 18:11:02 UTC (rev 937)
+++ trunk/gmyth-upnp/Makefile.am 2008-02-25 18:40:34 UTC (rev 938)
@@ -1,21 +1,12 @@
SUBDIRS= src tests
-### all of the standard pc files we need to generate
-pcfiles = gmyth-upnp.pc
-
-all-local: $(pcfiles)
-
-### how to generate pc files
-%.pc: %.pc
- cp $< $@
-
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = $(pcfiles)
+pkgconfig_DATA = gmyth-upnp.pc
-EXTRA_DIST = \
- autogen.sh \
- gmyth-upnp.pc.in \
- AUTHORS \
- COPYING \
- README
+EXTRA_DIST = \
+ autogen.sh \
+ gmyth-upnp.pc.in \
+ AUTHORS \
+ COPYING \
+ README
Modified: trunk/gmyth-upnp/configure.ac
===================================================================
--- trunk/gmyth-upnp/configure.ac 2008-02-25 18:11:02 UTC (rev 937)
+++ trunk/gmyth-upnp/configure.ac 2008-02-25 18:40:34 UTC (rev 938)
@@ -1,82 +1,29 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
+AC_INIT(gmyth-upnp, 0.7.0)
+AC_PREREQ(2.52)
+AC_CONFIG_SRCDIR(configure.ac)
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_ISC_POSIX
-AC_PREREQ(2.50)
+AM_INIT_AUTOMAKE(1.6 dist-bzip2)
+AM_CONFIG_HEADER(config.h)
-AC_INIT([gmyth-upnp],[0.7.1])
-
-AC_CONFIG_SRCDIR([src/gmyth_upnp.c])
-AC_CONFIG_HEADER(config.h)
-
-dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
-AM_MAINTAINER_MODE
dnl make aclocal work in maintainer mode
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
-# Checks for programs.
-# check for tools
-# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
-CFLAGS="$CFLAGS -Wall"
+AC_PROG_CXX
AC_PROG_CC
-AC_PROG_LIBTOOL
-
-# Checks for libraries.
-
-# Check for pkgconfig
-AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
-# Give error and exit if we don't have pkgconfig
-if test "x$HAVE_PKGCONFIG" = "xno"; then
- AC_MSG_ERROR(you need to have pkgconfig installed !)
-fi
-
-# Checks for header files.
+AM_PROG_CC_STDC
AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
-
-# Checks for typedefs, structures, and compiler characteristics.
+AC_C_BIGENDIAN
AC_C_CONST
-AC_TYPE_PID_T
-AC_STRUCT_TM
-AC_HEADER_TIME
-AC_HEADER_STDBOOL
-# Checks for library functions.
-AC_FUNC_FORK
-AC_FUNC_STRFTIME
-AC_FUNC_SELECT_ARGTYPES
-AC_PROG_GCC_TRADITIONAL
-AC_FUNC_MALLOC
-AC_FUNC_MKTIME
-AC_FUNC_STRFTIME
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([memset socket stime strstr strtoul gethostname inet_ntoa localtime_r select strrchr localtime strptime])
+AC_LIBTOOL_WIN32_DLL
+define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
+AC_PROG_LIBTOOL
-##############################
-# Checks for Network functions
-##############################
-
-AC_CHECK_FUNCS([socket])
-AC_CHECK_FUNCS([inet_ntoa])
-AC_CHECK_HEADERS([ifaddrs.h])
-AC_CHECK_FUNCS([getifaddrs])
-AC_CHECK_FUNCS([time])
-
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-
-CFLAGS="$CFLAGS -I/usr/include"
-LDFLAGS="$LDFLAGS -L/usr/lib"
-
# Checks required packages
-dnl Test if --disable-debug given
-AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--disable-debug], [enable debugging mode]))
-if test x"$enable_debug" != xno; then
- CFLAGS="$CFLAGS -g -DGMYTH_USE_DEBUG"
-else
- CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
-fi
-
# Check for Glib2.0
PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
@@ -115,7 +62,6 @@
AC_SUBST(LIBGMYTH_CFLAGS)
AC_SUBST(LIBGMYTH_LIBS)
-dnl ========== Check for Cyberlink UPnP Libraries
PKG_CHECK_MODULES(LIBUPNP, libupnp, HAVE_LIBUPNP=yes, HAVE_LIBUPNP=no)
if test "x$HAVE_LIBUPNP" = "xno"; then
@@ -130,10 +76,3 @@
src/Makefile
tests/Makefile
gmyth-upnp.pc])
-
-if test "x$enable_debug" != "xno"; then
- AC_MSG_NOTICE([Debug: Enabled])
-else
- AC_MSG_NOTICE([Debug: Disabled])
-fi
-
Modified: trunk/gmyth-upnp/gmyth-upnp.pc.in
===================================================================
--- trunk/gmyth-upnp/gmyth-upnp.pc.in 2008-02-25 18:11:02 UTC (rev 937)
+++ trunk/gmyth-upnp/gmyth-upnp.pc.in 2008-02-25 18:40:34 UTC (rev 938)
@@ -5,8 +5,8 @@
Name: gmyth-upnp
Description: Myth TV upnp library based upon GLib/GObject paradigm
-Version: 0.7.1
-Requires: gobject-2.0 glib-2.0 libupnp
+Version: @VERSION@
+Requires: gobject-2.0 glib-2.0 libupnp gmyth
-Libs: @LIBGMYTH_LIBS@ -L${libdir} -lgmythupnp
-Cflags: @LIBGMYTH_CFLAGS@ -I${includedir}/gmyth-upnp
+Libs: -L${libdir} -lgmythupnp
+Cflags: -I${includedir}/gmyth-upnp
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2008-02-25 18:11:53
|
Revision: 937
http://gmyth.svn.sourceforge.net/gmyth/?rev=937&view=rev
Author: renatofilho
Date: 2008-02-25 10:11:02 -0800 (Mon, 25 Feb 2008)
Log Message:
-----------
fixed project name on autogen.sh
Modified Paths:
--------------
trunk/gmyth/autogen.sh
Modified: trunk/gmyth/autogen.sh
===================================================================
--- trunk/gmyth/autogen.sh 2008-02-25 18:09:36 UTC (rev 936)
+++ trunk/gmyth/autogen.sh 2008-02-25 18:11:02 UTC (rev 937)
@@ -4,7 +4,7 @@
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
-PKG_NAME="gmythdbus"
+PKG_NAME="gmyth"
(test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2008-02-25 18:10:26
|
Revision: 936
http://gmyth.svn.sourceforge.net/gmyth/?rev=936&view=rev
Author: renatofilho
Date: 2008-02-25 10:09:36 -0800 (Mon, 25 Feb 2008)
Log Message:
-----------
fixed autotools scripst
Modified Paths:
--------------
trunk/gmyth/Makefile.am
trunk/gmyth/autogen.sh
trunk/gmyth/configure.ac
trunk/gmyth/m4/Makefile.am
Removed Paths:
-------------
trunk/gmyth/common/
Modified: trunk/gmyth/Makefile.am
===================================================================
--- trunk/gmyth/Makefile.am 2008-02-25 18:04:30 UTC (rev 935)
+++ trunk/gmyth/Makefile.am 2008-02-25 18:09:36 UTC (rev 936)
@@ -1,4 +1,5 @@
SUBDIRS= gmyth samples tests
+DIST_SUBDIRS= m4 gmyth samples tests
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gmyth.pc
Modified: trunk/gmyth/autogen.sh
===================================================================
--- trunk/gmyth/autogen.sh 2008-02-25 18:04:30 UTC (rev 935)
+++ trunk/gmyth/autogen.sh 2008-02-25 18:09:36 UTC (rev 936)
@@ -1,102 +1,19 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
-DIE=0
-package=gmyth
-srcfile=configure.ac
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
-# a quick cvs co if necessary to alleviate the pain - may remove this
-# when developers get a clue ;)
-if test ! -d common;
-then
- echo "+ getting common/ from svn"
- svn co common
-fi
+PKG_NAME="gmythdbus"
-# source helper functions
-if test ! -f common/autogen-helper.sh;
-then
- echo There is something wrong with your source tree.
- echo You are missing common/autogen-helper.sh
- exit 1
-fi
-. common/autogen-helper.sh
-
-CONFIGURE_DEF_OPT='--enable-maintainer-mode'
-# uncomment below to disable the UPnP features
-CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --disable-upnp"
-CONFIGURE_EXT_OPT="$@"
-
-autogen_options
-
-echo -n "+ check for build tools"
-if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi
-version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53" \
- "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 53 || DIE=1
-version_check "automake" "$AUTOMAKE automake automake-1.9 automake-1.8 automake-1.7 automake-1.6" \
- "ftp://ftp.gnu.org/pub/gnu/automake/" 1 6 || DIE=1
-version_check "libtoolize" "$LIBTOOLIZE libtoolize" \
- "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
-version_check "pkg-config" "" \
- "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
-
-die_check $DIE
-
-aclocal_check || DIE=1
-autoheader_check || DIE=1
-
-die_check $DIE
-
-# if no arguments specified then this will be printed
-if test -z "$*"; then
- echo "+ checking for autogen.sh options"
- echo " This autogen script will automatically run ./configure as:"
- echo " ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT"
- echo " To pass any additional options, please specify them on the $0"
- echo " command line."
-fi
-
-toplevel_check $srcfile
-
-tool_run "$aclocal" "-I m4 $ACLOCAL_FLAGS"
-tool_run "$libtoolize" "--copy --force"
-tool_run "$autoheader"
-
-# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
-echo timestamp > stamp-h.in 2> /dev/null
-
-tool_run "$autoconf"
-tool_run "$automake" "-a -c"
-
-# if enable exists, add an -enable option for each of the lines in that file
-if test -f enable; then
- for a in `cat enable`; do
- CONFIGURE_FILE_OPT="--enable-$a"
- done
-fi
-
-# if disable exists, add an -disable option for each of the lines in that file
-if test -f disable; then
- for a in `cat disable`; do
- CONFIGURE_FILE_OPT="$CONFIGURE_FILE_OPT --disable-$a"
- done
-fi
-
-test -n "$NOCONFIGURE" && {
- echo "+ skipping configure stage for package $package, as requested."
- echo "+ autogen.sh done."
- exit 0
+(test -f $srcdir/configure.ac) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level $PKG_NAME directory"
+ exit 1
}
-echo "+ running configure ... "
-test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
-test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
-test ! -z "$CONFIGURE_FILE_OPT" && echo " ./configure enable/disable flags: $CONFIGURE_FILE_OPT"
-echo
-
-./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
- echo " configure failed"
- exit 1
+which gnome-autogen.sh || {
+ echo "You need to install gnome-common from the GNOME CVS"
+ exit 1
}
-
-echo "Now type 'make' to compile $package."
+REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 . gnome-autogen.sh -I./m4
Modified: trunk/gmyth/configure.ac
===================================================================
--- trunk/gmyth/configure.ac 2008-02-25 18:04:30 UTC (rev 935)
+++ trunk/gmyth/configure.ac 2008-02-25 18:09:36 UTC (rev 936)
@@ -121,6 +121,7 @@
AC_OUTPUT(
Makefile
+m4/Makefile
gmyth/Makefile
samples/Makefile
tests/Makefile
Modified: trunk/gmyth/m4/Makefile.am
===================================================================
--- trunk/gmyth/m4/Makefile.am 2008-02-25 18:04:30 UTC (rev 935)
+++ trunk/gmyth/m4/Makefile.am 2008-02-25 18:09:36 UTC (rev 936)
@@ -1,10 +1,5 @@
-SUBDIRS= src pixmaps
-
-include aminclude.am
-
-EXTRA_DIST = \
- autogen.sh \
- AUTHORS \
- COPYING \
- README
-
+EXTRA_DIST = \
+ ac_doxygen.m4 \
+ as-compiler-flag.m4 \
+ as-expand.m4 \
+ as-version.m4
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2008-02-25 17:45:42
|
Revision: 933
http://gmyth.svn.sourceforge.net/gmyth/?rev=933&view=rev
Author: renatofilho
Date: 2008-02-25 09:45:36 -0800 (Mon, 25 Feb 2008)
Log Message:
-----------
fixed autotools script. patch by Andre Moreira <and...@gm...>
Modified Paths:
--------------
trunk/gmyth/Makefile.am
trunk/gmyth/configure.ac
trunk/gmyth/src/Makefile.am
trunk/gmyth/tests/Makefile.am
Modified: trunk/gmyth/Makefile.am
===================================================================
--- trunk/gmyth/Makefile.am 2008-02-25 14:14:29 UTC (rev 932)
+++ trunk/gmyth/Makefile.am 2008-02-25 17:45:36 UTC (rev 933)
@@ -1,31 +1,11 @@
SUBDIRS= src samples tests
-### all of the standard pc files we need to generate
-#pcfiles = gmyth-@GMYTH_MAJORMINOR@.pc
-pcfiles = gmyth.pc
-
-all-local: $(pcfiles)
-
-### how to generate pc files
-#%-@GMYTH_MAJORMINOR@.pc: %.pc
-# cp $< $@
-
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = $(pcfiles)
+pkgconfig_DATA = gmyth.pc
-if HAVE_INDENT
-indent:
- cd src; \
- make indent; \
- cd ..
-endif
-
-include aminclude.am
-
-EXTRA_DIST = \
- autogen.sh \
- gmyth.pc.in \
- AUTHORS \
- COPYING \
- README
-
+EXTRA_DIST = \
+ autogen.sh \
+ gmyth.pc.in \
+ AUTHORS \
+ COPYING \
+ README
Modified: trunk/gmyth/configure.ac
===================================================================
--- trunk/gmyth/configure.ac 2008-02-25 14:14:29 UTC (rev 932)
+++ trunk/gmyth/configure.ac 2008-02-25 17:45:36 UTC (rev 933)
@@ -1,154 +1,47 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
+AC_INIT(gmyth, 0.7.0)
+AC_PREREQ(2.52)
+AC_CONFIG_SRCDIR(configure.ac)
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_ISC_POSIX
-AC_PREREQ(2.50)
+AM_INIT_AUTOMAKE(1.6 dist-bzip2)
+AM_CONFIG_HEADER(config.h)
-AC_INIT([gmyth],[0.7.0])
-
-AC_CONFIG_SRCDIR([src/gmyth.h])
-AC_CONFIG_HEADER(config.h)
-
-dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
-AM_MAINTAINER_MODE
dnl make aclocal work in maintainer mode
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
-# Checks for programs.
-# check for tools
-# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
-CFLAGS="$CFLAGS -Wall"
+AC_PROG_CXX
AC_PROG_CC
-AC_PROG_LIBTOOL
-
-dnl Generate doxygen documentation
-DX_HTML_FEATURE(ON)
-DX_CHM_FEATURE(OFF)
-DX_CHI_FEATURE(OFF)
-DX_MAN_FEATURE(OFF)
-DX_RTF_FEATURE(OFF)
-DX_XML_FEATURE(OFF)
-DX_PDF_FEATURE(OFF)
-DX_PS_FEATURE(OFF)
-DX_INIT_DOXYGEN(gmyth, doxygen.cfg, docs)
-
-
-# Checks for libraries.
-
-# Checks for header files.
+AM_PROG_CC_STDC
AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
-
-# Checks for typedefs, structures, and compiler characteristics.
+AC_C_BIGENDIAN
AC_C_CONST
-AC_TYPE_PID_T
-AC_STRUCT_TM
-AC_HEADER_TIME
-AC_HEADER_STDBOOL
-# Checks for library functions.
-AC_FUNC_FORK
-AC_FUNC_STRFTIME
-AC_FUNC_SELECT_ARGTYPES
-AC_PROG_GCC_TRADITIONAL
-AC_FUNC_MALLOC
-AC_FUNC_MKTIME
-AC_FUNC_STRFTIME
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([memset socket stime strstr strtoul gethostname inet_ntoa localtime_r select strrchr localtime strptime])
+AC_LIBTOOL_WIN32_DLL
+define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
+AC_PROG_LIBTOOL
-##############################
-# Checks for Network functions
-##############################
-
-AC_CHECK_FUNCS([socket])
-AC_CHECK_FUNCS([inet_ntoa])
-AC_CHECK_HEADERS([ifaddrs.h])
-AC_CHECK_FUNCS([getifaddrs])
-AC_CHECK_FUNCS([time])
-
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-
-CFLAGS="$CFLAGS -I/usr/include"
-LDFLAGS="$LDFLAGS -L/usr/lib"
-
-# Checks required packages
-
dnl Test if --enable-debug given
AC_ARG_ENABLE(debug,
- [AC_HELP_STRING([--enable-debug], [enable debugging mode])],
+ AC_HELP_STRING([--enable-debug], [enable debugging mode]),
enable_debug="$enableval",
enable_debug=no)
if test "x$enable_debug" = "xyes" ; then
- AC_DEFINE(GMYTH_USE_DEBUG, 1, [Debug enabled!])
- CFLAGS="$CFLAGS -g -DGMYTH_USE_DEBUG"
+ AC_DEFINE(GMYTH_USE_DEBUG, 1, [Debug enabled!])
+ CFLAGS="$CFLAGS -Wall -O0 -g -DGMYTH_USE_DEBUG"
else
- CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
+ CFLAGS="$CFLAGS -Wall -O2"
fi
AM_CONDITIONAL(GMYTH_USE_DEBUG, test "x$enable_debug" = "xyes")
-AC_ARG_ENABLE(coverage,
- AS_HELP_STRING([--enable-coverage],
- [enable coverage (default = no)]),
- [
- if test $enableval = no; then
- USE_COVERAGE=no;
- else
- USE_COVERAGE=yes;
- fi
- ],[
- USE_COVERAGE=no;
- ]
-)
-
-if [ test $USE_COVERAGE = yes ]; then
- CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage -O0"
- LDFLAGS="$LDFLAGS -lgcov"
-fi
-
-AC_ARG_ENABLE(mudflap-debug,
- AS_HELP_STRING([--enable-mudflap-debug],
- [enable libmudflap debug (default = no)]),
- [
- if test $enableval = no; then
- USE_MUDFLAP_DEBUG=no;
- else
- USE_MUDFLAP_DEBUG=yes;
- fi
- ],[
- USE_MUDFLAP_DEBUG=no;
- ]
-)
-
-if [ test $USE_MUDFLAP_DEBUG = yes ]; then
- CFLAGS="$CFLAGS -fmudflap -fmudflapth -O0"
- LDFLAGS="$LDFLAGS -lmudflapth"
-fi
-
-AC_ARG_ENABLE(profiling,
- AS_HELP_STRING([--enable-profiling],
- [enable GNU profiling (default = no)]),
- [
- if test $enableval = no; then
- USE_PROFILING=no;
- else
- USE_PROFILING=yes;
- fi
- ],[
- USE_PROFILING=no;
- ]
-)
-
-if [ test $USE_PROFILING = yes ]; then
- CFLAGS="$CFLAGS -pg"
-fi
-
# Check for pkgconfig
AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
# Give error and exit if we don't have pkgconfig
if test "x$HAVE_PKGCONFIG" = "xno"; then
- AC_MSG_ERROR(you need to have pkgconfig installed !)
+ AC_MSG_ERROR(you need to have pkgconfig installed !)
fi
# Check for Glib2.0
@@ -156,7 +49,7 @@
# Give error and exit if we don't have glib
if test "x$HAVE_GLIB" = "xno"; then
- AC_MSG_ERROR(you need glib-2.0 installed)
+ AC_MSG_ERROR(you need glib-2.0 installed)
fi
# make GLIB_CFLAGS and GLIB_LIBS available
@@ -165,12 +58,12 @@
# Check for GObject2.0
PKG_CHECK_MODULES(GOBJECT,
- gobject-2.0,
- HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
+ gobject-2.0,
+ HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
# Give error and exit if we don't have gobject
if test "x$HAVE_GOBJECT" = "xno"; then
- AC_MSG_ERROR(you need gobject-2.0 installed)
+ AC_MSG_ERROR(you need gobject-2.0 installed)
fi
# make GOBJECT_CFLAGS and GOBJECT_LIBS available
@@ -182,7 +75,7 @@
# Give error and exit if we don't have glib
if test "x$HAVE_GTHREAD" = "xno"; then
- AC_MSG_ERROR(you need gthread+-2.0 installed)
+ AC_MSG_ERROR(you need gthread+-2.0 installed)
fi
# make GTHREAD_CFLAGS and GTHREAD_LIBS available
@@ -194,7 +87,7 @@
# Give error and exit if we don't have libxml
if test "x$HAVE_LIBXML" = "xno"; then
- AC_MSG_ERROR(you need libxml-2.0 installed)
+ AC_MSG_ERROR(you need libxml-2.0 installed)
fi
# make LIBXML_CFLAGS and LIBXML_LIBS available
@@ -206,16 +99,14 @@
# Give error and exit if we don't have libcurl
if test "x$HAVE_LIBCURL" = "xno"; then
- AC_MSG_ERROR(you need libcurl installed)
+ AC_MSG_ERROR(you need libcurl installed)
fi
# make LIBCURL_CFLAGS and LIBCURL_LIBS available
AC_SUBST(LIBCURL_CFLAGS)
AC_SUBST(LIBCURL_LIBS)
-#
-# mysql libraries
-#
+# check for mysql
AC_CHECK_PROG(MYSQL_CFLAGS,mysql_config,`mysql_config --cflags`)
if test -z "$MYSQL_CFLAGS"; then
AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
@@ -228,55 +119,15 @@
fi
AC_SUBST(MYSQL_LIBS)
-#dnl Enable gtk-doc
-#GTK_DOC_CHECK(1.4)
-
-# checks if the indent tool can be found
-AC_CHECK_PROG(HAVE_INDENT, indent, [Found!])
-if test -n "$HAVE_INDENT"; then
- AC_DEFINE(HAVE_INDENT, 1, [AutoIndent found!])
-fi
-
-AM_CONDITIONAL(HAVE_INDENT, test -n "$HAVE_INDENT")
-
-# checks if the gprof tool can be found
-AC_CHECK_PROG(HAVE_GPROF, gprof, [Found!])
-if test -n "$HAVE_GPROF"; then
- AC_DEFINE(HAVE_GPROF, 1, [Gnu Profiling tool found!])
-fi
-
-AM_CONDITIONAL(HAVE_GPROF, test -n "$HAVE_GPROF")
-
-# checks if the gcov tool can be found
-AC_CHECK_PROG(HAVE_GCOV, gcov, [Found!])
-if test -n "$HAVE_GCOV"; then
- AC_DEFINE(HAVE_GCOV, 1, [Gnu Coverage tool found!])
-fi
-
-AM_CONDITIONAL(HAVE_GCOV, test -n "$HAVE_GCOV")
-
-# checks if the genhtml tool can be found
-AC_CHECK_PROG(HAVE_GENHTML, genhtml, [Found!])
-if test -n "$HAVE_GENHTML"; then
- AC_DEFINE(HAVE_GENHTML, 1, [Gnu Coverage HTML report generator found!])
-fi
-
-AM_CONDITIONAL(HAVE_GENHTML, test -n "$HAVE_GENHTML")
-
-AC_SUBST(CFLAGS)
-AC_SUBST(LDFLAGS)
-AC_SUBST(LIBS)
-
-AC_OUTPUT([
+AC_OUTPUT(
Makefile
src/Makefile
samples/Makefile
tests/Makefile
-gmyth.pc])
+gmyth.pc)
if test "x$enable_debug" != "xno"; then
- AC_MSG_NOTICE([Debug: Enabled])
+ AC_MSG_NOTICE([Debug: Enabled])
else
- AC_MSG_NOTICE([Debug: Disabled])
+ AC_MSG_NOTICE([Debug: Disabled])
fi
-
Modified: trunk/gmyth/src/Makefile.am
===================================================================
--- trunk/gmyth/src/Makefile.am 2008-02-25 14:14:29 UTC (rev 932)
+++ trunk/gmyth/src/Makefile.am 2008-02-25 17:45:36 UTC (rev 933)
@@ -1,14 +1,12 @@
-SUBDIRS = .
-
lib_LTLIBRARIES = libgmyth.la
INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src @GLIB_CFLAGS@ @GOBJECT_CFLAGS@
-BUILT_SOURCES = \
- gmyth_marshal.c \
+BUILT_SOURCES = \
+ gmyth_marshal.c \
gmyth_marshal.h
-libgmyth_la_SOURCES = \
+libgmyth_la_SOURCES = \
gmyth_common.c \
gmyth_debug.c \
gmyth_epg.c \
@@ -48,7 +46,7 @@
mv gmyth_marshal.c.tmp gmyth_marshal.c
libgmyth_la_CFLAGS = \
- -DDATADIR=\"$(pkgdatadir)\" \
+ -DDATADIR=\"$(pkgdatadir)\" \
$(GLIB_CFLAGS) \
$(GOBJECT_CFLAGS) \
$(GST_CFLAGS) \
@@ -57,32 +55,32 @@
$(MYSQL_CFLAGS) \
$(LIBXML_CFLAGS)
-libgmyth_la_LDFLAGS = \
- -export-dynamic \
- $(GLIB_CFLAGS) \
+libgmyth_la_LDFLAGS = \
+ -export-dynamic \
+ $(GLIB_CFLAGS) \
$(GOBJECT_CFLAGS) \
- $(MYSQL_LIBS) \
- $(GST_LIBS) \
+ $(MYSQL_LIBS) \
+ $(GST_LIBS) \
$(GSTBASE_LIBS) \
$(GSTPLUGINS_LIBS) \
$(LIBXML_LIBS)
-libgmyth_includedir = \
+libgmyth_includedir = \
$(pkgincludedir)
-libgmyth_include_HEADERS = \
+libgmyth_include_HEADERS = \
gmyth.h \
gmyth_common.h \
gmyth_debug.h \
- gmyth_epg.h \
- gmyth_recorder.h \
- gmyth_scheduler.h \
- gmyth_tvchain.h \
- gmyth_util.h \
- gmyth_query.h \
- gmyth_socket.h \
+ gmyth_epg.h \
+ gmyth_recorder.h \
+ gmyth_scheduler.h \
+ gmyth_tvchain.h \
+ gmyth_util.h \
+ gmyth_query.h \
+ gmyth_socket.h \
gmyth_remote_util.h \
- gmyth_stringlist.h \
+ gmyth_stringlist.h \
gmyth_monitor_handler.h \
gmyth_file_transfer.h \
gmyth_livetv.h \
@@ -97,20 +95,4 @@
gmyth_file.h \
gmyth_file_local.h
-if HAVE_INDENT
-indent:
- @for src_file in $(libgmyth_la_SOURCES); do \
- ./gmyth-indent.sh $$src_file; \
- done; \
- for inc_file in $(libgmyth_include_HEADERS); do \
- ./gmyth-indent.sh $$inc_file; \
- done;
-endif
-
CLEANFILES = $(BUILT_SOURCES)
-
-if HAVE_GCOV
-CLEANFILES += *.gcda \
- *.gcno \
- *.gcov
-endif
Modified: trunk/gmyth/tests/Makefile.am
===================================================================
--- trunk/gmyth/tests/Makefile.am 2008-02-25 14:14:29 UTC (rev 932)
+++ trunk/gmyth/tests/Makefile.am 2008-02-25 17:45:36 UTC (rev 933)
@@ -1,8 +1,8 @@
LDADD = \
- $(top_srcdir)/src/.libs/libgmyth.la
+ $(top_srcdir)/src/libgmyth.la
AM_LDFLAGS = \
- @GLIB_LIBS@ @GOBJECT_LIBS@ @GTHREAD_LIBS@ @LIBCURL_LIBS@
+ @GLIB_LIBS@ @GOBJECT_LIBS@ @GTHREAD_LIBS@ @LIBCURL_LIBS@
INCLUDES = \
-I$(top_srcdir) \
@@ -53,11 +53,6 @@
test_stringlist.py \
test_tvchain.py
-if HAVE_GENHTML
-TESTS += \
- coverage.py
-endif
-
TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir)
test_SOURCES = \
@@ -109,15 +104,3 @@
gmyth_test_tvchain.c
CLEANFILES = $(BUILT_SOURCES)
-
-if HAVE_GCOV
-CLEANFILES += \
- *.gcda \
- *.gcno \
- *.gcov
-endif
-
-if HAVE_GPROF
-CLEANFILES += gmon.out
-endif
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2008-02-25 14:14:26
|
Revision: 932
http://gmyth.svn.sourceforge.net/gmyth/?rev=932&view=rev
Author: renatofilho
Date: 2008-02-25 06:14:29 -0800 (Mon, 25 Feb 2008)
Log Message:
-----------
moved test dir to tests
Modified Paths:
--------------
trunk/gmyth-upnp/Makefile.am
trunk/gmyth-upnp/configure.ac
Added Paths:
-----------
trunk/gmyth-upnp/tests/
Removed Paths:
-------------
trunk/gmyth-upnp/test/
Modified: trunk/gmyth-upnp/Makefile.am
===================================================================
--- trunk/gmyth-upnp/Makefile.am 2008-02-25 14:12:27 UTC (rev 931)
+++ trunk/gmyth-upnp/Makefile.am 2008-02-25 14:14:29 UTC (rev 932)
@@ -1,4 +1,4 @@
-SUBDIRS= src test
+SUBDIRS= src tests
### all of the standard pc files we need to generate
pcfiles = gmyth-upnp.pc
Modified: trunk/gmyth-upnp/configure.ac
===================================================================
--- trunk/gmyth-upnp/configure.ac 2008-02-25 14:12:27 UTC (rev 931)
+++ trunk/gmyth-upnp/configure.ac 2008-02-25 14:14:29 UTC (rev 932)
@@ -128,7 +128,7 @@
AC_OUTPUT([
Makefile
src/Makefile
-test/Makefile
+tests/Makefile
gmyth-upnp.pc])
if test "x$enable_debug" != "xno"; then
Copied: trunk/gmyth-upnp/tests (from rev 931, trunk/gmyth-upnp/test)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ren...@us...> - 2008-02-25 13:49:54
|
Revision: 930
http://gmyth.svn.sourceforge.net/gmyth/?rev=930&view=rev
Author: renatofilho
Date: 2008-02-25 05:49:59 -0800 (Mon, 25 Feb 2008)
Log Message:
-----------
removed upnp dependency
Modified Paths:
--------------
trunk/gmyth/AUTHORS
trunk/gmyth/configure.ac
trunk/gmyth/samples/Makefile.am
Removed Paths:
-------------
trunk/gmyth/samples/gmyth_upnp_search.c
Modified: trunk/gmyth/AUTHORS
===================================================================
--- trunk/gmyth/AUTHORS 2008-02-21 22:49:45 UTC (rev 929)
+++ trunk/gmyth/AUTHORS 2008-02-25 13:49:59 UTC (rev 930)
@@ -2,3 +2,4 @@
Hallyson Luiz de Morais Melo <hal...@in...>
Leonardo Sobral Cunha <leo...@in...>
Rosfran Lins Borges <ros...@in...>
+Renato Araujo Oliveira Filho <ren...@in...>
Modified: trunk/gmyth/configure.ac
===================================================================
--- trunk/gmyth/configure.ac 2008-02-21 22:49:45 UTC (rev 929)
+++ trunk/gmyth/configure.ac 2008-02-25 13:49:59 UTC (rev 930)
@@ -144,20 +144,6 @@
CFLAGS="$CFLAGS -pg"
fi
-AC_ARG_ENABLE(upnp,
- AS_HELP_STRING([--enable-upnp],
- [enable clinkc's UPnP library (default = no)]),
- [
- if test $enableval = no; then
- USE_UPNP=no;
- else
- USE_UPNP=yes;
- fi
- ],[
- USE_UPNP=no;
- ]
-)
-
# Check for pkgconfig
AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
# Give error and exit if we don't have pkgconfig
@@ -227,17 +213,6 @@
AC_SUBST(LIBCURL_CFLAGS)
AC_SUBST(LIBCURL_LIBS)
-if [ test $USE_UPNP = yes ]; then
- # checks if the gmyth-upnp library can be found
- PKG_CHECK_MODULES(UPNP, gmyth-upnp, HAVE_UPNP=yes, HAVE_UPNP=no)
- if test "x$HAVE_UPNP" = "xyes"; then
- AC_DEFINE(HAVE_UPNP, 1, [GMyth UPnP library found!])
- CFLAGS="$CFLAGS -DHAVE_UPNP"
- fi
-fi
-
-AM_CONDITIONAL(HAVE_UPNP, test "x$HAVE_UPNP" = "xyes")
-
#
# mysql libraries
#
Modified: trunk/gmyth/samples/Makefile.am
===================================================================
--- trunk/gmyth/samples/Makefile.am 2008-02-21 22:49:45 UTC (rev 929)
+++ trunk/gmyth/samples/Makefile.am 2008-02-25 13:49:59 UTC (rev 930)
@@ -1,20 +1,11 @@
bin_PROGRAMS = gmyth-cat gmyth-ls
-if HAVE_UPNP
-bin_PROGRAMS += gmyth-upnp-search
-endif
-
gmyth_cat_SOURCES = \
gmyth_cat.c
gmyth_ls_SOURCES = \
gmyth_ls.c
-if HAVE_UPNP
-gmyth_upnp_search_SOURCES = \
- gmyth_upnp_search.c
-endif
-
LDADD = \
$(top_builddir)/src/libgmyth.la
@@ -28,12 +19,3 @@
-I$(top_srcdir)/src \
$(GLIB_CFLAGS) \
$(GOBJECT_CFLAGS)
-
-if HAVE_UPNP
-INCLUDES += \
- $(UPNP_CFLAGS)
-
-AM_LDFLAGS += \
- $(UPNP_LIBS)
-endif
-
Deleted: trunk/gmyth/samples/gmyth_upnp_search.c
===================================================================
--- trunk/gmyth/samples/gmyth_upnp_search.c 2008-02-21 22:49:45 UTC (rev 929)
+++ trunk/gmyth/samples/gmyth_upnp_search.c 2008-02-25 13:49:59 UTC (rev 930)
@@ -1,123 +0,0 @@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include <glib.h>
-
-#include <gmyth-upnp/gmyth_upnp.h>
-
-#include "gmyth_backendinfo.h"
-#include "gmyth_file_transfer.h"
-#include "gmyth_livetv.h"
-#include "gmyth_util.h"
-#include "gmyth_common.h"
-
-typedef struct {
- GMythBackendInfo *b_info;
- gchar *mythtv_id;
-} gupnp_options_t;
-
-static gupnp_options_t *
-_gupnp_options_new()
-{
- gupnp_options_t *options = g_new0(gupnp_options_t, 1);
- options->b_info = gmyth_backend_info_new();
-
- return options;
-}
-
-static void
-_gupnp_options_free(gupnp_options_t * options)
-{
- g_return_if_fail(options != NULL);
-
- if (options->b_info)
- g_object_unref(options->b_info);
- g_free(options->mythtv_id);
-}
-
-static gboolean
-_parse_args(int argc, char *argv[], gupnp_options_t * options)
-{
- GError *error = NULL;
- GOptionContext *context;
-
- gchar *mythtv_id = NULL;
-
- GOptionEntry entries[] = {
- {"mythtvid", 'm', 0, G_OPTION_ARG_STRING, &mythtv_id,
- "MythTV UPnP service " "identifigupnpion", "UPNP_ID"},
-
- {NULL}
- };
-
- g_return_val_if_fail(options != NULL, FALSE);
-
- context =
- g_option_context_new
- ("- searches for a list of connected mythtv backend recorded "
- "file and prints it on the standard output\n");
- g_option_context_add_main_entries(context, entries, NULL);
- g_option_context_parse(context, &argc, &argv, &error);
- g_option_context_set_help_enabled(context, TRUE);
-
- g_option_context_free(context);
-
- g_free(mythtv_id);
-
- return TRUE;
-}
-
-
-static void
-_got_upnp_device(GMythUPnP * gupnp, GMythUPnPDeviceStatus status,
- gchar * udn)
-{
- g_debug("Got Device !!! [%s, %s]",
- gmyth_upnp_device_status_to_string(status), udn);
-}
-
-static gboolean
-_gupnp_search_devices(gupnp_options_t * options)
-{
- GList *upnp_servers = NULL;
- GMythUPnP *gupnp;
- GMythBackendInfo *backend_info = gmyth_backend_info_new();
-
- g_return_val_if_fail(options != NULL, FALSE);
- g_return_val_if_fail(options->b_info != NULL, FALSE);
-
- gupnp = gmyth_upnp_new(backend_info, _got_upnp_device);
- upnp_servers = gmyth_upnp_do_search_sync(gupnp);
-
- g_list_free(upnp_servers);
- g_object_unref(gupnp);
-
- return TRUE;
-}
-
-int
-main(int argc, char *argv[])
-{
- gboolean res = FALSE;
- gupnp_options_t *options;
-
- g_type_init();
- if (!g_thread_supported())
- g_thread_init(NULL);
-
- options = _gupnp_options_new();
- res = _parse_args(argc, argv, options);
- if (!res) {
- g_printerr("Argument invalid. Type --help\n");
- return 1;
- }
-
- res = _gupnp_search_devices(options);
-
- _gupnp_options_free(options);
-
- return 0;
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <me...@us...> - 2008-02-21 22:49:39
|
Revision: 929
http://gmyth.svn.sourceforge.net/gmyth/?rev=929&view=rev
Author: melunko
Date: 2008-02-21 14:49:45 -0800 (Thu, 21 Feb 2008)
Log Message:
-----------
Fixed eos problems and more than one track limitation
Modified Paths:
--------------
trunk/gst-gpac/src/gpacmux.c
Modified: trunk/gst-gpac/src/gpacmux.c
===================================================================
--- trunk/gst-gpac/src/gpacmux.c 2008-02-21 17:54:48 UTC (rev 928)
+++ trunk/gst-gpac/src/gpacmux.c 2008-02-21 22:49:45 UTC (rev 929)
@@ -35,9 +35,14 @@
gint track_number;
guint32 di; /* outDescriptionIndex */
+ GstBuffer *buffer;
+ GstBuffer *next_buffer;
+
guint32 frame_count;
gboolean is_video;
+ gboolean eos;
+
} GstGpacPad;
struct _GstGpacMux
@@ -46,6 +51,7 @@
GstPad *srcpad;
GstCollectPads *collect;
+ gint active_pads;
GF_ISOFile *file;
@@ -109,6 +115,13 @@
static GstStateChangeReturn gst_gpac_mux_change_state (GstElement * element,
GstStateChange transition);
+static GstGpacPad* gst_gpac_mux_queue_pads (GstGpacMux * gpac_mux);
+static GstFlowReturn gst_gpac_mux_process_pad (GstGpacMux * gpac_mux, GstGpacPad *pad);
+static gboolean gst_gpac_mux_all_pads_eos (GstCollectPads * pads);
+static gint gst_gpac_mux_compare_pads (GstGpacMux * ogg_mux, GstGpacPad *first,
+ GstGpacPad *second);
+
+
static GstElementClass *parent_class = NULL;
GType
@@ -216,13 +229,6 @@
GstGpacPad *gpacpad = (GstGpacPad *) data;
GstBuffer *buf;
-/* if (gpacpad->pagebuffers) {
- while ((buf = g_queue_pop_head (gpacpad->pagebuffers)) != NULL) {
- gst_buffer_unref (buf);
- }
- g_queue_free (gpacpad->pagebuffers);
- gpacpad->pagebuffers = NULL;
- }*/
}
static GstPadLinkReturn
@@ -282,7 +288,7 @@
/* create new pad with the name */
GST_DEBUG_OBJECT (gpac_mux, "Creating new pad for serial %d", serial);
- printf ("XXXX new pad from template\n");
+
newpad = gst_pad_new_from_template (templ, padname);
g_free (padname);
@@ -294,6 +300,7 @@
gpacpad = (GstGpacPad *)
gst_collect_pads_add_pad_full (gpac_mux->collect, newpad,
sizeof (GstGpacPad), gst_gpac_mux_gpac_pad_destroy_notify);
+ gpac_mux->active_pads++;
/* gpac new track */
gpacpad->is_video = is_video;
@@ -411,92 +418,128 @@
return gst_pad_push (mux->srcpad, buffer);
}
+static GstFlowReturn
+gst_gpac_mux_collected (GstCollectPads * pads, GstGpacMux * gpac_mux)
+{
+ GstFlowReturn ret = GST_FLOW_OK;
+ GstGpacPad *pad;
+ gint active_before;
+
+ GST_LOG_OBJECT (gpac_mux, "collected");
+
+ active_before = gpac_mux->active_pads;
+
+ pad = gst_gpac_mux_queue_pads (gpac_mux);
+ if (!pad) {
+ return GST_FLOW_WRONG_STATE;
+ }
+
+ if (pad->buffer) {
+ ret = gst_gpac_mux_process_pad (gpac_mux, pad);
+ }
+
+ if (gpac_mux->active_pads < active_before) {
+ /* If the active pad count went down, this mean at least one pad has gone
+ * EOS. Since CollectPads only calls _collected() once when all pads are
+ * EOS, and our code doesn't _pop() from all pads we need to check that by
+ * peeking on all pads, else we won't be called again and the muxing will
+ * not terminate (push out EOS). */
+ printf ("XXXX um pad foi desativado %" GST_PTR_FORMAT "\n", pad);
+
+ /* if all the pads have been removed, flush all pending data */
+ if ((ret == GST_FLOW_OK) && gst_gpac_mux_all_pads_eos (pads)) {
+ GST_LOG_OBJECT (gpac_mux, "no pads remaining, flushing data");
+
+ do {
+ pad = gst_gpac_mux_queue_pads (gpac_mux);
+ if (pad)
+ ret = gst_gpac_mux_process_pad (gpac_mux, pad);
+ } while ((ret == GST_FLOW_OK) && (pad != NULL));
+
+ /* gpac file close (eos) */
+ // Fixme: this should flush all data to src pad
+ // Fixme: where to release gpac_mux->file?
+ printf ("CCCCCCCCCCCCCCCCcclosing the file\n");
+ gf_isom_close (gpac_mux->file);
+
+
+ GST_DEBUG_OBJECT (gpac_mux, "Pushing EOS");
+ gst_pad_push_event (gpac_mux->srcpad, gst_event_new_eos ());
+ }
+ }
+
+ return ret;
+
+}
+
static gboolean
-all_pads_eos (GstCollectPads * pads)
+gst_gpac_mux_all_pads_eos (GstCollectPads * pads)
{
- GSList *iter;
+ GSList *walk;
gboolean alleos = TRUE;
- iter = pads->data;
- while (iter) {
+ walk = pads->data;
+ while (walk) {
GstBuffer *buf;
- GstCollectData *data = (GstCollectData *) iter->data;
+ GstCollectData *data = (GstCollectData *) walk->data;
buf = gst_collect_pads_peek (pads, data);
if (buf) {
alleos = FALSE;
gst_buffer_unref (buf);
- goto beach;
+ break;
}
- iter = iter->next;
+ walk = walk->next;
}
-beach:
+
return alleos;
}
-
+
+
static GstFlowReturn
-gst_gpac_mux_collected (GstCollectPads * pads, GstGpacMux * gpac_mux)
+gst_gpac_mux_process_pad (GstGpacMux *gpac_mux, GstGpacPad *pad)
{
GstFlowReturn ret = GST_FLOW_OK;
- GSList *iter;
- GstBuffer *buf;
- gint i = 0;
+ GF_ISOSample *sample;
- GST_LOG_OBJECT (gpac_mux, "collected");
-
- iter = gpac_mux->collect->data;
- while (iter) {
- GstCollectData *data = (GstCollectData *) iter->data;
- GstGpacPad *pad = (GstGpacPad *) data;
-
- buf = gst_collect_pads_pop (gpac_mux->collect, data);
- if (buf == NULL) {
- iter = g_slist_next (iter);
- continue;
+ if (pad->buffer == NULL) {
+ printf ("Buffer is null, wrong state\n");
+ return GST_FLOW_WRONG_STATE;
}
- GST_LOG_OBJECT (data->pad, "popped buffer %" GST_PTR_FORMAT, buf);
- /* gpac output */
- printf ("xxxxxx buffer size: %d\n", GST_BUFFER_SIZE(buf)); fflush (stdout);
- if (pad->frame_count < 300) {
- GF_ISOSample *sample = gf_isom_sample_new();
+ /* gpac output */
+ printf ("xxxxxx buffer size: %d\n", GST_BUFFER_SIZE(pad->buffer)); fflush (stdout);
+ printf ("xxxx frames %d\n", pad->frame_count);
- sample->dataLength = GST_BUFFER_SIZE(buf);
- sample->data = GST_BUFFER_DATA(buf);
- sample->CTS_Offset = 0;
+ sample = gf_isom_sample_new();
+ sample->dataLength = GST_BUFFER_SIZE(pad->buffer);
+ sample->data = GST_BUFFER_DATA(pad->buffer);
+ sample->CTS_Offset = 0;
- if (pad->is_video) {
- sample->IsRAP = 0;
- sample->DTS += 1000*pad->frame_count;
- } else {
- sample->IsRAP = 0;
- sample->DTS = 2048*pad->frame_count;
- }
+ if (pad->is_video) {
+ sample->IsRAP = 0;
+ sample->DTS += 1000*pad->frame_count;
+ } else {
+ sample->IsRAP = 0;
+ sample->DTS = 2048*pad->frame_count;
+ }
- gf_isom_add_sample(gpac_mux->file, pad->track_number,
- pad->di, sample);
- sample->data = NULL;
+ gf_isom_add_sample(gpac_mux->file, pad->track_number,
+ pad->di, sample);
+ sample->data = NULL;
- gf_isom_sample_del(&sample);
+ gf_isom_sample_del(&sample);
- printf ("xxxx frames %d\n", pad->frame_count);
- } else if (pad->frame_count == 300) {
- printf ("XXX closing gpac output file\n"); fflush (stdout);
- gf_isom_close (gpac_mux->file);
- }
+ /* gstreamer output (push) */
+ ret = gst_gpac_mux_push_buffer (gpac_mux, pad->buffer);
+ pad->buffer = NULL;
- /* gstreamer output (push) */
- if (gst_gpac_mux_push_buffer (gpac_mux, buf) != GST_FLOW_OK) {
- printf ("EEEEEEEE push failed\n");
- }
-
- iter = g_slist_next (iter);
- pad->frame_count++;
- i++;
+ if (ret != GST_FLOW_OK) {
}
- /* fixme */
+ pad->frame_count++;
+
return ret;
}
@@ -504,13 +547,13 @@
static void
gst_gpac_mux_init_collectpads (GstCollectPads * collect)
{
- GSList *walk;
+ GSList *iter;
- walk = collect->data;
- while (walk) {
- GstGpacPad *gpacpad = (GstGpacPad *) walk->data;
+ iter = collect->data;
+ while (iter) {
+ GstGpacPad *gpacpad = (GstGpacPad *) iter->data;
- //ogg_stream_init (&gpacpad->stream, gpacpad->serial);
+ //gpac_stream_init (&gpacpad->stream, gpacpad->serial);
//gpacpad->packetno = 0;
//gpacpad->pageno = 0;
//gpacpad->eos = FALSE;
@@ -521,7 +564,7 @@
//gpacpad->prev_delta = FALSE;
//gpacpad->pagebuffers = g_queue_new ();
- walk = g_slist_next (walk);
+ iter = g_slist_next (iter);
}
}
@@ -529,10 +572,10 @@
static void
gst_gpac_mux_clear_collectpads (GstCollectPads * collect)
{
- GSList *walk;
+ GSList *iter;
- for (walk = collect->data; walk; walk = g_slist_next (walk)) {
- GstGpacPad *gpacpad = (GstGpacPad *) walk->data;
+ for (iter = collect->data; iter; iter = g_slist_next (iter)) {
+ GstGpacPad *gpacpad = (GstGpacPad *) iter->data;
GstBuffer *buf;
//gpac_stream_clear (&gpacpad->stream);
@@ -588,6 +631,97 @@
}
+static GstGpacPad *
+gst_gpac_mux_queue_pads (GstGpacMux * gpac_mux)
+{
+ GstGpacPad *bestpad = NULL;//, *still_hungry = NULL;
+ GSList *iter;
+
+ /* try to make sure we have a buffer from each usable pad first */
+ iter = gpac_mux->collect->data;
+ while (iter) {
+ GstGpacPad *pad;
+ GstCollectData *data;
+
+ data = (GstCollectData *) iter->data;
+ pad = (GstGpacPad *) data;
+
+ iter = g_slist_next (iter);
+
+ GST_LOG_OBJECT (data->pad, "looking at pad for buffer");
+
+ /* try to get a new buffer for this pad if needed and possible */
+ if (pad->buffer == NULL) {
+ GstBuffer *buf;
+
+ buf = gst_collect_pads_pop (gpac_mux->collect, data);
+ GST_LOG_OBJECT (data->pad, "popped buffer %" GST_PTR_FORMAT, buf);
+
+ /* On EOS we get a NULL buffer */
+ if (buf == NULL) {
+ printf ("EENENENENENEND OF STREAM EOS\n");
+ GST_DEBUG_OBJECT (data->pad, "EOS on pad");
+ if (!pad->eos) {
+ /* it's no longer active */
+ gpac_mux->active_pads--;
+ pad->eos = TRUE;
+
+ }
+ }
+
+ pad->buffer = buf;
+ }
+
+ /* we should have a buffer now, see if it is the best pad to
+ * pull on */
+ if (gst_gpac_mux_compare_pads (gpac_mux, bestpad, pad) > 0) {
+ GST_LOG_OBJECT (data->pad,
+ "new best pad, with buffers %" GST_PTR_FORMAT, pad->buffer);
+ bestpad = pad;
+ }
+ }
+
+ return bestpad;
+}
+
+static gint
+gst_gpac_mux_compare_pads (GstGpacMux * ogg_mux, GstGpacPad *first,
+ GstGpacPad *second)
+{
+ guint64 firsttime, secondtime;
+
+ /* if the first pad doesn't contain anything or is even NULL, return
+ * the second pad as best candidate and vice versa */
+ if (first == NULL || (first->buffer == NULL))
+ return 1;
+ if (second == NULL || (second->buffer == NULL))
+ return -1;
+
+ /* no timestamp on first buffer, it must go first */
+ if (first->buffer)
+ firsttime = GST_BUFFER_TIMESTAMP (first->buffer);
+ if (firsttime == GST_CLOCK_TIME_NONE)
+ return -1;
+
+ /* no timestamp on second buffer, it must go first */
+ if (second->buffer)
+ secondtime = GST_BUFFER_TIMESTAMP (second->buffer);
+ if (secondtime == GST_CLOCK_TIME_NONE)
+ return 1;
+
+ /* first buffer has higher timestamp, second one should go first */
+ if (secondtime < firsttime)
+ return 1;
+ /* second buffer has higher timestamp, first one should go first */
+ else if (secondtime > firsttime)
+ return -1;
+
+ /* same priority if all of the above failed */
+ return 0;
+}
+
+
+
static gboolean
gst_gpac_mux_plugin_init (GstPlugin * plugin)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|