comparison src/ushare.c @ 146:066f33b2213a

EXPERIMENTAL: Select a particular program from multi-channel.
author Naoya OYAMA <naoya.oyama@gmail.com>
date Tue, 21 Aug 2012 04:21:11 +0900
parents 2a9ac5ce2c7e
children 30e91361506a
comparison
equal deleted inserted replaced
145:4e39ce051c57 146:066f33b2213a
126 ut->cfg_file = NULL; 126 ut->cfg_file = NULL;
127 127
128 pthread_mutex_init (&ut->termination_mutex, NULL); 128 pthread_mutex_init (&ut->termination_mutex, NULL);
129 pthread_cond_init (&ut->termination_cond, NULL); 129 pthread_cond_init (&ut->termination_cond, NULL);
130 130
131 #define MAX_CHANNELS 512
132 ut->channel_name = malloc(sizeof(char*)*MAX_CHANNELS);
133 if (!ut->channel_name)
134 return NULL;
135 ut->location_name = malloc(sizeof(char*)*MAX_CHANNELS);
136 if (!ut->location_name)
137 return NULL;
138 ut->request_channel[0] = '\0';
139 ut->nr_channel = 0;
140
131 return ut; 141 return ut;
132 } 142 }
133 143
134 static void 144 static void
135 ushare_free (struct ushare_t *ut) 145 ushare_free (struct ushare_t *ut)
735 inline void 745 inline void
736 display_headers (void) 746 display_headers (void)
737 { 747 {
738 printf (_("%s (version %s), Recoding DTV and a lightweight UPnP A/V and DLNA Media Server.\n"), 748 printf (_("%s (version %s), Recoding DTV and a lightweight UPnP A/V and DLNA Media Server.\n"),
739 PACKAGE_NAME, VERSION); 749 PACKAGE_NAME, VERSION);
740 printf (_("Naoya OYAMA (C) 2010.\n")); 750 printf (_("Naoya OYAMA (C) 2010-2012.\n"));
741 printf (_("See http://hg.honeyplanet.jp/pt1.oyama/ for updates.\n")); 751 printf (_("See http://hg.honeyplanet.jp/pt1.oyama/ for updates.\n"));
742 } 752 }
743 753
744 inline static void 754 inline static void
745 setup_i18n(void) 755 setup_i18n(void)
893 finish_upnp (ut); 903 finish_upnp (ut);
894 ushare_free (ut); 904 ushare_free (ut);
895 return NULL; 905 return NULL;
896 } 906 }
897 907
898 build_metadata_list (ut);
899
900 /* Let main sleep until it's time to die... */ 908 /* Let main sleep until it's time to die... */
901 pthread_mutex_lock (&ut->termination_mutex); 909 pthread_mutex_lock (&ut->termination_mutex);
902 pthread_cond_wait (&ut->termination_cond, &ut->termination_mutex); 910 pthread_cond_wait (&ut->termination_cond, &ut->termination_mutex);
903 pthread_mutex_unlock (&ut->termination_mutex); 911 pthread_mutex_unlock (&ut->termination_mutex);
904 912