comparison src/ushare.c @ 152:30e91361506a

EXPERIMENTAL: Enable change phisical channel by DLNA.(ISDB-T only)
author Naoya OYAMA <naoya.oyama@gmail.com>
date Sun, 02 Sep 2012 01:59:27 +0900
parents 066f33b2213a
children 726fe10d9e4a
comparison
equal deleted inserted replaced
151:f7f594bf4e98 152:30e91361506a
81 81
82 static struct ushare_t * 82 static struct ushare_t *
83 ushare_new (void) 83 ushare_new (void)
84 { 84 {
85 extern thread_data *gp_tdata; 85 extern thread_data *gp_tdata;
86 extern struct channel_info_list *channel_list;
86 thread_data *tdata = gp_tdata; 87 thread_data *tdata = gp_tdata;
87 struct ushare_t *ut = (struct ushare_t *) malloc (sizeof (struct ushare_t)); 88 struct ushare_t *ut = (struct ushare_t *) malloc (sizeof (struct ushare_t));
88 char model_name[32]; 89 char model_name[32];
89 model_name[0] = '\0'; 90 model_name[0] = '\0';
90 if (!ut) 91 if (!ut)
135 ut->location_name = malloc(sizeof(char*)*MAX_CHANNELS); 136 ut->location_name = malloc(sizeof(char*)*MAX_CHANNELS);
136 if (!ut->location_name) 137 if (!ut->location_name)
137 return NULL; 138 return NULL;
138 ut->request_channel[0] = '\0'; 139 ut->request_channel[0] = '\0';
139 ut->nr_channel = 0; 140 ut->nr_channel = 0;
141 ut->channel_list = channel_list;
142 ut->sid = NULL;
143 ut->tp = NULL;
140 144
141 return ut; 145 return ut;
142 } 146 }
143 147
144 static void 148 static void
903 finish_upnp (ut); 907 finish_upnp (ut);
904 ushare_free (ut); 908 ushare_free (ut);
905 return NULL; 909 return NULL;
906 } 910 }
907 911
912 build_metadata_list(ut);
913
908 /* Let main sleep until it's time to die... */ 914 /* Let main sleep until it's time to die... */
909 pthread_mutex_lock (&ut->termination_mutex); 915 pthread_mutex_lock (&ut->termination_mutex);
910 pthread_cond_wait (&ut->termination_cond, &ut->termination_mutex); 916 pthread_cond_wait (&ut->termination_cond, &ut->termination_mutex);
911 pthread_mutex_unlock (&ut->termination_mutex); 917 pthread_mutex_unlock (&ut->termination_mutex);
912 918