comparison src/recpt1.c @ 170:4f3640bf350d

Change display name of DLNA. - old_display name: (recpt1:devN) - new_display name: (hostname: /dev/ptXdevY) - change UUID format.
author Naoya OYAMA <naoya.oyama@gmail.com>
date Wed, 17 Oct 2012 23:47:16 +0900
parents 061ef2cd98f0
children 89e24a1c8a64
comparison
equal deleted inserted replaced
169:cb54f9777734 170:4f3640bf350d
45 boolean f_exit = FALSE; 45 boolean f_exit = FALSE;
46 struct channel_info_list *channel_list = NULL; 46 struct channel_info_list *channel_list = NULL;
47 extern struct ushare_t *ut; 47 extern struct ushare_t *ut;
48 thread_data *gp_tdata; 48 thread_data *gp_tdata;
49 49
50 /* prototypes */
51 static int get_device_id_by_name ( const char *name );
52
53 static struct channel_info_list *open_list_file( 50 static struct channel_info_list *open_list_file(
54 char *type, 51 char *type,
55 struct channel_info_list *info_list) 52 struct channel_info_list *info_list)
56 { 53 {
57 char *buf = NULL; 54 char *buf = NULL;
166 return NULL; 163 return NULL;
167 } 164 }
168 165
169 sscanf(rbuf.mtext, "ch=%s t=%d e=%d i=%s", channel, &recsec, &time_to_add, sid_list); 166 sscanf(rbuf.mtext, "ch=%s t=%d e=%d i=%s", channel, &recsec, &time_to_add, sid_list);
170 167
171 if ((strcmp(channel, "")) && strcmp(tdata->ch, channel)) { 168 if ((strcmp(channel, "")) && strcmp(tdata->ch, channel) ||
169 (strcmp(sid_list, "")) && strcmp(tdata->sid_list, sid_list)) {
172 #if 0 170 #if 0
173 /* re-initialize decoder */ 171 /* re-initialize decoder */
174 if(tdata->decoder) { 172 if(tdata->decoder) {
175 // b25_finish(tdata->decoder); 173 // b25_finish(tdata->decoder);
176 b25_shutdown(tdata->decoder); 174 b25_shutdown(tdata->decoder);
1455 split_shutdown(splitter); 1453 split_shutdown(splitter);
1456 } 1454 }
1457 1455
1458 return 0; 1456 return 0;
1459 } 1457 }
1460
1461 static int
1462 get_device_id_by_name
1463 ( const char *name )
1464 {
1465 int i = -1;
1466 if ( name != NULL ) {
1467 if( ! strncmp(name, DEVICE_NAME_BASE, strlen(DEVICE_NAME_BASE) ) ) {
1468 i = atoi(name+strlen(DEVICE_NAME_BASE));
1469 }
1470 }
1471 return i;
1472 }