From d53222b72961aade08fb12b4ac1ed00f9268c67d Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 24 Dec 2007 17:07:09 +0000 Subject: =?UTF-8?q?Spelling=20correction:=20successfuly=20=E2=86=92=20succ?= =?UTF-8?q?essfully.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/input/input_cdda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 5f830a1d3..fd4dd1fa9 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -1660,7 +1660,7 @@ static int _cdda_cddb_retrieve(cdda_input_plugin_t *this) { this->cddb.fd = _cdda_cddb_socket_open(this); if(this->cddb.fd >= 0) { xprintf(this->stream->xine, XINE_VERBOSITY_LOG, - _("input_cdda: successfuly connected to cddb server '%s:%d'.\n"), + _("input_cdda: successfully connected to cddb server '%s:%d'.\n"), this->cddb.server, this->cddb.port); } else { -- cgit v1.2.3 From 9f911a4387602eba171b314e3cfe02ce0deabf60 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 24 Dec 2007 18:58:26 +0000 Subject: Consistently use "colour", "colour key", "colour space" in output. Some instances of "key colour" remain; ffmpeg is unmodified. This change has caused two strings with two translations to collide (the strings have become identical since some instances already used "colour"). I have therefore arbitrarily dropped the first of the differing translations, the one for the string at src/video_out/video_out_directfb.c:1365. --- src/input/input_v4l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c index 2316ef9ba..b43a2684a 100644 --- a/src/input/input_v4l.c +++ b/src/input/input_v4l.c @@ -882,7 +882,7 @@ static int open_video_capture_device(v4l_input_plugin_t *this) if (ret < 0) { close (this->video_fd); this->video_fd = -1; - lprintf("Grab: no colorspace format found\n"); + lprintf("Grab: no colour space format found\n"); return 0; } else -- cgit v1.2.3 From 0fed3e1eccfdbae81961b3aadff0375c54c9f8d5 Mon Sep 17 00:00:00 2001 From: Michel Verbraak Date: Thu, 27 Dec 2007 14:20:37 +0000 Subject: net_plugin not always reading preview buffer to the maximum. --- src/input/input_net.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/input_net.c b/src/input/input_net.c index 4dfa63eda..fe78c93f4 100644 --- a/src/input/input_net.c +++ b/src/input/input_net.c @@ -411,6 +411,8 @@ static int net_plugin_open (input_plugin_t *this_gen ) { char *filename; char *pptr; int port = 7658; + int toread = MAX_PREVIEW_SIZE; + int trycount = 0; filename = this->host_port; pptr=strrchr(filename, ':'); @@ -429,11 +431,15 @@ static int net_plugin_open (input_plugin_t *this_gen ) { /* * fill preview buffer */ + while ((toread > 0) && (trycount < 10)) { #ifndef WIN32 - this->preview_size = read (this->fh, this->preview, MAX_PREVIEW_SIZE); + this->preview_size += read (this->fh, this->preview + this->preview_size, toread); #else - this->preview_size = recv (this->fh, this->preview, MAX_PREVIEW_SIZE, 0); + this->preview_size += recv (this->fh, this->preview + this->preview_size, toread, 0); #endif + trycount++; + toread = MAX_PREVIEW_SIZE - this->preview_size; + } this->curpos = 0; -- cgit v1.2.3 From 38b3af7f90924773014e53ef4a3fff01572d262e Mon Sep 17 00:00:00 2001 From: Richard van Paasen Date: Sat, 22 Dec 2007 00:22:11 +0100 Subject: Fixed an input_pvr issue with 'set input' for ivtv versions 0.10.6+. ivtv now requires the video device to be re-opened when the input is changed. --- src/input/input_pvr.c | 111 ++++++++++++++++++++++++++------------------------ 1 file changed, 58 insertions(+), 53 deletions(-) (limited to 'src/input') diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c index b8baffdbe..f07e98133 100644 --- a/src/input/input_pvr.c +++ b/src/input/input_pvr.c @@ -987,69 +987,74 @@ static void pvr_event_handler (pvr_input_plugin_t *this) { /* make sure we are not paused */ _x_set_speed(this->stream, XINE_SPEED_NORMAL); - if( v4l2_data->session_id != this->session ) { - /* if session changes -> closes the old one */ - pthread_mutex_lock(&this->lock); - pvr_finish_recording(this); - time(&this->start_time); - this->show_time = this->start_time; - this->session = v4l2_data->session_id; - this->new_session = 1; - this->pvr_play_paused = 0; - this->scr_tunning = 0; - pvrscr_speed_tunning(this->scr, 1.0 ); - pvr_break_rec_page(this); - pthread_mutex_unlock(&this->lock); - _x_demux_flush_engine (this->stream); - } else { - /* no session change, break the page and store a new show_time */ - pthread_mutex_lock(&this->lock); - pvr_break_rec_page(this); - this->show_page = this->rec_page; - pthread_mutex_unlock(&this->lock); - time(&this->show_time); + if ( v4l2_data->session_id != -1) { + if( v4l2_data->session_id != this->session ) { + /* if session changes -> closes the old one */ + pthread_mutex_lock(&this->lock); + pvr_finish_recording(this); + time(&this->start_time); + this->show_time = this->start_time; + this->session = v4l2_data->session_id; + this->new_session = 1; + this->pvr_play_paused = 0; + this->scr_tunning = 0; + pvrscr_speed_tunning(this->scr, 1.0 ); + pvr_break_rec_page(this); + pthread_mutex_unlock(&this->lock); + _x_demux_flush_engine (this->stream); + } else { + /* no session change, break the page and store a new show_time */ + pthread_mutex_lock(&this->lock); + pvr_break_rec_page(this); + this->show_page = this->rec_page; + pthread_mutex_unlock(&this->lock); + time(&this->show_time); + } } - - if( (v4l2_data->input != -1 && v4l2_data->input != this->input) || - (v4l2_data->channel != -1 && v4l2_data->channel != this->channel) || - (v4l2_data->frequency != -1 && v4l2_data->frequency != this->frequency) ) { - struct v4l2_frequency vf; + pthread_mutex_lock(&this->dev_lock); + + /* change input */ + if (v4l2_data->input != -1 && v4l2_data->input != this->input) { + lprintf("change input to:%d\n", v4l2_data->input); this->input = v4l2_data->input; + + /* as of ivtv 0.10.6: must close and reopen to set input */ + close(this->dev_fd); + this->dev_fd = open (this->class->devname, O_RDWR); + if (this->dev_fd == -1) { + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, + "input_pvr: error opening device %s\n", this->class->devname ); + } else { + if( ioctl(this->dev_fd, VIDIOC_S_INPUT, &this->input) ) + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, + "input_pvr: error setting v4l2 input\n"); + } + } + + /* change channel */ + if (v4l2_data->channel != -1 && v4l2_data->channel != this->channel) { + lprintf("change channel to:%d\n", v4l2_data->channel); this->channel = v4l2_data->channel; - this->frequency = v4l2_data->frequency; + } - lprintf("switching to input:%d chan:%d freq:%.2f\n", - v4l2_data->input, - v4l2_data->channel, - (float)v4l2_data->frequency * 62.5); - - pthread_mutex_lock(&this->dev_lock); - if( ioctl(this->dev_fd, VIDIOC_S_INPUT, &this->input) ) - xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, - "input_pvr: error setting v4l2 input\n"); - + /* change frequency */ + if (v4l2_data->frequency != -1 && v4l2_data->frequency != this->frequency) { + lprintf("changing frequency to:%.2f\n", (float)v4l2_data->frequency * 62.5); + struct v4l2_frequency vf; + this->frequency = v4l2_data->frequency; vf.frequency = this->frequency; vf.tuner = 0; if( ioctl(this->dev_fd, VIDIOC_S_FREQUENCY, &vf) ) - xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, - "input_pvr: error setting v4l2 frequency\n"); + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, + "input_pvr: error setting v4l2 frequency\n"); + } - /* workaround an ivtv bug where stream gets bad mpeg2 artifacts - * after changing inputs. reopening the device fixes it. - */ - close(this->dev_fd); - this->dev_fd = open (this->class->devname, O_RDWR); - if (this->dev_fd == -1) { - xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, - "input_pvr: error opening device %s\n", this->class->devname ); - return; - } - pthread_mutex_unlock(&this->dev_lock); + pthread_mutex_unlock(&this->dev_lock); - /* FIXME: also flush the device */ - /* _x_demux_flush_engine(this->stream); */ - } + /* FIXME: also flush the device */ + /* _x_demux_flush_engine(this->stream); */ + break; -- cgit v1.2.3 From 494227b2c50100c9699f484f15e42fe0af20c6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 15:46:51 +0100 Subject: Mark a few more array totally constant. --- src/input/input_dvd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/input') diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 60f58d361..e0dd3bba1 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -1740,9 +1740,9 @@ static void *init_class (xine_t *xine, void *data) { dvd_input_class_t *this; config_values_t *config = xine->config; void *dvdcss; - static const char *skip_modes[] = {"skip program", "skip part", "skip title", NULL}; - static const char *seek_modes[] = {"seek in program chain", "seek in program", NULL}; - static const char *play_single_chapter_modes[] = {"entire dvd", "one chapter", NULL}; + static const char *const skip_modes[] = {"skip program", "skip part", "skip title", NULL}; + static const char *const seek_modes[] = {"seek in program chain", "seek in program", NULL}; + static const char *const play_single_chapter_modes[] = {"entire dvd", "one chapter", NULL}; trace_print("Called\n"); #ifdef INPUT_DEBUG -- cgit v1.2.3 From a3e7918108fb1b0d1ccee8cd0de8ad764cf62a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 15:48:45 +0100 Subject: Mark the digit array constant. --- src/input/mms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/mms.c b/src/input/mms.c index 37e7ff395..79dd60987 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -601,7 +601,7 @@ static int mms_tcp_connect(mms_t *this) { } static void mms_gen_guid(char guid[]) { - static char digit[16] = "0123456789ABCDEF"; + static const char digit[16] = "0123456789ABCDEF"; int i = 0; srand(time(NULL)); -- cgit v1.2.3 From b7e6c5c09eaa2a1370e657351ef15c35bac82da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 16:45:10 +0100 Subject: Mark tables static as well as totally constant. --- src/input/librtsp/rtsp.c | 2 +- src/input/librtsp/rtsp_session.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/input') diff --git a/src/input/librtsp/rtsp.c b/src/input/librtsp/rtsp.c index 7607f2221..cd844654b 100644 --- a/src/input/librtsp/rtsp.c +++ b/src/input/librtsp/rtsp.c @@ -79,7 +79,7 @@ struct rtsp_s { * constants */ -const char rtsp_protocol_version[]="RTSP/1.0"; +static const char rtsp_protocol_version[]="RTSP/1.0"; /* server states */ #define RTSP_CONNECTED 1 diff --git a/src/input/librtsp/rtsp_session.c b/src/input/librtsp/rtsp_session.c index e9ce5bc5c..5cb0dfb63 100644 --- a/src/input/librtsp/rtsp_session.c +++ b/src/input/librtsp/rtsp_session.c @@ -65,15 +65,15 @@ struct rtsp_session_s { }; /* network bandwidth */ -const uint32_t rtsp_bandwidths[]={14400,19200,28800,33600,34430,57600, - 115200,262200,393216,524300,1544000,10485800}; +static const uint32_t rtsp_bandwidths[]={14400,19200,28800,33600,34430,57600, + 115200,262200,393216,524300,1544000,10485800}; -const char *rtsp_bandwidth_strs[]={"14.4 Kbps (Modem)", "19.2 Kbps (Modem)", - "28.8 Kbps (Modem)", "33.6 Kbps (Modem)", - "34.4 Kbps (Modem)", "57.6 Kbps (Modem)", - "115.2 Kbps (ISDN)", "262.2 Kbps (Cable/DSL)", - "393.2 Kbps (Cable/DSL)","524.3 Kbps (Cable/DSL)", - "1.5 Mbps (T1)", "10.5 Mbps (LAN)", NULL}; +static const char *const rtsp_bandwidth_strs[]={"14.4 Kbps (Modem)", "19.2 Kbps (Modem)", + "28.8 Kbps (Modem)", "33.6 Kbps (Modem)", + "34.4 Kbps (Modem)", "57.6 Kbps (Modem)", + "115.2 Kbps (ISDN)", "262.2 Kbps (Cable/DSL)", + "393.2 Kbps (Cable/DSL)","524.3 Kbps (Cable/DSL)", + "1.5 Mbps (T1)", "10.5 Mbps (LAN)", NULL}; rtsp_session_t *rtsp_session_start(xine_stream_t *stream, char *mrl) { @@ -87,7 +87,7 @@ rtsp_session_t *rtsp_session_start(xine_stream_t *stream, char *mrl) { uint32_t bandwidth; bandwidth_id = xine->config->register_enum(xine->config, "media.network.bandwidth", 10, - (char **)rtsp_bandwidth_strs, + rtsp_bandwidth_strs, _("network bandwidth"), _("Specify the bandwidth of your internet connection here. " "This will be used when streaming servers offer different versions " -- cgit v1.2.3 From 7da368d66af2d4a6b73ffd6722c1f0a8de4d9d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 16:46:58 +0100 Subject: Mark rm_header and pnm_data_header static. --- src/input/pnm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/pnm.c b/src/input/pnm.c index 3cb36ac3f..564151279 100644 --- a/src/input/pnm.c +++ b/src/input/pnm.c @@ -92,7 +92,7 @@ struct pnm_s { /* header of rm files */ #define RM_HEADER_SIZE 0x12 -const unsigned char rm_header[]={ +static const unsigned char rm_header[]={ 0x2e, 0x52, 0x4d, 0x46, /* object_id ".RMF" */ 0x00, 0x00, 0x00, 0x12, /* header_size 0x12 */ 0x00, 0x00, /* object_version 0x00 */ @@ -102,7 +102,7 @@ const unsigned char rm_header[]={ /* data chunk header */ #define PNM_DATA_HEADER_SIZE 18 -const unsigned char pnm_data_header[]={ +static const unsigned char pnm_data_header[]={ 'D','A','T','A', 0,0,0,0, /* data chunk size */ 0,0, /* object version */ -- cgit v1.2.3 From 8d06b568011b991efcd8c2ddc9afe5386901683d Mon Sep 17 00:00:00 2001 From: Philippe Troin Date: Sat, 29 Dec 2007 14:28:01 +0000 Subject: Crashes when accessing files via Gnome-VFS /usr/bin/totem-video-thumbnailer -s 128 ssh://user@hosts/path/to/video.ext Will segfault. All the time. --HG-- extra : transplant_source : H%1EU%A5%3C%E6r%976%AA%C3%92%E5l%C7w%92dg. --- src/input/input_gnome_vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/input_gnome_vfs.c b/src/input/input_gnome_vfs.c index ba42a02d4..0848b9206 100644 --- a/src/input/input_gnome_vfs.c +++ b/src/input/input_gnome_vfs.c @@ -199,7 +199,7 @@ gnomevfs_plugin_get_length (input_plugin_t *this_gen) static uint32_t gnomevfs_plugin_get_blocksize (input_plugin_t *this_gen) { - return 32 * 1024; + return 8 * 1024; } static const char* -- cgit v1.2.3 From 6dbb05a4cba3cdc811308762058d722f11464683 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 30 Dec 2007 15:55:03 +0000 Subject: =?UTF-8?q?Manual=20port=20of=20the=20color=E2=86=92colour=20chang?= =?UTF-8?q?e=20to=201.2;=20should=20make=20merging=20easier.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/input/input_v4l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c index 162e2f7ab..28e5b16ce 100644 --- a/src/input/input_v4l.c +++ b/src/input/input_v4l.c @@ -913,7 +913,7 @@ static int open_video_capture_device(v4l_input_plugin_t *this) if (ret < 0) { close (this->video_fd); this->video_fd = -1; - lprintf("Grab: no colorspace format found\n"); + lprintf("Grab: no colour space format found\n"); return 0; } else -- cgit v1.2.3 From 284db4a4fc4941b7a3b903d3ab23b04840517fd1 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Tue, 1 Jan 2008 17:31:12 +0000 Subject: Avoid potential install-time mislinkage against libxine.so.2. --- src/input/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/input') diff --git a/src/input/Makefile.am b/src/input/Makefile.am index e6476530b..81dd62eca 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -130,17 +130,17 @@ xineplug_inp_cdda_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_cdda_la_LDFLAGS = -avoid-version -module xineplug_inp_v4l_la_SOURCES = input_v4l.c -xineplug_inp_v4l_la_LIBADD = $(ALSA_LIBS) $(XINE_LIB) $(LTLIBINTL) +xineplug_inp_v4l_la_LIBADD = $(XINE_LIB) $(ALSA_LIBS) $(LTLIBINTL) xineplug_inp_v4l_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_v4l_la_LDFLAGS = -avoid-version -module xineplug_inp_gnome_vfs_la_SOURCES = input_gnome_vfs.c net_buf_ctrl.c -xineplug_inp_gnome_vfs_la_LIBADD = $(GNOME_VFS_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(LTLIBINTL) +xineplug_inp_gnome_vfs_la_LIBADD = $(XINE_LIB) $(GNOME_VFS_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) xineplug_inp_gnome_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_gnome_vfs_la_LDFLAGS = -avoid-version -module xineplug_inp_smb_la_SOURCES = input_smb.c -xineplug_inp_smb_la_LIBADD = $(LIBSMBCLIENT_LIBS) $(XINE_LIB) $(LTLIBINTL) +xineplug_inp_smb_la_LIBADD = $(XINE_LIB) $(LIBSMBCLIENT_LIBS) $(LTLIBINTL) xineplug_inp_smb_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_smb_la_LDFLAGS = -avoid-version -module -- cgit v1.2.3 From 749f06e414b62b6a39ce70b25be0f1c26895ff7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 18:47:15 +0100 Subject: Make it a static constant chracter array. --- src/input/base64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/base64.c b/src/input/base64.c index ffb039802..3f5ba2867 100644 --- a/src/input/base64.c +++ b/src/input/base64.c @@ -107,7 +107,7 @@ unsigned char *rfc822_binary (void *src,unsigned long srcl,unsigned long *len) { unsigned char *ret,*d; unsigned char *s = (unsigned char *) src; - char *v = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._"; + static const char v[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._"; unsigned long i = ((srcl + 2) / 3) * 4; *len = i += 2 * ((i / 60) + 1); d = ret = (unsigned char *) malloc ((size_t) ++i); -- cgit v1.2.3 From 8433c378e1d322746aac570f3ef71c98b5ced2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 18:48:29 +0100 Subject: Follow the parameter type. --- src/input/mms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/mms.c b/src/input/mms.c index 79dd60987..ba584b4f8 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -742,7 +742,7 @@ mms_t *mms_connect (xine_stream_t *stream, const char *url, int bandwidth) { /* TODO: insert network timing request here */ /* command 0x2 */ lprintf("send command 0x02\n"); - string_utf16 (url_conv, &this->scmd_body[8], "\002\000\\\\192.168.0.129\\TCP\\1037\0000", 28); + string_utf16 (url_conv, &this->scmd_body[8], (ICONV_CONST char*)"\002\000\\\\192.168.0.129\\TCP\\1037\0000", 28); memset (this->scmd_body, 0, 8); if (!send_command (this, 2, 0, 0, 28 * 2 + 8)) { xprintf(this->stream->xine, XINE_VERBOSITY_LOG, -- cgit v1.2.3 From 889686327311760bdda718a8b9b7628000c0843e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 18:49:41 +0100 Subject: Mark stuff more constant. --- src/input/sha1.c | 6 +++--- src/input/sha1.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/input') diff --git a/src/input/sha1.c b/src/input/sha1.c index b70e50d5f..98873e6f6 100644 --- a/src/input/sha1.c +++ b/src/input/sha1.c @@ -315,12 +315,12 @@ void sha_print(unsigned char digest[20]) } } -char *sha_version(void) +const char *sha_version(void) { #if (SHA_VERSION == 1) - static char *version = "SHA-1"; + static const char *version = "SHA-1"; #else - static char *version = "SHA"; + static const char *version = "SHA"; #endif return(version); } diff --git a/src/input/sha1.h b/src/input/sha1.h index 9f2659d60..810eecd96 100644 --- a/src/input/sha1.h +++ b/src/input/sha1.h @@ -30,7 +30,7 @@ void sha_final(unsigned char [20], SHA_INFO *); void sha_stream(unsigned char [20], SHA_INFO *, FILE *); void sha_print(unsigned char [20]); -char *sha_version(void); +const char *sha_version(void); #define SHA_VERSION 1 -- cgit v1.2.3 From b106e0fb5500495f69b09023c87d155bf21ada3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 19:04:51 +0100 Subject: Don't mark the spu_event as constant. --- src/input/input_dvd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index e0dd3bba1..2cf16adeb 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -332,7 +332,7 @@ static void send_mouse_enter_leave_event(dvd_input_plugin_t *this, int direction this->mouse_in = !this->mouse_in; if(direction != this->mouse_in) { - const xine_spu_button_t spu_event = { + xine_spu_button_t spu_event = { .direction = direction, .button = this->mouse_buttonN }; -- cgit v1.2.3 From 1dd3cfb1ee12737e48f922ad64da25fb299ab2a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 19:05:42 +0100 Subject: Mark the mrl lists as constant; this trades a warning for another as char ** and const char ** are not compatible. --- src/input/input_dvb.c | 2 +- src/input/input_dvd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 146185845..b3a9d8e46 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -290,7 +290,7 @@ typedef struct { xine_t *xine; - char *mrls[5]; + const char *mrls[5]; int numchannels; diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 2cf16adeb..02017956e 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -225,7 +225,7 @@ typedef struct { int32_t region; int32_t play_single_chapter; - char *filelist[MAX_DIR_ENTRIES]; + const char *filelist[MAX_DIR_ENTRIES]; } dvd_input_class_t; -- cgit v1.2.3 From 97f3b7e5520f6258e98af3090d8ef384e945b3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 19:06:42 +0100 Subject: Update the network interfaces to accept constant strings where possible. --- src/input/input_cdda.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/input') diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 3cad27bbe..79a8e93bd 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -987,7 +987,7 @@ static int parse_url (char *urlbuf, char** host, int *port) { #endif static int XINE_FORMAT_PRINTF(4, 5) -network_command( xine_stream_t *stream, int socket, char *data_buf, char *msg, ...) +network_command( xine_stream_t *stream, int socket, char *data_buf, const char *msg, ...) { char buf[_BUFSIZ]; va_list args; @@ -1036,13 +1036,13 @@ network_command( xine_stream_t *stream, int socket, char *data_buf, char *msg, . #ifndef WIN32 -static int network_connect(xine_stream_t *stream, char *url ) +static int network_connect(xine_stream_t *stream, const char *_url ) { char *host; int port; int fd; - url = strdup(url); + char *url = strdup(_url); parse_url(url, &host, &port); if( !host || !strlen(host) || !port ) -- cgit v1.2.3 From 2cfcd373e9fbbf043c616a11d86a318488026f9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 19:08:12 +0100 Subject: Make network_command accept a generic data buffer. --- src/input/input_cdda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 79a8e93bd..9ba248216 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -987,7 +987,7 @@ static int parse_url (char *urlbuf, char** host, int *port) { #endif static int XINE_FORMAT_PRINTF(4, 5) -network_command( xine_stream_t *stream, int socket, char *data_buf, const char *msg, ...) +network_command( xine_stream_t *stream, int socket, void *data_buf, const char *msg, ...) { char buf[_BUFSIZ]; va_list args; -- cgit v1.2.3 From 361dee4647591e47bbe6a8efcefb06fbc1e8314f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 19:10:04 +0100 Subject: Remove stray return 0. --- src/input/input_cdda.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/input') diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 9ba248216..f8819f9f4 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -1304,8 +1304,6 @@ static void _cdda_mkdir_recursive_safe (xine_t *xine, char *path) if (p) *p = '/'; } while (p); - - return 0; } /* -- cgit v1.2.3