# HG changeset patch # User Naoya OYAMA # Date 1286830586 -32400 # Node ID 20442921bff59dec4e2be8f8ac22813ba73e15e0 # Parent cc3e3f370aecd7c81d0b240b0f4a3afef52c10ec change display name. modify PES buf size. diff -r cc3e3f370aec -r 20442921bff5 src/tssplitter_lite.h --- a/src/tssplitter_lite.h Sun Oct 10 22:44:28 2010 +0900 +++ b/src/tssplitter_lite.h Tue Oct 12 05:56:26 2010 +0900 @@ -148,7 +148,7 @@ int64_t pts; int64_t dts; int size; - u_char buffer[128*1024]; + u_char buffer[3*1024*1024]; } splitpesbuf_t; typedef struct _splitesbuf_t diff -r cc3e3f370aec -r 20442921bff5 src/ushare.c --- a/src/ushare.c Sun Oct 10 22:44:28 2010 +0900 +++ b/src/ushare.c Tue Oct 12 05:56:26 2010 +0900 @@ -86,9 +86,11 @@ if (!ut) return NULL; - ut->name = strdup (DEFAULT_USHARE_NAME); +// ut->name = strdup (DEFAULT_USHARE_NAME); + ut->name = strdup (PACKAGE_NAME); ut->interface = strdup (DEFAULT_USHARE_IFACE); - ut->model_name = strdup (DEFAULT_USHARE_NAME); +// ut->model_name = strdup (DEFAULT_USHARE_NAME); + ut->model_name = strdup (PACKAGE_NAME); ut->contentlist = NULL; ut->rb = rbinit (rb_compare, NULL); ut->root_entry = NULL; @@ -425,8 +427,8 @@ if ((itf->ifa_flags & IFF_UP) && !strncmp (itf->ifa_name, interface, IFNAMSIZ)) { - log_error (_("Interface %s is down.\n"), interface); - log_error (_("Recheck uShare's configuration and try again !\n")); + //log_error (_("Interface %s is down.\n"), interface); + //log_error (_("Recheck uShare's configuration and try again !\n")); freeifaddrs (itflist); return true; } @@ -505,6 +507,7 @@ int sock = -1; char *buf; unsigned char *ptr; + pid_t PID = (getpid() & 0xFFFF); #if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__)) int mib[6]; @@ -571,7 +574,7 @@ ptr = (unsigned char *) ifr.ifr_hwaddr.sa_data; #endif /* (defined(BSD) || defined(__FreeBSD__)) */ - snprintf (buf, 64, "%s-%02x%02x%02x%02x%02x%02x", DEFAULT_UUID, + snprintf (buf, 64, "%s-%04x-%02x%02x%02x%02x%02x%02x", DEFAULT_UUID, PID, (ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377), (ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377)); @@ -648,6 +651,7 @@ ushare_signal_exit (); } +#if 0 static void reload_config (int s __attribute__ ((unused))) { @@ -719,14 +723,15 @@ raise (SIGINT); } } +#endif inline void display_headers (void) { - printf (_("%s (version %s), a lightweight UPnP A/V and DLNA Media Server.\n"), + printf (_("%s (version %s), Recoding DTV and a lightweight UPnP A/V and DLNA Media Server.\n"), PACKAGE_NAME, VERSION); - printf (_("Benjamin Zores (C) 2005-2007, for GeeXboX Team.\n")); - printf (_("See http://ushare.geexbox.org/ for updates.\n")); + printf (_("Naoya OYAMA (C) 2010.\n")); + printf (_("See http://hg.honeyplanet.jp/pt1.oyama/ for updates.\n")); } inline static void @@ -780,12 +785,14 @@ } #endif +#if 0 if (parse_config_file (ut) < 0) { /* fprintf here, because syslog not yet ready */ fprintf (stderr, _("Warning: can't parse file \"%s\".\n"), ut->cfg_file ? ut->cfg_file : SYSCONFDIR "/" USHARE_CONFIG_FILE); } +#endif ut->verbose = true; ut->port = 0; ut->use_presentation = false; @@ -794,7 +801,6 @@ ut->override_iconv_err = false; ut->xbox360 = true; ut->daemon = false; - //ut->interface = "192.168.1.34"; ut->contentlist = "/tmp"; if (ut->xbox360) @@ -861,14 +867,6 @@ } #if 0 - signal (SIGINT, UPnPBreak); - signal (SIGTERM, UPnPBreak); - signal (SIGUSR1, UPnPBreak); - signal (SIGUSR2, UPnPBreak); - signal (SIGPIPE, UPnPBreak); - signal (SIGHUP, reload_config); -#endif - if (ut->use_telnet) { if (ctrl_telnet_start (ut->telnet_port) < 0) @@ -880,6 +878,7 @@ ctrl_telnet_register ("kill", ushare_kill, _("Terminates the uShare server")); } +#endif log_verbose ("init_upnp() start\n"); if (init_upnp (ut) < 0) @@ -896,8 +895,10 @@ pthread_cond_wait (&ut->termination_cond, &ut->termination_mutex); pthread_mutex_unlock (&ut->termination_mutex); +#if 0 if (ut->use_telnet) ctrl_telnet_stop (); +#endif finish_upnp (ut); free_metadata_list (ut); ushare_free (ut); diff -r cc3e3f370aec -r 20442921bff5 src/ushare.h --- a/src/ushare.h Sun Oct 10 22:44:28 2010 +0900 +++ b/src/ushare.h Tue Oct 12 05:56:26 2010 +0900 @@ -37,7 +37,8 @@ #define VIRTUAL_DIR "/web" #define XBOX_MODEL_NAME "Windows Media Connect Compatible" -#define DEFAULT_UUID "898f9738-d930-4db4-a3cf" +//#define DEFAULT_UUID "898f9738-d930-4db4-a3cf" +#define DEFAULT_UUID "898f9738-d930-4db4" #define STREAM_FILE_NAME "stream.ts" #define STREAM_LOCATION VIRTUAL_DIR "/" STREAM_FILE_NAME