From 4169f9efdaeda8a60b5cfd464bd39b80a9dd2032 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Fri, 8 Dec 2006 16:26:10 +0000 Subject: Fix wrong length specification for strncat() calls. Consolidated multiple strncat() calls to snprintf(). CVS patchset: 8407 CVS date: 2006/12/08 16:26:10 --- src/input/input_http.c | 21 ++++++++------------- src/input/libdvdnav/remap.c | 7 ++----- src/input/vcd/libcdio/iso9660_fs.c | 8 +++----- src/input/vcd/libvcd/vcd.c | 6 +++--- 4 files changed, 16 insertions(+), 26 deletions(-) (limited to 'src/input') diff --git a/src/input/input_http.c b/src/input/input_http.c index 0ba143091..9011fba7f 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -19,7 +19,7 @@ * * input plugin for http network streams * - * $Id: input_http.c,v 1.124 2006/11/30 10:54:18 dgp85 Exp $ + * $Id: input_http.c,v 1.125 2006/12/08 16:26:10 mshopf Exp $ */ #ifdef HAVE_CONFIG_H @@ -335,12 +335,9 @@ static int http_plugin_read_metainf (http_input_plugin_t *this) { /* prepares the event */ radio = _x_meta_info_get(this->stream, XINE_META_INFO_ALBUM); if (radio) { - int len = strlen(radio); - strncpy(data.str, radio, sizeof(data.str)); - strncat(data.str, " - ", sizeof(data.str) - len); - strncat(data.str, songtitle, sizeof(data.str) - len - 3); + snprintf (data.str, sizeof(data.str), "%s - %s", radio, songtitle); } else { - strncpy(data.str, songtitle, sizeof(data.str)); + strncpy(data.str, songtitle, sizeof(data.str)-1); } data.str[sizeof(data.str) - 1] = '\0'; data.str_len = strlen(data.str) + 1; @@ -766,13 +763,11 @@ static int http_plugin_open (input_plugin_t *this_gen ) { } snprintf(this->buf + buflen, BUFSIZE - buflen, - "User-Agent: xine/%s\015\012", VERSION); - buflen = strlen(this->buf); - strncat (this->buf, "Accept: */*\015\012", BUFSIZE - buflen); - buflen = strlen(this->buf); - strncat (this->buf, "Icy-MetaData: 1\015\012", BUFSIZE - buflen); - buflen = strlen(this->buf); - strncat (this->buf, "\015\012", BUFSIZE - buflen); + "User-Agent: xine/%s\015\012" + "Accept: */*\015\012" + "Icy-MetaData: 1\015\012" + "\015\012", + VERSION); buflen = strlen(this->buf); if (_x_io_tcp_write (this->stream, this->fh, this->buf, buflen) != buflen) { _x_message(this->stream, XINE_MSG_CONNECTION_REFUSED, "couldn't send request", NULL); diff --git a/src/input/libdvdnav/remap.c b/src/input/libdvdnav/remap.c index 86cf3a4ad..f2049ac06 100644 --- a/src/input/libdvdnav/remap.c +++ b/src/input/libdvdnav/remap.c @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: remap.c,v 1.5 2006/09/17 13:01:08 valtri Exp $ + * $Id: remap.c,v 1.6 2006/12/08 16:26:10 mshopf Exp $ */ #include @@ -193,10 +193,7 @@ remap_t* remap_loadmap( char *title) { /* Build the map filename */ home = getenv("HOME"); assert(home); - strncpy(fname, home, sizeof(fname)); - strncat(fname, "/.dvdnav/", sizeof(fname)); - strncat(fname, title, sizeof(fname)); - strncat(fname, ".map", sizeof(fname)); + snprintf (fname, sizeof(fname), "%s/.dvdnav/%s.map", home, title); /* Open the map file */ fp = fopen( fname, "r"); diff --git a/src/input/vcd/libcdio/iso9660_fs.c b/src/input/vcd/libcdio/iso9660_fs.c index 0a2de8fa1..fff12cd7c 100644 --- a/src/input/vcd/libcdio/iso9660_fs.c +++ b/src/input/vcd/libcdio/iso9660_fs.c @@ -1,5 +1,5 @@ /* - $Id: iso9660_fs.c,v 1.6 2006/09/28 08:19:14 dgp85 Exp $ + $Id: iso9660_fs.c,v 1.7 2006/12/08 16:26:10 mshopf Exp $ Copyright (C) 2001 Herbert Valerio Riedel Copyright (C) 2003, 2004 Rocky Bernstein @@ -51,7 +51,7 @@ #include -static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.6 2006/09/28 08:19:14 dgp85 Exp $"; +static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.7 2006/12/08 16:26:10 mshopf Exp $"; /* Implementation of iso9660_t type */ struct _iso9660 { @@ -1200,9 +1200,7 @@ find_fs_lsn_recurse (CdIo *p_cdio, const char pathname[], lsn_t lsn) char _fullname[4096] = { 0, }; char *filename = (char *) statbuf->filename; - snprintf (_fullname, sizeof (_fullname), "%s%s", pathname, filename); - - strncat (_fullname, "/", sizeof (_fullname)); + snprintf (_fullname, sizeof (_fullname), "%s%s/", pathname, filename); if (statbuf->type == _STAT_DIR && strcmp ((char *) statbuf->filename, ".") diff --git a/src/input/vcd/libvcd/vcd.c b/src/input/vcd/libvcd/vcd.c index e9618a7d7..0772149ec 100644 --- a/src/input/vcd/libvcd/vcd.c +++ b/src/input/vcd/libvcd/vcd.c @@ -1,5 +1,5 @@ /* - $Id: vcd.c,v 1.3 2005/01/01 02:43:59 rockyb Exp $ + $Id: vcd.c,v 1.4 2006/12/08 16:26:10 mshopf Exp $ Copyright (C) 2000, 2004 Herbert Valerio Riedel @@ -49,7 +49,7 @@ #include "util.h" #include "vcd.h" -static const char _rcsid[] = "$Id: vcd.c,v 1.3 2005/01/01 02:43:59 rockyb Exp $"; +static const char _rcsid[] = "$Id: vcd.c,v 1.4 2006/12/08 16:26:10 mshopf Exp $"; static const char zero[CDIO_CD_FRAMESIZE_RAW] = { 0, }; @@ -1664,7 +1664,7 @@ _write_sequence (VcdObj *obj, int track_idx) track->info->ahdr[i].bitrate / 1024, _mode_str[track->info->ahdr[i].mode]); - strncat (buf2, buf, sizeof(buf)); + strncat (buf2, buf, sizeof(buf2) - strlen(buf2) - 1); } vcd_info ("writing track %d, %s, %s, %s...", track_idx + 2, -- cgit v1.2.3 From 5503c1f3bf18cc0f74913040f7fc91ad7a70daf6 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Fri, 8 Dec 2006 22:26:22 +0000 Subject: Prevent segfaults on out-of-range last_channel. CVS patchset: 8408 CVS date: 2006/12/08 22:26:22 --- src/input/input_dvb.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/input') diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 8d06cb61e..dbec9ff17 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -3183,15 +3183,14 @@ static char **dvb_class_get_autoplay_list(input_class_t * this_gen, } if (lastchannel_enable.num_value){ - if (lastchannel.num_value>-1) /* plugin has been used before - channel is valid */ - sprintf(foobuffer,"dvb://%s",channels[lastchannel.num_value].name); - else /* set a reasonable default - the first channel */ - sprintf(foobuffer,"dvb://%s",channels[lastchannel_enable.num_value].name); - if(class->autoplaylist[0]) - free(class->autoplaylist[0]); - class->autoplaylist[0]=xine_xmalloc(128); - _x_assert(class->autoplaylist[0] != NULL); - class->autoplaylist[0]=strdup(foobuffer); + if (lastchannel.num_value > -1 && lastchannel.num_value < num_channels) + /* plugin has been used before - channel is valid */ + sprintf (foobuffer, "dvb://%s", channels[lastchannel.num_value].name); + else + /* set a reasonable default - the first channel */ + sprintf (foobuffer, "dvb://%s", num_channels ? channels[0].name : "0"); + free(class->autoplaylist[0]); + class->autoplaylist[0]=strdup(foobuffer); } free(tmpbuffer); -- cgit v1.2.3 From 42b4630389962e4865ea1d45a01baa5a9eb86b12 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 13 Dec 2006 19:14:19 +0000 Subject: Close the device if it was opened but the content isn't that of a VCD. Holding it open prevents eject from working. CVS patchset: 8412 CVS date: 2006/12/13 19:14:19 --- src/input/vcd/vcdio.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/input') diff --git a/src/input/vcd/vcdio.c b/src/input/vcd/vcdio.c index 7fee5a0db..31cc0cd49 100644 --- a/src/input/vcd/vcdio.c +++ b/src/input/vcd/vcdio.c @@ -1,5 +1,5 @@ /* - $Id: vcdio.c,v 1.7 2005/06/14 17:27:12 rockyb Exp $ + $Id: vcdio.c,v 1.8 2006/12/13 19:14:19 dsalt Exp $ Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein @@ -103,9 +103,21 @@ vcdio_open(vcdplayer_t *p_vcdplayer, char *intended_vcd_device) } } - if ( vcdinfo_open(&p_vcdplayer->vcd, &intended_vcd_device, DRIVER_UNKNOWN, - NULL) != VCDINFO_OPEN_VCD) { - return false; + switch ( vcdinfo_open(&p_vcdplayer->vcd, &intended_vcd_device, + DRIVER_UNKNOWN, NULL)) + { + case VCDINFO_OPEN_ERROR: + /* Failed to open the device => return failure */ + return false; + + case VCDINFO_OPEN_VCD: + /* Opened the device, and it's a VCD => proceed */ + break; + + default: + /* Opened the device, but it's not a VCD => close it & return failure */ + vcdinfo_close(p_vcdplayer->vcd); + return false; } p_vcdinfo = p_vcdplayer->vcd; -- cgit v1.2.3 From 66a3c5bcaaf6f4ac936554ebf39eaaec4535e034 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 13 Dec 2006 19:21:10 +0000 Subject: Close the device after building the MRL list if it wasn't previously open. Holding it open prevents eject from working. CVS patchset: 8413 CVS date: 2006/12/13 19:21:10 --- src/input/vcd/xineplug_inp_vcd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c index baa6b0d9a..c5cd7c031 100644 --- a/src/input/vcd/xineplug_inp_vcd.c +++ b/src/input/vcd/xineplug_inp_vcd.c @@ -1,5 +1,5 @@ /* - $Id: xineplug_inp_vcd.c,v 1.50 2006/07/10 22:08:29 dgp85 Exp $ + $Id: xineplug_inp_vcd.c,v 1.51 2006/12/13 19:21:10 dsalt Exp $ Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein @@ -322,6 +322,7 @@ vcd_build_mrl_list(vcd_input_class_t *class, char *vcd_device) unsigned int n, i=0; unsigned int i_entries; vcdinfo_obj_t *p_vcdinfo; + int was_open; if (NULL == class) { LOG_MSG("%s", _("was passed a null class parameter")); @@ -331,7 +332,7 @@ vcd_build_mrl_list(vcd_input_class_t *class, char *vcd_device) vcdplayer = &(my_vcd.player); /* If VCD already open, we gotta close and stop it. */ - if (vcdplayer->b_opened) { + if ((was_open = vcdplayer->b_opened)) { vcd_close(class); } @@ -374,6 +375,8 @@ vcd_build_mrl_list(vcd_input_class_t *class, char *vcd_device) if (NULL == class->mrls) { LOG_ERR("Can't calloc %d MRL entries", class->num_mrls); class->num_mrls = 0; + if (!was_open) + vcdio_close(vcdplayer); return false; } @@ -445,6 +448,8 @@ vcd_build_mrl_list(vcd_input_class_t *class, char *vcd_device) class->mrl_track_offset, class->mrl_entry_offset, class->mrl_play_offset, class->mrl_segment_offset); + if (!was_open) + vcdio_close(vcdplayer); return true; } -- cgit v1.2.3 From 25d5d0647f9da129576373972ad53e107743eeb4 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 13 Dec 2006 20:52:27 +0000 Subject: Don't leak directory handles when reading DVDs or DVD images. Does not affect access via DVD device or image. CVS patchset: 8414 CVS date: 2006/12/13 20:52:27 --- src/input/libdvdnav/dvd_reader.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/input') diff --git a/src/input/libdvdnav/dvd_reader.c b/src/input/libdvdnav/dvd_reader.c index e71d6ca42..7ecd8f1ba 100644 --- a/src/input/libdvdnav/dvd_reader.c +++ b/src/input/libdvdnav/dvd_reader.c @@ -603,10 +603,12 @@ static int findDirFile( const char *path, const char *file, char *filename ) sprintf( filename, "%s%s%s", path, ( ( path[ strlen( path ) - 1 ] == '/' ) ? "" : "/" ), ent->d_name ); + closedir (dir); return 0; } } + closedir (dir); return -1; } -- cgit v1.2.3 From 8eae85edce64a5454036be7ffa5c526dc7e1f92e Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Mon, 18 Dec 2006 21:22:45 +0000 Subject: Added INPUT_CAP_NOCACHE: disable usage of internal input cache by default. CVS patchset: 8421 CVS date: 2006/12/18 21:22:45 --- src/input/input_plugin.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h index 2e9f0dca6..146207e76 100644 --- a/src/input/input_plugin.h +++ b/src/input/input_plugin.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_plugin.h,v 1.60 2005/10/14 21:02:16 miguelfreitas Exp $ + * $Id: input_plugin.h,v 1.61 2006/12/18 21:22:45 klan Exp $ */ #ifndef HAVE_INPUT_PLUGIN_H @@ -297,6 +297,15 @@ struct input_plugin_s { #define INPUT_CAP_RIP_FORBIDDEN 0x00000100 +/* + * INPUT_CAP_NOCACHE: + * means that buffered input must not be used. + * (i.e. disable input_cache internal plugin) + */ + +#define INPUT_CAP_NOCACHE 0x00000200 + + #define INPUT_IS_SEEKABLE(input) (((input)->get_capabilities(input) & INPUT_CAP_SEEKABLE) != 0) #define INPUT_OPTIONAL_UNSUPPORTED 0 -- cgit v1.2.3 From 25665d389818fca81eefaf83b217c0061b482551 Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Mon, 18 Dec 2006 21:31:47 +0000 Subject: Partially implemented RTSP seekability: support starting the playback at an optional time by delaying the PLAY request upon the first call to rtsp_session_read() and setting the playback start time via input_plugin->seek_time(). CVS patchset: 8422 CVS date: 2006/12/18 21:31:47 --- src/input/input_rtsp.c | 26 ++++++++++++++++++-------- src/input/libreal/real.c | 6 +----- src/input/librtsp/rtsp_session.c | 30 +++++++++++++++++++++++++++--- src/input/librtsp/rtsp_session.h | 4 +++- 4 files changed, 49 insertions(+), 17 deletions(-) (limited to 'src/input') diff --git a/src/input/input_rtsp.c b/src/input/input_rtsp.c index 0256edc8d..bcbc19555 100644 --- a/src/input/input_rtsp.c +++ b/src/input/input_rtsp.c @@ -134,6 +134,18 @@ static off_t rtsp_plugin_seek (input_plugin_t *this_gen, off_t offset, int origi return this->curpos; } +static off_t rtsp_plugin_seek_time (input_plugin_t *this_gen, int time_offset, int origin) { + + rtsp_input_plugin_t *this = (rtsp_input_plugin_t *) this_gen; + + lprintf ("seek_time %d msec, origin %d\n", time_offset, origin); + + if (origin == SEEK_SET) + rtsp_session_set_start_time (this->rtsp, time_offset); + + return this->curpos; +} + static off_t rtsp_plugin_get_length (input_plugin_t *this_gen) { /* @@ -145,7 +157,7 @@ static off_t rtsp_plugin_get_length (input_plugin_t *this_gen) { } static uint32_t rtsp_plugin_get_capabilities (input_plugin_t *this_gen) { - return INPUT_CAP_PREVIEW | INPUT_CAP_RIP_FORBIDDEN; + return INPUT_CAP_PREVIEW | INPUT_CAP_RIP_FORBIDDEN | INPUT_CAP_NOCACHE; } static uint32_t rtsp_plugin_get_blocksize (input_plugin_t *this_gen) { @@ -212,7 +224,7 @@ static int rtsp_plugin_open (input_plugin_t *this_gen) { lprintf ("trying to open '%s'\n", this->mrl); - rtsp = rtsp_session_start(this->stream,this->mrl); + rtsp = rtsp_session_start(this->stream, this->mrl); if (!rtsp) { lprintf ("returning null.\n"); @@ -226,22 +238,19 @@ static int rtsp_plugin_open (input_plugin_t *this_gen) { } static input_plugin_t *rtsp_class_get_instance (input_class_t *cls_gen, xine_stream_t *stream, - const char *data) { + const char *mrl) { /* rtsp_input_class_t *cls = (rtsp_input_class_t *) cls_gen; */ rtsp_input_plugin_t *this; - char *mrl = strdup(data); - if (strncasecmp (mrl, "rtsp://", 6)) { - free (mrl); + if (strncasecmp (mrl, "rtsp://", 6)) return NULL; - } this = (rtsp_input_plugin_t *) xine_xmalloc (sizeof (rtsp_input_plugin_t)); this->stream = stream; this->rtsp = NULL; - this->mrl = mrl; + this->mrl = strdup (mrl); /* since we handle only real streams yet, we can savely add * an .rm extention to force handling by demux_real. */ @@ -255,6 +264,7 @@ static input_plugin_t *rtsp_class_get_instance (input_class_t *cls_gen, xine_str this->input_plugin.read = rtsp_plugin_read; this->input_plugin.read_block = rtsp_plugin_read_block; this->input_plugin.seek = rtsp_plugin_seek; + this->input_plugin.seek_time = rtsp_plugin_seek_time; this->input_plugin.get_current_pos = rtsp_plugin_get_current_pos; this->input_plugin.get_length = rtsp_plugin_get_length; this->input_plugin.get_blocksize = rtsp_plugin_get_blocksize; diff --git a/src/input/libreal/real.c b/src/input/libreal/real.c index 270fd16e4..c3d39fab3 100644 --- a/src/input/libreal/real.c +++ b/src/input/libreal/real.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: real.c,v 1.24 2006/11/29 19:43:01 dgp85 Exp $ + * $Id: real.c,v 1.25 2006/12/18 21:31:47 klan Exp $ * * special functions for real streams. * adopted from joschkas real tools. @@ -715,10 +715,6 @@ rmff_header_t *real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwid rtsp_schedule_field(rtsp_session, subscribe); rtsp_request_setparameter(rtsp_session,NULL); - /* and finally send a play request */ - rtsp_schedule_field(rtsp_session, "Range: npt=0-"); - rtsp_request_play(rtsp_session,NULL); - xine_buffer_free(subscribe); xine_buffer_free(buf); return h; diff --git a/src/input/librtsp/rtsp_session.c b/src/input/librtsp/rtsp_session.c index 6f06693a9..8a5135ac3 100644 --- a/src/input/librtsp/rtsp_session.c +++ b/src/input/librtsp/rtsp_session.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: rtsp_session.c,v 1.16 2004/04/24 16:55:42 miguelfreitas Exp $ + * $Id: rtsp_session.c,v 1.17 2006/12/18 21:31:47 klan Exp $ * * high level interface to rtsp servers. */ @@ -53,7 +53,7 @@ struct rtsp_session_s { rtsp_t *s; /* receive buffer */ - uint8_t *recv; + uint8_t *recv; int recv_size; int recv_read; @@ -62,11 +62,13 @@ struct rtsp_session_s { int header_len; int header_read; + int playing; + int start_time; }; rtsp_session_t *rtsp_session_start(xine_stream_t *stream, char *mrl) { - rtsp_session_t *rtsp_session = malloc(sizeof(rtsp_session_t)); + rtsp_session_t *rtsp_session = xine_xmalloc(sizeof(rtsp_session_t)); char *server; char *mrl_line=strdup(mrl); rmff_header_t *h; @@ -144,6 +146,23 @@ connect: return rtsp_session; } +void rtsp_session_set_start_time (rtsp_session_t *this, int start_time) { + + if (start_time >= 0) + this->start_time = start_time; +} + +static void rtsp_session_play (rtsp_session_t *this) { + + char buf[256]; + + snprintf (buf, sizeof(buf), "Range: npt=%d.%03d-", + this->start_time/1000, this->start_time%1000); + + rtsp_schedule_field (this->s, buf); + rtsp_request_play (this->s,NULL); +} + int rtsp_session_read (rtsp_session_t *this, char *data, int len) { int to_copy=len; @@ -154,6 +173,11 @@ int rtsp_session_read (rtsp_session_t *this, char *data, int len) { if (len < 0) return 0; while (to_copy > fill) { + if (!this->playing) { + rtsp_session_play (this); + this->playing = 1; + } + memcpy(dest, source, fill); to_copy -= fill; dest += fill; diff --git a/src/input/librtsp/rtsp_session.h b/src/input/librtsp/rtsp_session.h index 140d09a0a..649842e7a 100644 --- a/src/input/librtsp/rtsp_session.h +++ b/src/input/librtsp/rtsp_session.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: rtsp_session.h,v 1.6 2003/12/09 00:02:31 f1rmb Exp $ + * $Id: rtsp_session.h,v 1.7 2006/12/18 21:31:47 klan Exp $ * * high level interface to rtsp servers. */ @@ -29,6 +29,8 @@ typedef struct rtsp_session_s rtsp_session_t; rtsp_session_t *rtsp_session_start(xine_stream_t *stream, char *mrl); +void rtsp_session_set_start_time(rtsp_session_t *this, int start_time); + int rtsp_session_read(rtsp_session_t *session, char *data, int len); int rtsp_session_peek_header(rtsp_session_t *this, char *buf, int maxsize); -- cgit v1.2.3 From ace000d3a03181607b130c28da69652f5f60f7d6 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Tue, 19 Dec 2006 19:10:50 +0000 Subject: Mark string-type configuration items according to whether they're plain strings or names of files, device nodes or directories. This information is available to front ends (via .num_value) so that they can present file/dir-open dialogue boxes if they so choose. Subtitle font selection is split up due to this. CVS patchset: 8425 CVS date: 2006/12/19 19:10:50 --- src/input/input_cdda.c | 10 +++++----- src/input/input_dvd.c | 13 +++++++------ src/input/input_file.c | 6 +++--- src/input/input_pvr.c | 6 +++--- src/input/input_v4l.c | 8 ++++---- src/input/input_vcd.c | 4 ++-- src/input/vcd/xineplug_inp_vcd.c | 6 +++--- 7 files changed, 27 insertions(+), 26 deletions(-) (limited to 'src/input') diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index f51ffc646..7ee2e7899 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -20,7 +20,7 @@ * Compact Disc Digital Audio (CDDA) Input Plugin * by Mike Melanson (melanson@pcisys.net) * - * $Id: input_cdda.c,v 1.90 2006/08/11 21:40:02 dsalt Exp $ + * $Id: input_cdda.c,v 1.91 2006/12/19 19:10:51 dsalt Exp $ */ #ifdef HAVE_CONFIG_H @@ -2675,8 +2675,8 @@ static void *init_plugin (xine_t *xine, void *data) { this->mrls_allocated_entries = 0; this->ip = NULL; - this->cdda_device = config->register_string(config, "media.audio_cd.device", - DEFAULT_CDDA_DEVICE, + this->cdda_device = config->register_filename(config, "media.audio_cd.device", + DEFAULT_CDDA_DEVICE, XINE_CONFIG_STRING_IS_DEVICE_NAME, _("device used for CD audio"), _("The path to the device, usually a " "CD or DVD drive, which you intend to use " @@ -2704,8 +2704,8 @@ static void *init_plugin (xine_t *xine, void *data) { "title and track information from."), XINE_CONFIG_SECURITY, port_changed_cb, (void *) this); - config->register_string(config, "media.audio_cd.cddb_cachedir", - (_cdda_cddb_get_default_location()), + config->register_filename(config, "media.audio_cd.cddb_cachedir", + (_cdda_cddb_get_default_location()), XINE_CONFIG_STRING_IS_DIRECTORY_NAME, _("CDDB cache directory"), _("The replies from the CDDB server will be " "cached in this directory.\nThis setting is security critical, because files " "with uncontrollable names will be created in this directory. Be sure to use " diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 26eb67e24..ddc3fe964 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.211 2006/10/29 19:39:39 hadess Exp $ + * $Id: input_dvd.c,v 1.212 2006/12/19 19:10:51 dsalt Exp $ * */ @@ -1779,9 +1779,9 @@ static void *init_class (xine_t *xine, void *data) { this->ip = NULL; - this->dvd_device = config->register_string(config, + this->dvd_device = config->register_filename(config, "media.dvd.device", - DVD_PATH, + DVD_PATH, XINE_CONFIG_STRING_IS_DEVICE_NAME, _("device used for DVD playback"), _("The path to the device, usually a " "DVD drive, which you intend to use for playing DVDs."), @@ -1799,8 +1799,9 @@ static void *init_class (xine_t *xine, void *data) { char *css_cache_default, *css_cache; int mode; - raw_device = config->register_string(config, "media.dvd.raw_device", - RDVD_PATH, _("raw device set up for DVD access"), + raw_device = config->register_filename(config, "media.dvd.raw_device", + RDVD_PATH, XINE_CONFIG_STRING_IS_DEVICE_NAME, + _("raw device set up for DVD access"), _("If this points to a raw device connected to your " "DVD device, xine will use the raw device for playback. " "This has the advantage of being slightly faster and " @@ -1822,7 +1823,7 @@ static void *init_class (xine_t *xine, void *data) { css_cache_default = (char *)malloc(strlen(xine_get_homedir()) + 10); sprintf(css_cache_default, "%s/.dvdcss/", xine_get_homedir()); - css_cache = config->register_string(config, "media.dvd.css_cache_path", css_cache_default, + css_cache = config->register_filename(config, "media.dvd.css_cache_path", css_cache_default, XINE_CONFIG_STRING_IS_DIRECTORY_NAME, _("path to the title key cache"), _("Since cracking the copy protection of scrambled DVDs can " "be quite time consuming, libdvdcss will cache the cracked " diff --git a/src/input/input_file.c b/src/input/input_file.c index 93d208c4e..db7937956 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_file.c,v 1.117 2006/10/01 20:14:43 dgp85 Exp $ + * $Id: input_file.c,v 1.118 2006/12/19 19:10:51 dsalt Exp $ */ #ifdef HAVE_CONFIG_H @@ -1027,8 +1027,8 @@ static void *init_plugin (xine_t *xine, void *data) { if(getcwd(current_dir, sizeof(current_dir)) == NULL) strcpy(current_dir, "."); - this->origin_path = config->register_string(config, "media.files.origin_path", - current_dir, + this->origin_path = config->register_filename(config, "media.files.origin_path", + current_dir, XINE_CONFIG_STRING_IS_DIRECTORY_NAME, _("file browsing start location"), _("The browser to select the file to play will " "start at this location."), diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c index 1461d0f9e..f47bfe890 100644 --- a/src/input/input_pvr.c +++ b/src/input/input_pvr.c @@ -38,7 +38,7 @@ * usage: * xine pvr:/\!\! * - * $Id: input_pvr.c,v 1.62 2006/07/10 22:08:15 dgp85 Exp $ + * $Id: input_pvr.c,v 1.63 2006/12/19 19:10:51 dsalt Exp $ */ /************************************************************************** @@ -1548,9 +1548,9 @@ static void *init_plugin (xine_t *xine, void *data) { this->xine = xine; this->config = xine->config; - this->devname = this->config->register_string(this->config, + this->devname = this->config->register_filename(this->config, "media.wintv_pvr.device", - PVR_DEVICE, + PVR_DEVICE, XINE_CONFIG_STRING_IS_DEVICE_NAME, _("device used for WinTV-PVR 250/350 (pvr plugin)"), _("The path to the device of your WinTV card."), 10, NULL, diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c index 1dfde167f..8143c6b13 100644 --- a/src/input/input_v4l.c +++ b/src/input/input_v4l.c @@ -1907,8 +1907,8 @@ static void *init_video_class (xine_t *xine, void *data) this->input_class.dispose = v4l_class_dispose; this->input_class.eject_media = NULL; - config->register_string (config, "media.video4linux.video_device", - VIDEO_DEV, + config->register_filename (config, "media.video4linux.video_device", + VIDEO_DEV, XINE_CONFIG_STRING_IS_DEVICE_NAME, _("v4l video device"), _("The path to your Video4Linux video device."), 10, NULL, NULL); @@ -1933,8 +1933,8 @@ static void *init_radio_class (xine_t *xine, void *data) this->input_class.dispose = v4l_class_dispose; this->input_class.eject_media = NULL; - config->register_string (config, "media.video4linux.radio_device", - RADIO_DEV, + config->register_filename (config, "media.video4linux.radio_device", + RADIO_DEV, XINE_CONFIG_STRING_IS_DEVICE_NAME, _("v4l radio device"), _("The path to your Video4Linux radio device."), 10, NULL, NULL); diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index 0103027bf..ab0715e96 100644 --- a/src/input/input_vcd.c +++ b/src/input/input_vcd.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_vcd.c,v 1.85 2006/07/10 22:08:16 dgp85 Exp $ + * $Id: input_vcd.c,v 1.86 2006/12/19 19:10:51 dsalt Exp $ * */ @@ -1094,7 +1094,7 @@ static void *init_class (xine_t *xine, void *data) { this->input_class.dispose = vcd_class_dispose; this->input_class.eject_media = vcd_class_eject_media; - this->device = config->register_string (config, "media.vcd.device", CDROM, + this->device = config->register_filename (config, "media.vcd.device", CDROM, XINE_CONFIG_STRING_IS_DEVICE_NAME, _("device used for VCD playback"), _("The path to the device, usually a CD or DVD drive, " "you intend to play your VideoCDs with."), diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c index c5cd7c031..87b442acd 100644 --- a/src/input/vcd/xineplug_inp_vcd.c +++ b/src/input/vcd/xineplug_inp_vcd.c @@ -1,5 +1,5 @@ /* - $Id: xineplug_inp_vcd.c,v 1.51 2006/12/13 19:21:10 dsalt Exp $ + $Id: xineplug_inp_vcd.c,v 1.52 2006/12/19 19:10:51 dsalt Exp $ Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein @@ -1829,9 +1829,9 @@ _("The VCD play unit to use when none is specified in an MRL, e.g. " class->vcd_device = - strdup (config->register_string(config, + strdup (config->register_filename(config, "media.vcd.device", - "", + "", XINE_CONFIG_STRING_IS_DEVICE_NAME, _("CD-ROM drive used for VCD when none given"), _("What to use if no drive specified. If the setting is empty, xine will scan for CD drives."), 20, -- cgit v1.2.3 From efab2aab1e401c4a7ed564ab5535ba367bce29ed Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Fri, 22 Dec 2006 16:38:15 +0000 Subject: Removed INPUT_CAP_NOCACHE. CVS patchset: 8432 CVS date: 2006/12/22 16:38:15 --- src/input/input_plugin.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/input') diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h index 146207e76..f686f2227 100644 --- a/src/input/input_plugin.h +++ b/src/input/input_plugin.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_plugin.h,v 1.61 2006/12/18 21:22:45 klan Exp $ + * $Id: input_plugin.h,v 1.62 2006/12/22 16:38:15 klan Exp $ */ #ifndef HAVE_INPUT_PLUGIN_H @@ -297,14 +297,6 @@ struct input_plugin_s { #define INPUT_CAP_RIP_FORBIDDEN 0x00000100 -/* - * INPUT_CAP_NOCACHE: - * means that buffered input must not be used. - * (i.e. disable input_cache internal plugin) - */ - -#define INPUT_CAP_NOCACHE 0x00000200 - #define INPUT_IS_SEEKABLE(input) (((input)->get_capabilities(input) & INPUT_CAP_SEEKABLE) != 0) -- cgit v1.2.3 From 40df4b4fb7b470895f1e73e9eb66df177f9e910b Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Fri, 22 Dec 2006 16:42:20 +0000 Subject: Removed INPUT_CAP_NOCACHE. Modified rtsp_session_read() to break reading after the end of the header. Support user-specified bandwidth via the "media.network.bandwidth" config option. CVS patchset: 8433 CVS date: 2006/12/22 16:42:20 --- src/input/input_rtsp.c | 2 +- src/input/librtsp/rtsp_session.c | 43 +++++++++++++++++++++++++++++++++++----- 2 files changed, 39 insertions(+), 6 deletions(-) (limited to 'src/input') diff --git a/src/input/input_rtsp.c b/src/input/input_rtsp.c index bcbc19555..fec7b9713 100644 --- a/src/input/input_rtsp.c +++ b/src/input/input_rtsp.c @@ -157,7 +157,7 @@ static off_t rtsp_plugin_get_length (input_plugin_t *this_gen) { } static uint32_t rtsp_plugin_get_capabilities (input_plugin_t *this_gen) { - return INPUT_CAP_PREVIEW | INPUT_CAP_RIP_FORBIDDEN | INPUT_CAP_NOCACHE; + return INPUT_CAP_PREVIEW | INPUT_CAP_RIP_FORBIDDEN; } static uint32_t rtsp_plugin_get_blocksize (input_plugin_t *this_gen) { diff --git a/src/input/librtsp/rtsp_session.c b/src/input/librtsp/rtsp_session.c index 8a5135ac3..1b19421c3 100644 --- a/src/input/librtsp/rtsp_session.c +++ b/src/input/librtsp/rtsp_session.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: rtsp_session.c,v 1.17 2006/12/18 21:31:47 klan Exp $ + * $Id: rtsp_session.c,v 1.18 2006/12/22 16:42:20 klan Exp $ * * high level interface to rtsp servers. */ @@ -60,19 +60,42 @@ struct rtsp_session_s { /* header buffer */ uint8_t header[HEADER_SIZE]; int header_len; - int header_read; + int header_left; int playing; int start_time; }; +/* network bandwidth */ +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}; + + rtsp_session_t *rtsp_session_start(xine_stream_t *stream, char *mrl) { rtsp_session_t *rtsp_session = xine_xmalloc(sizeof(rtsp_session_t)); + xine_t *xine = stream->xine; char *server; char *mrl_line=strdup(mrl); rmff_header_t *h; - uint32_t bandwidth=10485800; + int bandwidth_id; + uint32_t bandwidth; + + bandwidth_id = xine->config->register_enum(xine->config, "media.network.bandwidth", 10, + (char **)rtsp_bandwidth_strs, + _("network bandwidth"), + _("Specify the bandwidth of your internet connection here. " + "This will be used when streaming servers offer different versions " + "with different bandwidth requirements of the same stream."), + 0, NULL, NULL); + bandwidth = rtsp_bandwidths[bandwidth_id]; rtsp_session->recv = xine_buffer_init(BUF_SIZE); @@ -125,7 +148,8 @@ connect: } } - rtsp_session->header_len=rmff_dump_header(h,rtsp_session->header,1024); + rtsp_session->header_left = + rtsp_session->header_len = rmff_dump_header(h,rtsp_session->header,HEADER_SIZE); xine_buffer_copyin(rtsp_session->recv, 0, rtsp_session->header, rtsp_session->header_len); rtsp_session->recv_size = rtsp_session->header_len; @@ -170,7 +194,16 @@ int rtsp_session_read (rtsp_session_t *this, char *data, int len) { char *source=this->recv + this->recv_read; int fill=this->recv_size - this->recv_read; - if (len < 0) return 0; + if (len < 0) + return 0; + + if (this->header_left) { + if (to_copy > this->header_left) + to_copy = this->header_left; + + this->header_left -= to_copy; + } + while (to_copy > fill) { if (!this->playing) { -- cgit v1.2.3 From e3d7457a7cd9555e1f8a618ecad38e3f565e614e Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Fri, 22 Dec 2006 18:08:10 +0000 Subject: In rtsp_session_read(): return the actual amount of bytes read. CVS patchset: 8435 CVS date: 2006/12/22 18:08:10 --- src/input/librtsp/rtsp_session.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/input') diff --git a/src/input/librtsp/rtsp_session.c b/src/input/librtsp/rtsp_session.c index 1b19421c3..66de10584 100644 --- a/src/input/librtsp/rtsp_session.c +++ b/src/input/librtsp/rtsp_session.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: rtsp_session.c,v 1.18 2006/12/22 16:42:20 klan Exp $ + * $Id: rtsp_session.c,v 1.19 2006/12/22 18:08:10 klan Exp $ * * high level interface to rtsp servers. */ @@ -189,7 +189,7 @@ static void rtsp_session_play (rtsp_session_t *this) { int rtsp_session_read (rtsp_session_t *this, char *data, int len) { - int to_copy=len; + int to_copy; char *dest=data; char *source=this->recv + this->recv_read; int fill=this->recv_size - this->recv_read; @@ -198,12 +198,13 @@ int rtsp_session_read (rtsp_session_t *this, char *data, int len) { return 0; if (this->header_left) { - if (to_copy > this->header_left) - to_copy = this->header_left; + if (len > this->header_left) + len = this->header_left; - this->header_left -= to_copy; + this->header_left -= len; } + to_copy = len; while (to_copy > fill) { if (!this->playing) { -- cgit v1.2.3 From 1b7896d7d05f339e7317b45c93dda651475c66ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 25 Dec 2006 15:39:31 +0000 Subject: * Fix invalid memory access in Real Media ASM parser; reported by Roland Kay. [bug #1603503] CVS patchset: 8440 CVS date: 2006/12/25 15:39:31 --- src/input/libreal/asmrp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/libreal/asmrp.c b/src/input/libreal/asmrp.c index 5fd5ae798..8afc19df6 100644 --- a/src/input/libreal/asmrp.c +++ b/src/input/libreal/asmrp.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: asmrp.c,v 1.9 2006/11/29 19:43:01 dgp85 Exp $ + * $Id: asmrp.c,v 1.10 2006/12/25 15:39:31 dgp85 Exp $ * * a parser for real's asm rules * @@ -417,7 +417,9 @@ static int asmrp_operand (asmrp_t *p) { i = asmrp_find_id (p, p->str); if (i<0) { - lprintf ("error: unknown identifier %s\n", p->str); + printf ("error: unknown identifier %s\n", p->str); + ret = 0; + break; } ret = p->sym_tab[i].v; -- cgit v1.2.3 From 3a375f89ea4f1e10b847a2313311531eeb6c3b22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 25 Dec 2006 16:12:16 +0000 Subject: * Fix program termination due to invalid Real Media SDP; reported by Roland Kay. [bug #1602663] CVS patchset: 8441 CVS date: 2006/12/25 16:12:16 --- src/input/libreal/sdpplin.c | 51 +++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 20 deletions(-) (limited to 'src/input') diff --git a/src/input/libreal/sdpplin.c b/src/input/libreal/sdpplin.c index e77781253..dc83c3ee1 100644 --- a/src/input/libreal/sdpplin.c +++ b/src/input/libreal/sdpplin.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: sdpplin.c,v 1.6 2006/06/20 01:07:58 dgp85 Exp $ + * $Id: sdpplin.c,v 1.7 2006/12/25 16:12:17 dgp85 Exp $ * * sdp/sdpplin parser. * @@ -71,8 +71,9 @@ static char *b64_decode(const char *in, char *out, int *size) int c = in[i+j]; if (dtable[c] & 0x80) { - printf("Illegal character '%c' in input.\n", c); - exit(1); + fprintf(stderr, "Illegal character '%c' in input.\n", c); + *size = 0; + return NULL; } a[i] = (char) c; b[i] = (char) dtable[c]; @@ -200,11 +201,13 @@ static sdpplin_stream_t *sdpplin_parse_stream(char **data) { if(filter(*data,"a=OpaqueData:buffer;",&buf)) { decoded = b64_decode(buf, decoded, &(desc->mlti_data_size)); - desc->mlti_data = malloc(sizeof(char)*desc->mlti_data_size); - memcpy(desc->mlti_data, decoded, desc->mlti_data_size); - handled=1; - *data=nl(*data); - lprintf("mlti_data_size: %i\n", desc->mlti_data_size); + if ( decoded != NULL ) { + desc->mlti_data = malloc(sizeof(char)*desc->mlti_data_size); + memcpy(desc->mlti_data, decoded, desc->mlti_data_size); + handled=1; + *data=nl(*data); + lprintf("mlti_data_size: %i\n", desc->mlti_data_size); + } } if(filter(*data,"a=ASMRuleBook:string;",&buf)) { @@ -252,30 +255,38 @@ sdpplin_t *sdpplin_parse(char *data) { if(filter(data,"a=Title:buffer;",&buf)) { decoded=b64_decode(buf, decoded, &len); - desc->title=strdup(decoded); - handled=1; - data=nl(data); + if ( decoded != NULL ) { + desc->title=strdup(decoded); + handled=1; + data=nl(data); + } } if(filter(data,"a=Author:buffer;",&buf)) { decoded=b64_decode(buf, decoded, &len); - desc->author=strdup(decoded); - handled=1; - data=nl(data); + if ( decoded != NULL ) { + desc->author=strdup(decoded); + handled=1; + data=nl(data); + } } if(filter(data,"a=Copyright:buffer;",&buf)) { decoded=b64_decode(buf, decoded, &len); - desc->copyright=strdup(decoded); - handled=1; - data=nl(data); + if ( decoded != NULL ) { + desc->copyright=strdup(decoded); + handled=1; + data=nl(data); + } } if(filter(data,"a=Abstract:buffer;",&buf)) { decoded=b64_decode(buf, decoded, &len); - desc->abstract=strdup(decoded); - handled=1; - data=nl(data); + if ( decoded != NULL ) { + desc->abstract=strdup(decoded); + handled=1; + data=nl(data); + } } if(filter(data,"a=StreamCount:integer;",&buf)) { -- cgit v1.2.3 From 1ac605341958564ce84a3c9784a746920c7148a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 25 Dec 2006 16:21:56 +0000 Subject: * Fix invalid memory access in Real Media SDP with tailored stream; reported by Roland Kay. [bug #1602631] CVS patchset: 8442 CVS date: 2006/12/25 16:21:56 --- src/input/libreal/sdpplin.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/libreal/sdpplin.c b/src/input/libreal/sdpplin.c index dc83c3ee1..019237243 100644 --- a/src/input/libreal/sdpplin.c +++ b/src/input/libreal/sdpplin.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: sdpplin.c,v 1.7 2006/12/25 16:12:17 dgp85 Exp $ + * $Id: sdpplin.c,v 1.8 2006/12/25 16:21:56 dgp85 Exp $ * * sdp/sdpplin parser. * @@ -242,11 +242,17 @@ sdpplin_t *sdpplin_parse(char *data) { int handled; int len; + desc->stream = NULL; + while (data && *data) { handled=0; if (filter(data, "m=", &buf)) { + if ( ! desc->stream ) { + fprintf(stderr, "sdpplin.c: stream identifier found before stream count, skipping."); + continue; + } stream=sdpplin_parse_stream(&data); lprintf("got data for stream id %u\n", stream->stream_id); desc->stream[stream->stream_id]=stream; -- cgit v1.2.3 From 4d34c18da473ae72f03841808cc3b1554c77c0f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 25 Dec 2006 18:34:07 +0000 Subject: The dvd input plugin uses dlopen-related functions, link to the correct library. CVS patchset: 8447 CVS date: 2006/12/25 18:34:07 --- src/input/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/Makefile.am b/src/input/Makefile.am index c0924f829..d4a445743 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -77,7 +77,7 @@ xineplug_inp_file_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_file_la_LDFLAGS = -avoid-version -module xineplug_inp_dvd_la_SOURCES = input_dvd.c media_helper.c -xineplug_inp_dvd_la_LIBADD = $(XINE_LIB) $(link_dvdnav) $(THREAD_LIBS) +xineplug_inp_dvd_la_LIBADD = $(XINE_LIB) $(link_dvdnav) $(THREAD_LIBS) $(DYNAMIC_LD_LIBS) xineplug_inp_dvd_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_dvd_la_LDFLAGS = -avoid-version -module -- cgit v1.2.3 From 44a7ce25beefbbb99de7b94757625accdb885976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 28 Dec 2006 21:38:32 +0000 Subject: Link to pthreads for the pvr input plugin. CVS patchset: 8474 CVS date: 2006/12/28 21:38:32 --- src/input/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/Makefile.am b/src/input/Makefile.am index d4a445743..a867463ff 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -147,7 +147,7 @@ xineplug_inp_smb_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_smb_la_LDFLAGS = -avoid-version -module xineplug_inp_pvr_la_SOURCES = input_pvr.c -xineplug_inp_pvr_la_LIBADD = $(XINE_LIB) +xineplug_inp_pvr_la_LIBADD = $(XINE_LIB) $(THREADS_LIBS) xineplug_inp_pvr_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_pvr_la_LDFLAGS = -avoid-version -module -- cgit v1.2.3 From 7bcefb3382ff28894560e0caed8697e8aa8a3f5a Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 31 Dec 2006 12:17:00 +0000 Subject: Link against libm (missing symbols). CVS patchset: 8479 CVS date: 2006/12/31 12:17:00 --- src/input/vcd/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/vcd/Makefile.am b/src/input/vcd/Makefile.am index deb30e78f..98903aac8 100644 --- a/src/input/vcd/Makefile.am +++ b/src/input/vcd/Makefile.am @@ -18,7 +18,7 @@ xineplug_inp_vcd_la_LDFLAGS = -avoid-version -module if HAVE_VCDNAV xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCDINFO_LIBS) else -xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCD_LIBS) $(LIBVCDINFO_LIBS) +xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCD_LIBS) $(LIBVCDINFO_LIBS) -lm endif endif -- cgit v1.2.3 From 98377d46f237e11fbb0ec6466d392e8b4497ce7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 31 Dec 2006 12:34:21 +0000 Subject: Fix typo.. CVS patchset: 8480 CVS date: 2006/12/31 12:34:21 --- src/input/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/Makefile.am b/src/input/Makefile.am index a867463ff..a3635ccad 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -147,7 +147,7 @@ xineplug_inp_smb_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_smb_la_LDFLAGS = -avoid-version -module xineplug_inp_pvr_la_SOURCES = input_pvr.c -xineplug_inp_pvr_la_LIBADD = $(XINE_LIB) $(THREADS_LIBS) +xineplug_inp_pvr_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS) xineplug_inp_pvr_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_pvr_la_LDFLAGS = -avoid-version -module -- cgit v1.2.3 From 35374893f50c163e0cae77dc4801c0d1b7af4d08 Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Wed, 3 Jan 2007 15:09:42 +0000 Subject: Added support for setting the playback start time (same as the RTSP plugin). Actually this is only implemented for the MMST protocol. CVS patchset: 8484 CVS date: 2007/01/03 15:09:42 --- src/input/input_mms.c | 26 +++++++++++++++++++++- src/input/mms.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++-- src/input/mms.h | 4 +++- 3 files changed, 87 insertions(+), 4 deletions(-) (limited to 'src/input') diff --git a/src/input/input_mms.c b/src/input/input_mms.c index d4f6cb940..6ef256ea3 100644 --- a/src/input/input_mms.c +++ b/src/input/input_mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_mms.c,v 1.64 2006/10/23 21:18:18 hadess Exp $ + * $Id: input_mms.c,v 1.65 2007/01/03 15:09:42 klan Exp $ * * mms input plugin based on work from major mms */ @@ -201,6 +201,26 @@ static off_t mms_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin return curpos; } +static off_t mms_plugin_seek_time (input_plugin_t *this_gen, int time_offset, int origin) { + mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; + off_t curpos = 0; + + lprintf ("seek_time %d msec, origin %d\n", time_offset, origin); + + switch (this->protocol) { + case PROTOCOL_MMST: + if (origin == SEEK_SET) + mms_set_start_time (this->mms, time_offset); + curpos = mms_get_current_pos (this->mms); + break; + case PROTOCOL_MMSH: + curpos = mmsh_get_current_pos (this->mmsh); + break; + } + + return curpos; +} + static off_t mms_plugin_get_length (input_plugin_t *this_gen) { mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; off_t length = 0; @@ -356,6 +376,10 @@ static int mms_plugin_open (input_plugin_t *this_gen) { this->mms = mms; this->mmsh = mmsh; + if (this->protocol == PROTOCOL_MMST) { + this->input_plugin.seek_time = mms_plugin_seek_time; + } + return 1; } diff --git a/src/input/mms.c b/src/input/mms.c index 86317a1ee..370b20759 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mms.c,v 1.63 2006/09/16 08:13:51 tmattern Exp $ + * $Id: mms.c,v 1.64 2007/01/03 15:09:42 klan Exp $ * * MMS over TCP protocol * based on work from major mms @@ -144,9 +144,19 @@ struct mms_s { int eos; uint8_t live_flag; + + uint8_t playing; + double start_time; }; +#define D2Q(d) ({\ + union { double db; long long qw; } _tmp;\ + _tmp.db = d;\ + _tmp.qw;\ +})\ + + static void mms_buffer_init (mms_buffer_t *mms_buffer, char *buffer) { mms_buffer->buffer = (uint8_t*)buffer; mms_buffer->pos = 0; @@ -179,6 +189,20 @@ static void mms_buffer_put_32 (mms_buffer_t *mms_buffer, uint32_t value) { mms_buffer->pos += 4; } +static void mms_buffer_put_64 (mms_buffer_t *mms_buffer, uint64_t value) { + + mms_buffer->buffer[mms_buffer->pos] = value & 0xff; + mms_buffer->buffer[mms_buffer->pos + 1] = (value >> 8) & 0xff; + mms_buffer->buffer[mms_buffer->pos + 2] = (value >> 16) & 0xff; + mms_buffer->buffer[mms_buffer->pos + 3] = (value >> 24) & 0xff; + mms_buffer->buffer[mms_buffer->pos + 4] = (value >> 32) & 0xff; + mms_buffer->buffer[mms_buffer->pos + 5] = (value >> 40) & 0xff; + mms_buffer->buffer[mms_buffer->pos + 6] = (value >> 48) & 0xff; + mms_buffer->buffer[mms_buffer->pos + 7] = (value >> 56) & 0xff; + + mms_buffer->pos += 8; +} + static void print_command (char *data, int len) { @@ -839,11 +863,13 @@ mms_t *mms_connect (xine_stream_t *stream, const char *url, int bandwidth) { report_progress (stream, 80); /* command 0x07 */ + /* moved to mms_read() */ +#if 0 { mms_buffer_t command_buffer; mms_buffer_init(&command_buffer, this->scmd_body); mms_buffer_put_32 (&command_buffer, 0x00000000); /* 64 byte float timestamp */ - mms_buffer_put_32 (&command_buffer, 0x00000000); + mms_buffer_put_32 (&command_buffer, 0x00000000); mms_buffer_put_32 (&command_buffer, 0xFFFFFFFF); /* ?? */ mms_buffer_put_32 (&command_buffer, 0xFFFFFFFF); /* first packet sequence */ mms_buffer_put_8 (&command_buffer, 0xFF); /* max stream time limit (3 bytes) */ @@ -857,6 +883,7 @@ mms_t *mms_connect (xine_stream_t *stream, const char *url, int bandwidth) { goto fail; } } +#endif report_progress (stream, 100); @@ -1052,9 +1079,33 @@ int mms_read (mms_t *this, char *data, int len) { this->asf_header_read += n; total += n; this->current_pos += n; + + if (this->asf_header_read == this->asf_header_len) + break; } else { int n, bytes_left ; + + if (!this->playing) { + /* send command 0x07 with initial timestamp */ + mms_buffer_t command_buffer; + mms_buffer_init(&command_buffer, this->scmd_body); + mms_buffer_put_64 (&command_buffer, D2Q(this->start_time)); /* 64 byte float timestamp */ + mms_buffer_put_32 (&command_buffer, 0xFFFFFFFF); /* ?? */ + mms_buffer_put_32 (&command_buffer, 0xFFFFFFFF); /* first packet sequence */ + mms_buffer_put_8 (&command_buffer, 0xFF); /* max stream time limit (3 bytes) */ + mms_buffer_put_8 (&command_buffer, 0xFF); + mms_buffer_put_8 (&command_buffer, 0xFF); + mms_buffer_put_8 (&command_buffer, 0x00); /* stream time limit flag */ + mms_buffer_put_32 (&command_buffer, ASF_MEDIA_PACKET_ID_TYPE); /* asf media packet id type */ + if (!send_command (this, 0x07, 1, 0x0001FFFF, command_buffer.pos)) { + xprintf (this->stream->xine, XINE_VERBOSITY_LOG, + "libmms: failed to send command 0x07\n"); + this->eos = 1; + break; + } + this->playing = 1; + } bytes_left = this->buf_size - this->buf_read; if (bytes_left == 0) { @@ -1111,3 +1162,9 @@ uint32_t mms_get_length (mms_t *this) { off_t mms_get_current_pos (mms_t *this) { return this->current_pos; } + +void mms_set_start_time (mms_t *this, int time_offset) { + if (time_offset >= 0) + this->start_time = (double) time_offset / 1000.0; +} + diff --git a/src/input/mms.h b/src/input/mms.h index f4b2928cd..310a6d0cc 100644 --- a/src/input/mms.h +++ b/src/input/mms.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mms.h,v 1.12 2006/06/20 01:46:41 dgp85 Exp $ + * $Id: mms.h,v 1.13 2007/01/03 15:09:42 klan Exp $ * * libmms public header */ @@ -41,5 +41,7 @@ size_t mms_peek_header (mms_t *this, char *data, size_t maxsize); off_t mms_get_current_pos (mms_t *this); +void mms_set_start_time (mms_t *this, int time_offset); + #endif -- cgit v1.2.3 From fbabd49f7b8a90c111833fa2627473146d60de2e Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Tue, 9 Jan 2007 20:50:59 +0000 Subject: Support setting the start time over MMSH protocol. CVS patchset: 8494 CVS date: 2007/01/09 20:50:59 --- src/input/input_mms.c | 9 ++-- src/input/mmsh.c | 118 ++++++++++++++++++++++++++++++++------------------ src/input/mmsh.h | 6 ++- 3 files changed, 84 insertions(+), 49 deletions(-) (limited to 'src/input') diff --git a/src/input/input_mms.c b/src/input/input_mms.c index 6ef256ea3..5704e78b6 100644 --- a/src/input/input_mms.c +++ b/src/input/input_mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_mms.c,v 1.65 2007/01/03 15:09:42 klan Exp $ + * $Id: input_mms.c,v 1.66 2007/01/09 20:50:59 klan Exp $ * * mms input plugin based on work from major mms */ @@ -214,6 +214,8 @@ static off_t mms_plugin_seek_time (input_plugin_t *this_gen, int time_offset, in curpos = mms_get_current_pos (this->mms); break; case PROTOCOL_MMSH: + if (origin == SEEK_SET) + mmsh_set_start_time (this->mmsh, time_offset); curpos = mmsh_get_current_pos (this->mmsh); break; } @@ -376,10 +378,6 @@ static int mms_plugin_open (input_plugin_t *this_gen) { this->mms = mms; this->mmsh = mmsh; - if (this->protocol == PROTOCOL_MMST) { - this->input_plugin.seek_time = mms_plugin_seek_time; - } - return 1; } @@ -424,6 +422,7 @@ static input_plugin_t *mms_class_get_instance (input_class_t *cls_gen, xine_stre this->input_plugin.read = mms_plugin_read; this->input_plugin.read_block = mms_plugin_read_block; this->input_plugin.seek = mms_plugin_seek; + this->input_plugin.seek_time = mms_plugin_seek_time; this->input_plugin.get_current_pos = mms_plugin_get_current_pos; this->input_plugin.get_length = mms_plugin_get_length; this->input_plugin.get_blocksize = mms_plugin_get_blocksize; diff --git a/src/input/mmsh.c b/src/input/mmsh.c index 889596cf7..cf8ab8a6b 100644 --- a/src/input/mmsh.c +++ b/src/input/mmsh.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mmsh.c,v 1.40 2006/11/11 00:05:22 dgp85 Exp $ + * $Id: mmsh.c,v 1.41 2007/01/09 20:50:59 klan Exp $ * * MMS over HTTP protocol * written by Thibaut Mattern @@ -99,7 +99,7 @@ "Pragma: no-cache,rate=1.000000,stream-time=%u,stream-offset=%u:%u,request-context=%u,max-duration=%u\r\n" \ CLIENTGUID \ "Pragma: xPlayStrm=1\r\n" \ - "Pragma: stream-switch-coun t=%d\r\n" \ + "Pragma: stream-switch-count=%d\r\n" \ "Pragma: stream-switch-entry=%s\r\n" /* ffff:1:0 ffff:2:0 */ \ "Connection: Close\r\n\r\n" @@ -180,9 +180,15 @@ struct mmsh_s { uint32_t asf_header_len; uint32_t asf_header_read; int seq_num; + + int video_stream; + int audio_stream; off_t current_pos; - int user_bandwitdh; + int user_bandwidth; + + int playing; + unsigned int start_time; }; static int send_command (mmsh_t *this, char *cmd) { @@ -382,7 +388,6 @@ static int get_header (mmsh_t *this) { lprintf("get_header\n"); this->asf_header_len = 0; - this->asf_header_read = 0; /* read chunk */ while (1) { @@ -514,13 +519,10 @@ static int mmsh_tcp_connect(mmsh_t *this) { return 0; } - +/* + * firts http request + */ static int mmsh_connect_int(mmsh_t *this, int bandwidth) { - int i; - char stream_selection[10 * ASF_MAX_NUM_STREAMS]; /* 10 chars per stream */ - int offset; - int audio_stream, video_stream; - /* * let the negotiations begin... */ @@ -532,29 +534,44 @@ static int mmsh_connect_int(mmsh_t *this, int bandwidth) { this->host, this->port, 1); if (!send_command (this, this->str)) - goto fail; + return 0; if (!get_answer (this)) - goto fail; + return 0; - get_header(this); /* FIXME: it returns 0 */ + get_header (this); /* FIXME: it returns 0 */ - if (!interp_header(this)) - goto fail; + if (!interp_header (this)) + return 0; - close(this->s); + close (this->s); report_progress (this->stream, 20); - asf_header_choose_streams (this->asf_header, bandwidth, &video_stream, &audio_stream); + asf_header_choose_streams (this->asf_header, bandwidth, + &this->video_stream, &this->audio_stream); - lprintf("audio stream %d, video stream %d\n", audio_stream, video_stream); + lprintf("audio stream %d, video stream %d\n", + this->audio_stream, this->video_stream); + + asf_header_disable_streams (this->asf_header, + this->video_stream, this->audio_stream); + + return 1; +} + +/* + * second http request + */ +static int mmsh_connect_int2(mmsh_t *this, int bandwidth) { + int i; + char stream_selection[10 * ASF_MAX_NUM_STREAMS]; /* 10 chars per stream */ + int offset; /* second request */ lprintf("second http request\n"); - - if (mmsh_tcp_connect(this)) { - goto fail; - } + + if (mmsh_tcp_connect(this)) + return 0; /* stream selection string */ /* The same selection is done with mmst */ @@ -563,8 +580,8 @@ static int mmsh_connect_int(mmsh_t *this, int bandwidth) { offset = 0; for (i = 0; i < this->asf_header->stream_count; i++) { int size; - if ((i == audio_stream) || - (i == video_stream)) { + if ((i == this->audio_stream) || + (i == this->video_stream)) { size = snprintf(stream_selection + offset, sizeof(stream_selection) - offset, "ffff:%d:0 ", this->asf_header->streams[i]->stream_number); } else { @@ -573,14 +590,15 @@ static int mmsh_connect_int(mmsh_t *this, int bandwidth) { size = snprintf(stream_selection + offset, sizeof(stream_selection) - offset, "ffff:%d:2 ", this->asf_header->streams[i]->stream_number); } - if (size < 0) goto fail; + if (size < 0) + return 0; offset += size; } switch (this->stream_type) { case MMSH_SEEKABLE: snprintf (this->str, SCRATCH_SIZE, mmsh_SeekableRequest, this->uri, - this->host, this->port, 0, 0, 0, 2, 0, + this->host, this->port, this->start_time, 0, 0, 2, 0, this->asf_header->stream_count, stream_selection); break; case MMSH_LIVE: @@ -591,25 +609,25 @@ static int mmsh_connect_int(mmsh_t *this, int bandwidth) { } if (!send_command (this, this->str)) - goto fail; + return 0; lprintf("before read \n"); if (!get_answer (this)) - goto fail; - - if (!get_header(this)) - goto fail; - - if (!interp_header(this)) - goto fail; + return 0; - asf_header_disable_streams (this->asf_header, video_stream, audio_stream); + if (!get_header (this)) + return 0; + +#if 0 + if (!interp_header (this)) + return 0; + + asf_header_disable_streams (this->asf_header, + this->video_stream, this->audio_stream); +#endif return 1; - -fail: - return 0; } mmsh_t *mmsh_connect (xine_stream_t *stream, const char *url, int bandwidth) { @@ -630,7 +648,7 @@ mmsh_t *mmsh_connect (xine_stream_t *stream, const char *url, int bandwidth) { this->buf_size = 0; this->buf_read = 0; this->current_pos = 0; - this->user_bandwitdh = bandwidth; + this->user_bandwidth = bandwidth; report_progress (stream, 0); @@ -650,7 +668,7 @@ mmsh_t *mmsh_connect (xine_stream_t *stream, const char *url, int bandwidth) { report_progress (stream, 30); - if (!mmsh_connect_int(this, this->user_bandwitdh)) + if (!mmsh_connect_int(this, this->user_bandwidth)) goto fail; report_progress (stream, 100); @@ -709,8 +727,10 @@ static int get_media_packet (mmsh_t *this) { if (mmsh_tcp_connect(this)) return 0; - if (!mmsh_connect_int(this, this->user_bandwitdh)) + if (!mmsh_connect_int(this, this->user_bandwidth)) return 0; + + this->playing = 0; /* mmsh_connect_int reads the first data packet */ /* this->buf_size is set by mmsh_connect_int */ @@ -784,7 +804,7 @@ int mmsh_read (mmsh_t *this, char *data, int len) { if (this->asf_header_read < this->asf_header_len) { int n, bytes_left ; - bytes_left = this->asf_header_len - this->asf_header_read ; + bytes_left = this->asf_header_len - this->asf_header_read; if ((len-total) < bytes_left) n = len-total; @@ -796,9 +816,18 @@ int mmsh_read (mmsh_t *this, char *data, int len) { this->asf_header_read += n; total += n; this->current_pos += n; + + if (this->asf_header_read == this->asf_header_len) + break; } else { int n, bytes_left ; + + if (!this->playing) { + if (!mmsh_connect_int2 (this, this->user_bandwidth)) + break; + this->playing = 1; + } bytes_left = this->buf_size - this->buf_read; @@ -867,3 +896,8 @@ uint32_t mmsh_get_length (mmsh_t *this) { off_t mmsh_get_current_pos (mmsh_t *this) { return this->current_pos; } + +void mmsh_set_start_time (mmsh_t *this, int time_offset) { + if (time_offset >= 0) + this->start_time = time_offset; +} diff --git a/src/input/mmsh.h b/src/input/mmsh.h index 8aee808f0..1ded6295a 100644 --- a/src/input/mmsh.h +++ b/src/input/mmsh.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mmsh.h,v 1.5 2006/06/20 01:46:41 dgp85 Exp $ + * $Id: mmsh.h,v 1.6 2007/01/09 20:51:00 klan Exp $ * * libmmsh public header */ @@ -31,7 +31,7 @@ typedef struct mmsh_s mmsh_t; char* mmsh_connect_common(int *s ,int *port, char *url, char **host, char **path, char **file); -mmsh_t* mmsh_connect (xine_stream_t *stream, const char *url_, int bandwidth); +mmsh_t* mmsh_connect (xine_stream_t *stream, const char *url_, int bandwidth); int mmsh_read (mmsh_t *this, char *data, int len); uint32_t mmsh_get_length (mmsh_t *this); @@ -41,4 +41,6 @@ size_t mmsh_peek_header (mmsh_t *this, char *data, size_t maxsize); off_t mmsh_get_current_pos (mmsh_t *this); +void mmsh_set_start_time (mmsh_t *this, int time_offset); + #endif -- cgit v1.2.3 From ad5f987c2e5b2be240b114461a47fe52c479ab9f Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Thu, 11 Jan 2007 16:20:55 +0000 Subject: Reconnect to the server just after the first request. CVS patchset: 8497 CVS date: 2007/01/11 16:20:55 --- src/input/mmsh.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/input') diff --git a/src/input/mmsh.c b/src/input/mmsh.c index cf8ab8a6b..30c16001d 100644 --- a/src/input/mmsh.c +++ b/src/input/mmsh.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mmsh.c,v 1.41 2007/01/09 20:50:59 klan Exp $ + * $Id: mmsh.c,v 1.42 2007/01/11 16:20:55 klan Exp $ * * MMS over HTTP protocol * written by Thibaut Mattern @@ -555,6 +555,9 @@ static int mmsh_connect_int(mmsh_t *this, int bandwidth) { asf_header_disable_streams (this->asf_header, this->video_stream, this->audio_stream); + + if (mmsh_tcp_connect(this)) + return 0; return 1; } @@ -569,9 +572,6 @@ static int mmsh_connect_int2(mmsh_t *this, int bandwidth) { /* second request */ lprintf("second http request\n"); - - if (mmsh_tcp_connect(this)) - return 0; /* stream selection string */ /* The same selection is done with mmst */ -- cgit v1.2.3 From 45c71725f5672cd446652f93184a8a6c48c8b0e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 18 Jan 2007 23:02:18 +0000 Subject: Make get_description function return a const char * rather than just a char *, so that 'return "something"' is valid. Note that _()/gettext() returns a char * but statically allocated, that the documentation considers constant. CVS patchset: 8519 CVS date: 2007/01/18 23:02:18 --- src/input/input_cdda.c | 4 ++-- src/input/input_dvb.c | 2 +- src/input/input_dvd.c | 4 ++-- src/input/input_file.c | 4 ++-- src/input/input_gnome_vfs.c | 4 ++-- src/input/input_http.c | 4 ++-- src/input/input_mms.c | 4 ++-- src/input/input_net.c | 4 ++-- src/input/input_plugin.h | 4 ++-- src/input/input_pnm.c | 2 +- src/input/input_pvr.c | 4 ++-- src/input/input_rtp.c | 2 +- src/input/input_rtsp.c | 2 +- src/input/input_stdin_fifo.c | 4 ++-- src/input/input_vcd.c | 4 ++-- 15 files changed, 26 insertions(+), 26 deletions(-) (limited to 'src/input') diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 7ee2e7899..3733172e5 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -20,7 +20,7 @@ * Compact Disc Digital Audio (CDDA) Input Plugin * by Mike Melanson (melanson@pcisys.net) * - * $Id: input_cdda.c,v 1.91 2006/12/19 19:10:51 dsalt Exp $ + * $Id: input_cdda.c,v 1.92 2007/01/18 23:02:18 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -2623,7 +2623,7 @@ static const char *cdda_class_get_identifier (input_class_t *this_gen) { return "cdda"; } -static char *cdda_class_get_description (input_class_t *this_gen) { +static const char *cdda_class_get_description (input_class_t *this_gen) { return _("CD Digital Audio (aka. CDDA)"); } diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index dbec9ff17..3bc9008a7 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -3085,7 +3085,7 @@ static input_plugin_t *dvb_class_get_instance (input_class_t *class_gen, * dvb input plugin class stuff */ -static char *dvb_class_get_description (input_class_t *this_gen) { +static const char *dvb_class_get_description (input_class_t *this_gen) { return _("DVB (Digital TV) input plugin"); } diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index ddc3fe964..6a8315ce1 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.212 2006/12/19 19:10:51 dsalt Exp $ + * $Id: input_dvd.c,v 1.213 2007/01/18 23:02:18 dgp85 Exp $ * */ @@ -1680,7 +1680,7 @@ static input_plugin_t *dvd_class_get_instance (input_class_t *class_gen, xine_st return &this->input_plugin; } -static char *dvd_class_get_description (input_class_t *this_gen) { +static const char *dvd_class_get_description (input_class_t *this_gen) { trace_print("Called\n"); return "DVD Navigator"; diff --git a/src/input/input_file.c b/src/input/input_file.c index db7937956..dd2f078f9 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_file.c,v 1.118 2006/12/19 19:10:51 dsalt Exp $ + * $Id: input_file.c,v 1.119 2007/01/18 23:02:18 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -659,7 +659,7 @@ static off_t get_file_size(char *filepathname, char *origin) { return pstat.st_size; } -static char *file_class_get_description (input_class_t *this_gen) { +static const char *file_class_get_description (input_class_t *this_gen) { return _("file input plugin"); } diff --git a/src/input/input_gnome_vfs.c b/src/input/input_gnome_vfs.c index 3ada09d19..8948abe54 100644 --- a/src/input/input_gnome_vfs.c +++ b/src/input/input_gnome_vfs.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_gnome_vfs.c,v 1.32 2006/09/08 06:20:37 tmattern Exp $ + * $Id: input_gnome_vfs.c,v 1.33 2007/01/18 23:02:18 dgp85 Exp $ */ @@ -212,7 +212,7 @@ gnomevfs_plugin_get_mrl (input_plugin_t *this_gen) return this->mrl; } -static char +static const char *gnomevfs_klass_get_description (input_class_t *this_gen) { return _("gnome-vfs input plugin as shipped with xine"); diff --git a/src/input/input_http.c b/src/input/input_http.c index 9011fba7f..18990e2bf 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -19,7 +19,7 @@ * * input plugin for http network streams * - * $Id: input_http.c,v 1.125 2006/12/08 16:26:10 mshopf Exp $ + * $Id: input_http.c,v 1.126 2007/01/18 23:02:18 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -990,7 +990,7 @@ static input_plugin_t *http_class_get_instance (input_class_t *cls_gen, xine_str return &this->input_plugin; } -static char *http_class_get_description (input_class_t *this_gen) { +static const char *http_class_get_description (input_class_t *this_gen) { return _("http input plugin"); } diff --git a/src/input/input_mms.c b/src/input/input_mms.c index 5704e78b6..350958d89 100644 --- a/src/input/input_mms.c +++ b/src/input/input_mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_mms.c,v 1.66 2007/01/09 20:50:59 klan Exp $ + * $Id: input_mms.c,v 1.67 2007/01/18 23:02:18 dgp85 Exp $ * * mms input plugin based on work from major mms */ @@ -439,7 +439,7 @@ static input_plugin_t *mms_class_get_instance (input_class_t *cls_gen, xine_stre * mms input plugin class stuff */ -static char *mms_class_get_description (input_class_t *this_gen) { +static const char *mms_class_get_description (input_class_t *this_gen) { return _("mms streaming input plugin"); } diff --git a/src/input/input_net.c b/src/input/input_net.c index 19326c301..1baa8c3c6 100644 --- a/src/input/input_net.c +++ b/src/input/input_net.c @@ -20,7 +20,7 @@ * Read from a tcp network stream over a lan (put a tweaked mp1e encoder the * other end and you can watch tv anywhere in the house ..) * - * $Id: input_net.c,v 1.68 2006/07/10 22:08:15 dgp85 Exp $ + * $Id: input_net.c,v 1.69 2007/01/18 23:02:18 dgp85 Exp $ * * how to set up mp1e for use with this plugin: * @@ -506,7 +506,7 @@ static input_plugin_t *net_class_get_instance (input_class_t *cls_gen, xine_stre * net plugin class */ -static char *net_class_get_description (input_class_t *this_gen) { +static const char *net_class_get_description (input_class_t *this_gen) { return _("net input plugin as shipped with xine"); } diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h index f686f2227..aebbd08e7 100644 --- a/src/input/input_plugin.h +++ b/src/input/input_plugin.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_plugin.h,v 1.62 2006/12/22 16:38:15 klan Exp $ + * $Id: input_plugin.h,v 1.63 2007/01/18 23:02:18 dgp85 Exp $ */ #ifndef HAVE_INPUT_PLUGIN_H @@ -60,7 +60,7 @@ struct input_class_s { * return human readable (verbose = 1 line) description for * this plugin class */ - char* (*get_description) (input_class_t *this); + const char* (*get_description) (input_class_t *this); /* * ls function, optional: may be NULL diff --git a/src/input/input_pnm.c b/src/input/input_pnm.c index 26fdd350e..c847ca767 100644 --- a/src/input/input_pnm.c +++ b/src/input/input_pnm.c @@ -258,7 +258,7 @@ static input_plugin_t *pnm_class_get_instance (input_class_t *cls_gen, xine_stre * pnm input plugin class stuff */ -static char *pnm_class_get_description (input_class_t *this_gen) { +static const char *pnm_class_get_description (input_class_t *this_gen) { return _("pnm streaming input plugin"); } diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c index f47bfe890..93af332f4 100644 --- a/src/input/input_pvr.c +++ b/src/input/input_pvr.c @@ -38,7 +38,7 @@ * usage: * xine pvr:/\!\! * - * $Id: input_pvr.c,v 1.63 2006/12/19 19:10:51 dsalt Exp $ + * $Id: input_pvr.c,v 1.64 2007/01/18 23:02:18 dgp85 Exp $ */ /************************************************************************** @@ -1524,7 +1524,7 @@ static input_plugin_t *pvr_class_get_instance (input_class_t *cls_gen, xine_stre * plugin class functions */ -static char *pvr_class_get_description (input_class_t *this_gen) { +static const char *pvr_class_get_description (input_class_t *this_gen) { return _("WinTV-PVR 250/350 input plugin"); } diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c index b23ecb895..da6bad281 100644 --- a/src/input/input_rtp.c +++ b/src/input/input_rtp.c @@ -739,7 +739,7 @@ static input_plugin_t *rtp_class_get_instance (input_class_t *cls_gen, * net plugin class */ -static char *rtp_class_get_description (input_class_t *this_gen) { +static const char *rtp_class_get_description (input_class_t *this_gen) { return _("RTP and UDP input plugin as shipped with xine"); } diff --git a/src/input/input_rtsp.c b/src/input/input_rtsp.c index fec7b9713..5a7cc6c7f 100644 --- a/src/input/input_rtsp.c +++ b/src/input/input_rtsp.c @@ -280,7 +280,7 @@ static input_plugin_t *rtsp_class_get_instance (input_class_t *cls_gen, xine_str * rtsp input plugin class stuff */ -static char *rtsp_class_get_description (input_class_t *this_gen) { +static const char *rtsp_class_get_description (input_class_t *this_gen) { return _("rtsp streaming input plugin"); } diff --git a/src/input/input_stdin_fifo.c b/src/input/input_stdin_fifo.c index 3780a1cef..435bf795b 100644 --- a/src/input/input_stdin_fifo.c +++ b/src/input/input_stdin_fifo.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_stdin_fifo.c,v 1.67 2006/07/10 22:08:16 dgp85 Exp $ + * $Id: input_stdin_fifo.c,v 1.68 2007/01/18 23:02:18 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -346,7 +346,7 @@ static input_plugin_t *stdin_class_get_instance (input_class_t *class_gen, * stdin input plugin class stuff */ -static char *stdin_class_get_description (input_class_t *this_gen) { +static const char *stdin_class_get_description (input_class_t *this_gen) { return _("stdin streaming input plugin"); } diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index ab0715e96..06b6707f9 100644 --- a/src/input/input_vcd.c +++ b/src/input/input_vcd.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_vcd.c,v 1.86 2006/12/19 19:10:51 dsalt Exp $ + * $Id: input_vcd.c,v 1.87 2007/01/18 23:02:18 dgp85 Exp $ * */ @@ -919,7 +919,7 @@ static input_plugin_t *vcd_class_get_instance (input_class_t *cls_gen, xine_stre * vcd input plugin class stuff */ -static char *vcd_class_get_description (input_class_t *this_gen) { +static const char *vcd_class_get_description (input_class_t *this_gen) { return _("Video CD input plugin"); } -- cgit v1.2.3 From 17d470f75b57265107c7f164334dbc53489124cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 19 Jan 2007 01:05:24 +0000 Subject: Make get_mrl return a const char * too. CVS patchset: 8524 CVS date: 2007/01/19 01:05:24 --- src/input/input_cdda.c | 4 ++-- src/input/input_dvb.c | 2 +- src/input/input_dvd.c | 4 ++-- src/input/input_file.c | 4 ++-- src/input/input_gnome_vfs.c | 4 ++-- src/input/input_http.c | 4 ++-- src/input/input_mms.c | 4 ++-- src/input/input_net.c | 4 ++-- src/input/input_plugin.h | 4 ++-- src/input/input_pnm.c | 2 +- src/input/input_pvr.c | 4 ++-- src/input/input_rtp.c | 2 +- src/input/input_rtsp.c | 2 +- src/input/input_stdin_fifo.c | 4 ++-- src/input/input_v4l.c | 2 +- src/input/input_vcd.c | 4 ++-- 16 files changed, 27 insertions(+), 27 deletions(-) (limited to 'src/input') diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 3733172e5..632ca3252 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -20,7 +20,7 @@ * Compact Disc Digital Audio (CDDA) Input Plugin * by Mike Melanson (melanson@pcisys.net) * - * $Id: input_cdda.c,v 1.92 2007/01/18 23:02:18 dgp85 Exp $ + * $Id: input_cdda.c,v 1.93 2007/01/19 01:05:24 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -2270,7 +2270,7 @@ static uint32_t cdda_plugin_get_blocksize (input_plugin_t *this_gen) { return CD_RAW_FRAME_SIZE; } -static char* cdda_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* cdda_plugin_get_mrl (input_plugin_t *this_gen) { cdda_input_plugin_t *this = (cdda_input_plugin_t *) this_gen; return this->mrl; diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 3bc9008a7..39507ac15 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -2651,7 +2651,7 @@ static void dvb_plugin_dispose (input_plugin_t *this_gen) { free (this); } -static char* dvb_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* dvb_plugin_get_mrl (input_plugin_t *this_gen) { dvb_input_plugin_t *this = (dvb_input_plugin_t *) this_gen; return this->mrl; diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 6a8315ce1..c132bdb04 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.213 2007/01/18 23:02:18 dgp85 Exp $ + * $Id: input_dvd.c,v 1.214 2007/01/19 01:05:25 dgp85 Exp $ * */ @@ -930,7 +930,7 @@ static uint32_t dvd_plugin_get_blocksize (input_plugin_t *this_gen) { return DVD_BLOCK_SIZE; } -static char* dvd_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* dvd_plugin_get_mrl (input_plugin_t *this_gen) { dvd_input_plugin_t *this = (dvd_input_plugin_t*)this_gen; trace_print("Called\n"); diff --git a/src/input/input_file.c b/src/input/input_file.c index dd2f078f9..82e317492 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_file.c,v 1.119 2007/01/18 23:02:18 dgp85 Exp $ + * $Id: input_file.c,v 1.120 2007/01/19 01:05:25 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -299,7 +299,7 @@ static int is_a_dir(char *filepathname) { return (S_ISDIR(pstat.st_mode)); } -static char* file_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* file_plugin_get_mrl (input_plugin_t *this_gen) { file_input_plugin_t *this = (file_input_plugin_t *) this_gen; return this->mrl; diff --git a/src/input/input_gnome_vfs.c b/src/input/input_gnome_vfs.c index 8948abe54..b9f516931 100644 --- a/src/input/input_gnome_vfs.c +++ b/src/input/input_gnome_vfs.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_gnome_vfs.c,v 1.33 2007/01/18 23:02:18 dgp85 Exp $ + * $Id: input_gnome_vfs.c,v 1.34 2007/01/19 01:05:25 dgp85 Exp $ */ @@ -204,7 +204,7 @@ gnomevfs_plugin_get_blocksize (input_plugin_t *this_gen) return 32 * 1024; } -static char* +static const char* gnomevfs_plugin_get_mrl (input_plugin_t *this_gen) { gnomevfs_input_t *this = (gnomevfs_input_t *) this_gen; diff --git a/src/input/input_http.c b/src/input/input_http.c index 18990e2bf..8555e3bc8 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -19,7 +19,7 @@ * * input plugin for http network streams * - * $Id: input_http.c,v 1.126 2007/01/18 23:02:18 dgp85 Exp $ + * $Id: input_http.c,v 1.127 2007/01/19 01:05:25 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -574,7 +574,7 @@ static off_t http_plugin_seek(input_plugin_t *this_gen, off_t offset, int origin return this->curpos; } -static char* http_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* http_plugin_get_mrl (input_plugin_t *this_gen) { http_input_plugin_t *this = (http_input_plugin_t *) this_gen; return this->mrl; diff --git a/src/input/input_mms.c b/src/input/input_mms.c index 350958d89..52a0d4bab 100644 --- a/src/input/input_mms.c +++ b/src/input/input_mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_mms.c,v 1.67 2007/01/18 23:02:18 dgp85 Exp $ + * $Id: input_mms.c,v 1.68 2007/01/19 01:05:25 dgp85 Exp $ * * mms input plugin based on work from major mms */ @@ -292,7 +292,7 @@ static void mms_plugin_dispose (input_plugin_t *this_gen) { free (this); } -static char* mms_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* mms_plugin_get_mrl (input_plugin_t *this_gen) { mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; return this->mrl; diff --git a/src/input/input_net.c b/src/input/input_net.c index 1baa8c3c6..0ce2e1340 100644 --- a/src/input/input_net.c +++ b/src/input/input_net.c @@ -20,7 +20,7 @@ * Read from a tcp network stream over a lan (put a tweaked mp1e encoder the * other end and you can watch tv anywhere in the house ..) * - * $Id: input_net.c,v 1.69 2007/01/18 23:02:18 dgp85 Exp $ + * $Id: input_net.c,v 1.70 2007/01/19 01:05:25 dgp85 Exp $ * * how to set up mp1e for use with this plugin: * @@ -367,7 +367,7 @@ static off_t net_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin } -static char* net_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* net_plugin_get_mrl (input_plugin_t *this_gen) { net_input_plugin_t *this = (net_input_plugin_t *) this_gen; return this->mrl; diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h index aebbd08e7..370dc6a71 100644 --- a/src/input/input_plugin.h +++ b/src/input/input_plugin.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_plugin.h,v 1.63 2007/01/18 23:02:18 dgp85 Exp $ + * $Id: input_plugin.h,v 1.64 2007/01/19 01:05:25 dgp85 Exp $ */ #ifndef HAVE_INPUT_PLUGIN_H @@ -201,7 +201,7 @@ struct input_plugin_s { /* * return current MRL */ - char * (*get_mrl) (input_plugin_t *this); + const char * (*get_mrl) (input_plugin_t *this); /* diff --git a/src/input/input_pnm.c b/src/input/input_pnm.c index c847ca767..af860ac1e 100644 --- a/src/input/input_pnm.c +++ b/src/input/input_pnm.c @@ -181,7 +181,7 @@ static void pnm_plugin_dispose (input_plugin_t *this_gen) { free (this); } -static char* pnm_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* pnm_plugin_get_mrl (input_plugin_t *this_gen) { pnm_input_plugin_t *this = (pnm_input_plugin_t *) this_gen; return this->mrl; diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c index 93af332f4..bcf93af2b 100644 --- a/src/input/input_pvr.c +++ b/src/input/input_pvr.c @@ -38,7 +38,7 @@ * usage: * xine pvr:/\!\! * - * $Id: input_pvr.c,v 1.64 2007/01/18 23:02:18 dgp85 Exp $ + * $Id: input_pvr.c,v 1.65 2007/01/19 01:05:25 dgp85 Exp $ */ /************************************************************************** @@ -1317,7 +1317,7 @@ static uint32_t pvr_plugin_get_blocksize (input_plugin_t *this_gen) { return PVR_BLOCK_SIZE; } -static char* pvr_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* pvr_plugin_get_mrl (input_plugin_t *this_gen) { pvr_input_plugin_t *this = (pvr_input_plugin_t *) this_gen; return this->mrl; diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c index da6bad281..cd5d89686 100644 --- a/src/input/input_rtp.c +++ b/src/input/input_rtp.c @@ -559,7 +559,7 @@ static uint32_t rtp_plugin_get_blocksize (input_plugin_t *this_gen) { /* * */ -static char* rtp_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* rtp_plugin_get_mrl (input_plugin_t *this_gen) { rtp_input_plugin_t *this = (rtp_input_plugin_t *) this_gen; return this->mrl; diff --git a/src/input/input_rtsp.c b/src/input/input_rtsp.c index 5a7cc6c7f..c23c761cc 100644 --- a/src/input/input_rtsp.c +++ b/src/input/input_rtsp.c @@ -196,7 +196,7 @@ static void rtsp_plugin_dispose (input_plugin_t *this_gen) { free (this); } -static char* rtsp_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* rtsp_plugin_get_mrl (input_plugin_t *this_gen) { rtsp_input_plugin_t *this = (rtsp_input_plugin_t *) this_gen; return this->public_mrl; diff --git a/src/input/input_stdin_fifo.c b/src/input/input_stdin_fifo.c index 435bf795b..654e5d1a2 100644 --- a/src/input/input_stdin_fifo.c +++ b/src/input/input_stdin_fifo.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_stdin_fifo.c,v 1.68 2007/01/18 23:02:18 dgp85 Exp $ + * $Id: input_stdin_fifo.c,v 1.69 2007/01/19 01:05:25 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -202,7 +202,7 @@ static off_t stdin_plugin_get_current_pos (input_plugin_t *this_gen){ return this->curpos; } -static char* stdin_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* stdin_plugin_get_mrl (input_plugin_t *this_gen) { stdin_input_plugin_t *this = (stdin_input_plugin_t *) this_gen; return this->mrl; diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c index 8143c6b13..17c4223a2 100644 --- a/src/input/input_v4l.c +++ b/src/input/input_v4l.c @@ -1628,7 +1628,7 @@ static void v4l_plugin_dispose (input_plugin_t *this_gen) { * * Get the current MRL used by the plugin. */ -static char* v4l_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* v4l_plugin_get_mrl (input_plugin_t *this_gen) { v4l_input_plugin_t *this = (v4l_input_plugin_t *) this_gen; return this->mrl; diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index 06b6707f9..82c1b53d9 100644 --- a/src/input/input_vcd.c +++ b/src/input/input_vcd.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_vcd.c,v 1.87 2007/01/18 23:02:18 dgp85 Exp $ + * $Id: input_vcd.c,v 1.88 2007/01/19 01:05:25 dgp85 Exp $ * */ @@ -813,7 +813,7 @@ static void vcd_plugin_dispose (input_plugin_t *this_gen ) { free (this); } -static char* vcd_plugin_get_mrl (input_plugin_t *this_gen) { +static const char* vcd_plugin_get_mrl (input_plugin_t *this_gen) { vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen; return this->mrl; -- cgit v1.2.3 From 1fd15c0a4b22302656d29123c07ba23d811235f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 19 Jan 2007 01:16:46 +0000 Subject: Fix possible strict aliasing breakage. CVS patchset: 8526 CVS date: 2007/01/19 01:16:46 --- src/input/libreal/real.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src/input') diff --git a/src/input/libreal/real.c b/src/input/libreal/real.c index c3d39fab3..dc0c001bd 100644 --- a/src/input/libreal/real.c +++ b/src/input/libreal/real.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: real.c,v 1.25 2006/12/18 21:31:47 klan Exp $ + * $Id: real.c,v 1.26 2007/01/19 01:19:06 dgp85 Exp $ * * special functions for real streams. * adopted from joschkas real tools. @@ -289,18 +289,15 @@ static void calc_response (char *result, char *field) { static void calc_response_string (char *result, char *challenge) { - char field[128]; + char field[128] = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, + 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; char zres[20]; int i; - /* initialize our field */ - BE_32C (field, 0x01234567); - BE_32C ((field+4), 0x89ABCDEF); - BE_32C ((field+8), 0xFEDCBA98); - BE_32C ((field+12), 0x76543210); - BE_32C ((field+16), 0x00000000); - BE_32C ((field+20), 0x00000000); - /* calculate response */ call_hash(field, challenge, 64); calc_response(zres,field); -- cgit v1.2.3 From f5b453ed52b4648189d0618d8d023a579330cd66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 19 Jan 2007 01:25:24 +0000 Subject: Fix possible strict aliasing breakage. CVS patchset: 8529 CVS date: 2007/01/19 01:25:24 --- src/input/input_rtp.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/input') diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c index cd5d89686..d4ba804c6 100644 --- a/src/input/input_rtp.c +++ b/src/input/input_rtp.c @@ -174,7 +174,10 @@ static int host_connect_attempt(struct in_addr ia, int port, const char *interface, xine_t *xine) { int s=socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); - struct sockaddr_in sin; + union { + struct sockaddr_in in; + struct sockaddr sa; + } saddr; int optval; int multicast = 0; /* boolean, assume unicast */ @@ -183,12 +186,12 @@ static int host_connect_attempt(struct in_addr ia, int port, return -1; } - sin.sin_family = AF_INET; - sin.sin_addr = ia; - sin.sin_port = htons(port); + saddr.in.sin_family = AF_INET; + saddr.in.sin_addr = ia; + saddr.in.sin_port = htons(port); /* Is it a multicast address? */ - if ((ntohl(sin.sin_addr.s_addr) >> 28) == 0xe) { + if ((ntohl(saddr.in.sin_addr.s_addr) >> 28) == 0xe) { LOG_MSG(xine, _("IP address specified is multicast\n")); multicast = 1; /* boolean true */ } @@ -205,14 +208,14 @@ static int host_connect_attempt(struct in_addr ia, int port, /* If multicast we allow multiple readers to open the same address */ if (multicast) { if ((setsockopt(s, SOL_SOCKET, SO_REUSEADDR, - &sin, sizeof(sin))) < 0) { + &saddr.in, sizeof(saddr.in))) < 0) { LOG_MSG(xine, _("setsockopt(SO_REUSEADDR): %s.\n"), strerror(errno)); return -1; } } /* datagram socket */ - if (bind(s, (struct sockaddr *)&sin, sizeof(sin))) { + if (bind(s, &saddr.sa, sizeof(saddr.in))) { LOG_MSG(xine, _("bind(): %s.\n"), strerror(errno)); return -1; } @@ -240,7 +243,7 @@ static int host_connect_attempt(struct in_addr ia, int port, } /* struct ip_mreq mreq; */ - mreq.imr_multiaddr.s_addr = sin.sin_addr.s_addr; + mreq.imr_multiaddr.s_addr = saddr.in.sin_addr.s_addr; if (interface == NULL) { mreq.imr_interface.s_addr = htonl(INADDR_ANY); } -- cgit v1.2.3 From fc26ad8e82ad04611909cdf08a390bc91582dc9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 26 Jan 2007 17:06:05 +0000 Subject: Don't set get_blocksize to NULL, or the Samba access plugin will _never_ work. Thanks Timothy Redaelli for helping me diagnose it. CVS patchset: 8564 CVS date: 2007/01/26 17:06:05 --- src/input/input_smb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/input_smb.c b/src/input/input_smb.c index 21b45fa73..1b1f15565 100644 --- a/src/input/input_smb.c +++ b/src/input/input_smb.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_smb.c,v 1.15 2006/07/10 22:08:16 dgp85 Exp $ + * $Id: input_smb.c,v 1.16 2007/01/26 17:06:05 dgp85 Exp $ */ @@ -148,6 +148,10 @@ smb_plugin_get_mrl (input_plugin_t *this_gen) return this->mrl; } +static uint32_t smb_plugin_get_blocksize (input_plugin_t *this_gen) { + return 0; +} + static char *smb_class_get_description (input_class_t *this_gen) { @@ -485,7 +489,7 @@ smb_class_get_instance (input_class_t *class_gen, xine_stream_t *stream, this->input_plugin.seek = smb_plugin_seek; this->input_plugin.get_current_pos = smb_plugin_get_current_pos; this->input_plugin.get_length = smb_plugin_get_length; - this->input_plugin.get_blocksize = NULL; + this->input_plugin.get_blocksize = smb_plugin_get_blocksize; this->input_plugin.get_mrl = smb_plugin_get_mrl; this->input_plugin.get_optional_data = smb_plugin_get_optional_data; -- cgit v1.2.3 From e418c1e04f612664164841c297ddb97a0f3135bf Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 8 Feb 2007 02:40:22 +0000 Subject: Remove any possibility of strcpy/sprintf overflows wrt front ends requesting language & subtitle strings (given a buffer of >= XINE_LANG_MAX bytes). Also fixes an off-by-one buffer termination in the TS code. (Note: compile-tested only.) CVS patchset: 8592 CVS date: 2007/02/08 02:40:22 --- src/input/input_dvd.c | 8 ++++---- src/input/vcd/xineplug_inp_vcd.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/input') diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index c132bdb04..a8100a063 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.214 2007/01/19 01:05:25 dgp85 Exp $ + * $Id: input_dvd.c,v 1.215 2007/02/08 02:40:23 dsalt Exp $ * */ @@ -1278,7 +1278,7 @@ static int dvd_plugin_get_optional_data (input_plugin_t *this_gen, if(this && this->stream && this->dvdnav) { if(!(dvdnav_is_domain_vts(this->dvdnav))) { - sprintf(data, "%s", "menu"); + strcpy(data, "menu"); if (channel <= 0) return INPUT_OPTIONAL_SUCCESS; else @@ -1297,11 +1297,11 @@ static int dvd_plugin_get_optional_data (input_plugin_t *this_gen, sprintf(data, " %c%c", lang >> 8, lang & 0xff); /* TODO: provide long version in XINE_META_INFO_FULL_LANG */ else - sprintf(data, " %c%c", '?', '?'); + strcpy(data, " ??"); return INPUT_OPTIONAL_SUCCESS; } else { if (channel == -1) { - sprintf(data, "%s", "none"); + strcpy(data, "none"); return INPUT_OPTIONAL_SUCCESS; } } diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c index 87b442acd..920b5c1d8 100644 --- a/src/input/vcd/xineplug_inp_vcd.c +++ b/src/input/vcd/xineplug_inp_vcd.c @@ -1,5 +1,5 @@ /* - $Id: xineplug_inp_vcd.c,v 1.52 2006/12/19 19:10:51 dsalt Exp $ + $Id: xineplug_inp_vcd.c,v 1.53 2007/02/08 02:40:23 dsalt Exp $ Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein @@ -1295,7 +1295,7 @@ vcd_get_optional_data (input_plugin_t *this_gen, dbg_print(INPUT_DBG_EXT, "AUDIO CHANNEL = %d\n", channel); if (channel == (uint8_t)-1) { - sprintf(data, " %s", "auto"); + strcpy(data, "auto"); } else { const vcdinfo_obj_t *p_vcdinfo= my_vcd.player.vcd; unsigned int audio_type; @@ -1320,9 +1320,9 @@ vcd_get_optional_data (input_plugin_t *this_gen, channel = (int8_t) _x_get_spu_channel(my_vcd.stream); dbg_print(INPUT_DBG_EXT, "SPU CHANNEL = %d\n", channel); if (-1 == channel) { - sprintf(data, " %s", "auto"); + strcpy(data, "auto"); } else { - sprintf(data, " %1d", channel); + sprintf(data, "%1d", channel); } } -- cgit v1.2.3 From 780908b7567d712ebd866081760b91abcb03017c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 20 Feb 2007 00:34:55 +0000 Subject: Fix a lot of format warnings in lprintf calls (mostly %ldd -> %"PRId64"). CVS patchset: 8608 CVS date: 2007/02/20 00:34:55 --- src/input/input_http.c | 8 ++++---- src/input/input_mms.c | 10 +++++----- src/input/input_pnm.c | 6 +++--- src/input/input_rtsp.c | 8 ++++---- src/input/input_stdin_fifo.c | 10 +++++----- src/input/mms.c | 4 ++-- 6 files changed, 23 insertions(+), 23 deletions(-) (limited to 'src/input') diff --git a/src/input/input_http.c b/src/input/input_http.c index 8555e3bc8..a9bcee0d5 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -19,7 +19,7 @@ * * input plugin for http network streams * - * $Id: input_http.c,v 1.127 2007/01/19 01:05:25 dgp85 Exp $ + * $Id: input_http.c,v 1.128 2007/02/20 00:34:56 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -363,7 +363,7 @@ static off_t http_plugin_read_int (http_input_plugin_t *this, int read_bytes = 0; int nlen; - lprintf("total=%lld\n", total); + lprintf("total=%"PRId64"\n", total); while (total) { nlen = total; if (this->shoutcast_mode && @@ -415,7 +415,7 @@ static off_t http_plugin_read (input_plugin_t *this_gen, else n = nlen; - lprintf ("%lld bytes from preview (which has %lld bytes)\n", n, this->preview_size); + lprintf ("%"PRId64" bytes from preview (which has %"PRId64" bytes)\n", n, this->preview_size); memcpy (buf, &this->preview[this->curpos], n); num_bytes += n; @@ -942,7 +942,7 @@ static int http_plugin_open (input_plugin_t *this_gen ) { return -12; } - lprintf("preview_size=%lld\n", this->preview_size); + lprintf("preview_size=%"PRId64"\n", this->preview_size); this->curpos = 0; return 1; diff --git a/src/input/input_mms.c b/src/input/input_mms.c index 52a0d4bab..758ad770d 100644 --- a/src/input/input_mms.c +++ b/src/input/input_mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_mms.c,v 1.68 2007/01/19 01:05:25 dgp85 Exp $ + * $Id: input_mms.c,v 1.69 2007/02/20 00:34:56 dgp85 Exp $ * * mms input plugin based on work from major mms */ @@ -102,7 +102,7 @@ static off_t mms_plugin_read (input_plugin_t *this_gen, mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; off_t n = 0; - lprintf ("mms_plugin_read: %lld bytes ...\n", len); + lprintf ("mms_plugin_read: %"PRId64" bytes ...\n", len); switch (this->protocol) { case PROTOCOL_MMST: @@ -122,7 +122,7 @@ static buf_element_t *mms_plugin_read_block (input_plugin_t *this_gen, buf_element_t *buf = fifo->buffer_pool_alloc (fifo); int total_bytes; - lprintf ("mms_plugin_read_block: %lld bytes...\n", todo); + lprintf ("mms_plugin_read_block: %"PRId64" bytes...\n", todo); buf->content = buf->mem; buf->type = BUF_DEMUX_BLOCK; @@ -144,7 +144,7 @@ static off_t mms_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin off_t dest = 0; off_t curpos = 0; - lprintf ("mms_plugin_seek: %lld offset, %d origin...\n", offset, origin); + lprintf ("mms_plugin_seek: %"PRId64" offset, %d origin...\n", offset, origin); switch (this->protocol) { @@ -239,7 +239,7 @@ static off_t mms_plugin_get_length (input_plugin_t *this_gen) { break; } - lprintf ("length is %lld\n", length); + lprintf ("length is %"PRId64"\n", length); return length; diff --git a/src/input/input_pnm.c b/src/input/input_pnm.c index af860ac1e..e1413b0f7 100644 --- a/src/input/input_pnm.c +++ b/src/input/input_pnm.c @@ -80,7 +80,7 @@ static off_t pnm_plugin_read (input_plugin_t *this_gen, pnm_input_plugin_t *this = (pnm_input_plugin_t *) this_gen; off_t n; - lprintf ("pnm_plugin_read: %lld bytes ...\n", len); + lprintf ("pnm_plugin_read: %"PRId64" bytes ...\n", len); nbc_check_buffers (this->nbc); @@ -96,7 +96,7 @@ static buf_element_t *pnm_plugin_read_block (input_plugin_t *this_gen, buf_element_t *buf = fifo->buffer_pool_alloc (fifo); int total_bytes; - lprintf ("pnm_plugin_read_block: %lld bytes...\n", todo); + lprintf ("pnm_plugin_read_block: %"PRId64" bytes...\n", todo); buf->content = buf->mem; buf->type = BUF_DEMUX_BLOCK; @@ -156,7 +156,7 @@ static off_t pnm_plugin_get_current_pos (input_plugin_t *this_gen){ pnm_input_plugin_t *this = (pnm_input_plugin_t *) this_gen; /* - printf ("current pos is %lld\n", this->curpos); + printf ("current pos is %"PRId64"\n", this->curpos); */ return this->curpos; diff --git a/src/input/input_rtsp.c b/src/input/input_rtsp.c index c23c761cc..693e8af66 100644 --- a/src/input/input_rtsp.c +++ b/src/input/input_rtsp.c @@ -81,7 +81,7 @@ static off_t rtsp_plugin_read (input_plugin_t *this_gen, rtsp_input_plugin_t *this = (rtsp_input_plugin_t *) this_gen; off_t n; - lprintf ("rtsp_plugin_read: %lld bytes ...\n", len); + lprintf ("rtsp_plugin_read: %"PRId64" bytes ...\n", len); nbc_check_buffers (this->nbc); @@ -97,7 +97,7 @@ static buf_element_t *rtsp_plugin_read_block (input_plugin_t *this_gen, buf_element_t *buf = fifo->buffer_pool_alloc (fifo); int total_bytes; - lprintf ("rtsp_plugin_read_block: %lld bytes...\n", todo); + lprintf ("rtsp_plugin_read_block: %"PRId64" bytes...\n", todo); buf->content = buf->mem; buf->type = BUF_DEMUX_BLOCK; @@ -118,7 +118,7 @@ static off_t rtsp_plugin_seek (input_plugin_t *this_gen, off_t offset, int origi rtsp_input_plugin_t *this = (rtsp_input_plugin_t *) this_gen; - lprintf ("seek %lld bytes, origin %d\n", offset, origin); + lprintf ("seek %"PRId64" bytes, origin %d\n", offset, origin); /* only realtive forward-seeking is implemented */ @@ -168,7 +168,7 @@ static off_t rtsp_plugin_get_current_pos (input_plugin_t *this_gen){ rtsp_input_plugin_t *this = (rtsp_input_plugin_t *) this_gen; /* - printf ("current pos is %lld\n", this->curpos); + printf ("current pos is %"PRId64"\n", this->curpos); */ return this->curpos; diff --git a/src/input/input_stdin_fifo.c b/src/input/input_stdin_fifo.c index 654e5d1a2..939f56f25 100644 --- a/src/input/input_stdin_fifo.c +++ b/src/input/input_stdin_fifo.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_stdin_fifo.c,v 1.69 2007/01/19 01:05:25 dgp85 Exp $ + * $Id: input_stdin_fifo.c,v 1.70 2007/02/20 00:34:56 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -86,14 +86,14 @@ static off_t stdin_plugin_read (input_plugin_t *this_gen, stdin_input_plugin_t *this = (stdin_input_plugin_t *) this_gen; off_t n, total; - lprintf ("reading %lld bytes...\n", len); + lprintf ("reading %"PRId64" bytes...\n", len); total=0; if (this->curpos < this->preview_size) { n = this->preview_size - this->curpos; if (n > (len - total)) n = len - total; - lprintf ("%lld bytes from preview (which has %lld bytes)\n", n, this->preview_size); + lprintf ("%"PRId64" bytes from preview (which has %"PRId64" bytes)\n", n, this->preview_size); memcpy (&buf[total], &this->preview[this->curpos], n); this->curpos += n; @@ -103,7 +103,7 @@ static off_t stdin_plugin_read (input_plugin_t *this_gen, if( (len-total) > 0 ) { n = _x_io_file_read (this->stream, this->fh, &buf[total], len - total); - lprintf ("got %lld bytes (%lld/%lld bytes read)\n", n,total,len); + lprintf ("got %"PRId64" bytes (%"PRId64"/%"PRId64" bytes read)\n", n,total,len); if (n < 0) { _x_message(this->stream, XINE_MSG_READ_ERROR, NULL); @@ -143,7 +143,7 @@ static off_t stdin_plugin_seek (input_plugin_t *this_gen, off_t offset, int orig stdin_input_plugin_t *this = (stdin_input_plugin_t *) this_gen; - lprintf ("seek %lld offset, %d origin...\n", offset, origin); + lprintf ("seek %"PRId64" offset, %d origin...\n", offset, origin); if ((origin == SEEK_CUR) && (offset >= 0)) { diff --git a/src/input/mms.c b/src/input/mms.c index 370b20759..74087f7c5 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mms.c,v 1.64 2007/01/03 15:09:42 klan Exp $ + * $Id: mms.c,v 1.65 2007/02/20 00:34:56 dgp85 Exp $ * * MMS over TCP protocol * based on work from major mms @@ -385,7 +385,7 @@ static int get_packet_header (mms_t *this, mms_packet_header_t *header) { return packet_type; error: - lprintf("read error, len=%d\n", len); + lprintf("read error, len=%zd\n", len); return MMS_PACKET_ERR; } -- cgit v1.2.3 From 35c39badb1b0b66a16da10e510eb755eed1afb25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 20 Feb 2007 00:51:39 +0000 Subject: Mark a fwe arrays static and avoid casts that are not needed. CVS patchset: 8612 CVS date: 2007/02/20 00:51:39 --- src/input/input_mms.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/input') diff --git a/src/input/input_mms.c b/src/input/input_mms.c index 758ad770d..05c0b168b 100644 --- a/src/input/input_mms.c +++ b/src/input/input_mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_mms.c,v 1.69 2007/02/20 00:34:56 dgp85 Exp $ + * $Id: input_mms.c,v 1.70 2007/02/20 00:51:39 dgp85 Exp $ * * mms input plugin based on work from major mms */ @@ -56,18 +56,18 @@ #define PROTOCOL_MMSH 2 /* network bandwidth */ -const uint32_t mms_bandwidths[]={14400,19200,28800,33600,34430,57600, - 115200,262200,393216,524300,1544000,10485800}; +static const uint32_t mms_bandwidths[]={14400,19200,28800,33600,34430,57600, + 115200,262200,393216,524300,1544000,10485800}; -const char * mms_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 * mms_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}; /* connection methods */ -const char *mms_protocol_strs[]={"auto", "TCP", "HTTP", NULL}; +static const char *mms_protocol_strs[]={"auto", "TCP", "HTTP", NULL}; typedef struct { input_plugin_t input_plugin; @@ -475,7 +475,7 @@ static void *init_class (xine_t *xine, void *data) { this->input_class.eject_media = NULL; xine->config->register_enum(xine->config, "media.network.bandwidth", 10, - (char **)mms_bandwidth_strs, + mms_bandwidth_strs, _("network bandwidth"), _("Specify the bandwidth of your internet connection here. " "This will be used when streaming servers offer different versions " @@ -485,7 +485,7 @@ static void *init_class (xine_t *xine, void *data) { this->protocol = xine->config->register_enum(xine->config, "media.network.mms_protocol", 0, - (char **)mms_protocol_strs, + mms_protocol_strs, _("MMS protocol"), _("Select the protocol to encapsulate MMS.\nTCP is better but you may need HTTP behind a firewall."), 20, -- cgit v1.2.3 From 7b7f11b8e9dcfa069ccd447c4054dd8d832f628c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 20 Feb 2007 01:04:07 +0000 Subject: const++ CVS patchset: 8616 CVS date: 2007/02/20 01:04:07 --- src/input/input_dvd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/input') diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index a8100a063..944ae88bd 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.215 2007/02/08 02:40:23 dsalt Exp $ + * $Id: input_dvd.c,v 1.216 2007/02/20 01:04:07 dgp85 Exp $ * */ @@ -1749,9 +1749,9 @@ static void *init_class (xine_t *xine, void *data) { dvd_input_class_t *this; config_values_t *config = xine->config; void *dvdcss; - static char *skip_modes[] = {"skip program", "skip part", "skip title", NULL}; - static char *seek_modes[] = {"seek in program chain", "seek in program", NULL}; - static char *play_single_chapter_modes[] = {"entire dvd", "one chapter", NULL}; + 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}; trace_print("Called\n"); #ifdef INPUT_DEBUG @@ -1795,7 +1795,7 @@ static void *init_class (xine_t *xine, void *data) { { /* we have found libdvdcss, enable the specific config options */ char *raw_device; - static char *decrypt_modes[] = { "key", "disc", "title", NULL }; + static const char *decrypt_modes[] = { "key", "disc", "title", NULL }; char *css_cache_default, *css_cache; int mode; -- cgit v1.2.3 From ccff0b02565287e40e5eb90024f4fc4141804477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 21 Feb 2007 23:17:14 +0000 Subject: Declare vcdinfo_get_seg_resolution function in vcdplayer.c where it is used, but note that it's not exported by libvcd so it is unsafe to use. CVS patchset: 8619 CVS date: 2007/02/21 23:17:14 --- src/input/vcd/vcdplayer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/vcd/vcdplayer.c b/src/input/vcd/vcdplayer.c index 27f726e3c..502d736cc 100644 --- a/src/input/vcd/vcdplayer.c +++ b/src/input/vcd/vcdplayer.c @@ -1,5 +1,5 @@ /* - $Id: vcdplayer.c,v 1.19 2005/06/20 02:17:41 rockyb Exp $ + $Id: vcdplayer.c,v 1.20 2007/02/21 23:17:14 dgp85 Exp $ Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein @@ -46,6 +46,12 @@ #include "vcdplayer.h" #include "vcdio.h" +/* This function is _not_ exported by libvcd, its usage should be avoided, most + * likely. + */ +void vcdinfo_get_seg_resolution(const vcdinfo_obj_t *p_vcdinfo, segnum_t i_seg, + /*out*/ uint16_t *max_x, /*out*/ uint16_t *max_y); + #define LOG_ERR(p_vcdplayer, s, args...) \ if (p_vcdplayer != NULL && p_vcdplayer->log_err != NULL) \ p_vcdplayer->log_err("%s: "s, __func__ , ##args) -- cgit v1.2.3 From 295f5b05da6ab6246632f26fe31a22283faf8326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 25 Feb 2007 18:04:08 +0000 Subject: Remove unused code. CVS patchset: 8627 CVS date: 2007/02/25 18:04:08 --- src/input/input_file.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/input') diff --git a/src/input/input_file.c b/src/input/input_file.c index 82e317492..567a41c9f 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_file.c,v 1.120 2007/01/19 01:05:25 dgp85 Exp $ + * $Id: input_file.c,v 1.121 2007/02/25 18:04:08 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -280,11 +280,6 @@ static off_t file_plugin_get_length (input_plugin_t *this_gen) { } static uint32_t file_plugin_get_blocksize (input_plugin_t *this_gen) { - file_input_plugin_t *this = (file_input_plugin_t *) this_gen; -#if 0 && defined(HAVE_MMAP) - if ( check_mmap_file(this) ) - return this->mmap_len; -#endif return 0; } -- cgit v1.2.3 From 3fe8885e89f19942f57f4de3fd5cc2e3d9cdb016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 10 Mar 2007 00:48:59 +0000 Subject: Add support for NetBSD to src/input/input_cdda.c, patch by Sergey Svishchev. CVS patchset: 8657 CVS date: 2007/03/10 00:48:59 --- src/input/input_cdda.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 85 insertions(+), 5 deletions(-) (limited to 'src/input') diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 632ca3252..d21c8e4db 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -20,7 +20,7 @@ * Compact Disc Digital Audio (CDDA) Input Plugin * by Mike Melanson (melanson@pcisys.net) * - * $Id: input_cdda.c,v 1.93 2007/01/19 01:05:24 dgp85 Exp $ + * $Id: input_cdda.c,v 1.94 2007/03/10 00:48:59 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -86,6 +86,7 @@ #define CD_FRAMES_PER_SECOND 75 #define CD_RAW_FRAME_SIZE 2352 #define CD_LEADOUT_TRACK 0xAA +#define CD_BLOCK_OFFSET 150 typedef struct _cdrom_toc_entry { int track_mode; @@ -613,14 +614,20 @@ static int read_cdrom_frames(cdda_input_plugin_t *this_gen, int frame, int num_f return 0; } -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__NetBSD__) #include +#include static int read_cdrom_toc(int fd, cdrom_toc *toc) { struct ioc_toc_header tochdr; +#if defined(__FreeBSD__) struct ioc_read_toc_single_entry tocentry; +#elif defined(__NetBSD__) + struct ioc_read_toc_entry tocentry; + struct cd_toc_entry data; +#endif int i; /* fetch the table of contents */ @@ -646,13 +653,26 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) { memset(&tocentry, 0, sizeof(tocentry)); +#if defined(__FreeBSD__) tocentry.track = i; tocentry.address_format = CD_MSF_FORMAT; if (ioctl(fd, CDIOREADTOCENTRY, &tocentry) == -1) { perror("CDIOREADTOCENTRY"); return -1; } +#elif defined(__NetBSD__) + memset(&data, 0, sizeof(data)); + tocentry.data_len = sizeof(data); + tocentry.data = &data; + tocentry.starting_track = i; + tocentry.address_format = CD_MSF_FORMAT; + if (ioctl(fd, CDIOREADTOCENTRYS, &tocentry) == -1) { + perror("CDIOREADTOCENTRYS"); + return -1; + } +#endif +#if defined(__FreeBSD__) toc->toc_entries[i-1].track_mode = (tocentry.entry.control & 0x04) ? 1 : 0; toc->toc_entries[i-1].first_frame_minute = tocentry.entry.addr.msf.minute; toc->toc_entries[i-1].first_frame_second = tocentry.entry.addr.msf.second; @@ -661,18 +681,41 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) { (tocentry.entry.addr.msf.minute * CD_SECONDS_PER_MINUTE * CD_FRAMES_PER_SECOND) + (tocentry.entry.addr.msf.second * CD_FRAMES_PER_SECOND) + tocentry.entry.addr.msf.frame; +#elif defined(__NetBSD__) + toc->toc_entries[i-1].track_mode = (tocentry.data->control & 0x04) ? 1 : 0; + toc->toc_entries[i-1].first_frame_minute = tocentry.data->addr.msf.minute; + toc->toc_entries[i-1].first_frame_second = tocentry.data->addr.msf.second; + toc->toc_entries[i-1].first_frame_frame = tocentry.data->addr.msf.frame; + toc->toc_entries[i-1].first_frame = + (tocentry.data->addr.msf.minute * CD_SECONDS_PER_MINUTE * CD_FRAMES_PER_SECOND) + + (tocentry.data->addr.msf.second * CD_FRAMES_PER_SECOND) + + tocentry.data->addr.msf.frame - CD_BLOCK_OFFSET; +#endif } /* fetch the leadout as well */ memset(&tocentry, 0, sizeof(tocentry)); +#if defined(__FreeBSD__) tocentry.track = CD_LEADOUT_TRACK; tocentry.address_format = CD_MSF_FORMAT; if (ioctl(fd, CDIOREADTOCENTRY, &tocentry) == -1) { perror("CDIOREADTOCENTRY"); return -1; } +#elif defined(__NetBSD__) + memset(&data, 0, sizeof(data)); + tocentry.data_len = sizeof(data); + tocentry.data = &data; + tocentry.starting_track = CD_LEADOUT_TRACK; + tocentry.address_format = CD_MSF_FORMAT; + if (ioctl(fd, CDIOREADTOCENTRYS, &tocentry) == -1) { + perror("CDIOREADTOCENTRYS"); + return -1; + } +#endif +#if defined(__FreeBSD__) toc->leadout_track.track_mode = (tocentry.entry.control & 0x04) ? 1 : 0; toc->leadout_track.first_frame_minute = tocentry.entry.addr.msf.minute; toc->leadout_track.first_frame_second = tocentry.entry.addr.msf.second; @@ -681,6 +724,16 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) { (tocentry.entry.addr.msf.minute * CD_SECONDS_PER_MINUTE * CD_FRAMES_PER_SECOND) + (tocentry.entry.addr.msf.second * CD_FRAMES_PER_SECOND) + tocentry.entry.addr.msf.frame; +#elif defined(__NetBSD__) + toc->leadout_track.track_mode = (tocentry.data->control & 0x04) ? 1 : 0; + toc->leadout_track.first_frame_minute = tocentry.data->addr.msf.minute; + toc->leadout_track.first_frame_second = tocentry.data->addr.msf.second; + toc->leadout_track.first_frame_frame = tocentry.data->addr.msf.frame; + toc->leadout_track.first_frame = + (tocentry.data->addr.msf.minute * CD_SECONDS_PER_MINUTE * CD_FRAMES_PER_SECOND) + + (tocentry.data->addr.msf.second * CD_FRAMES_PER_SECOND) + + tocentry.data->addr.msf.frame - CD_BLOCK_OFFSET; +#endif return 0; } @@ -689,12 +742,12 @@ static int read_cdrom_frames(cdda_input_plugin_t *this_gen, int frame, int num_f unsigned char *data) { int fd = this_gen->fd; -#if __FreeBSD_version < 501106 - struct ioc_read_audio cdda; -#endif while( num_frames ) { +#if defined(__FreeBSD__) #if __FreeBSD_version < 501106 + struct ioc_read_audio cdda; + cdda.address_format = CD_MSF_FORMAT; cdda.address.msf.minute = frame / CD_SECONDS_PER_MINUTE / CD_FRAMES_PER_SECOND; cdda.address.msf.second = (frame / CD_FRAMES_PER_SECOND) % CD_SECONDS_PER_MINUTE; @@ -712,6 +765,33 @@ static int read_cdrom_frames(cdda_input_plugin_t *this_gen, int frame, int num_f perror("CDIOCREADAUDIO"); return -1; } +#elif defined(__NetBSD__) + scsireq_t req; + int nblocks = 1; + + memset(&req, 0, sizeof(req)); + req.cmd[0] = 0xbe; + req.cmd[1] = 0; + req.cmd[2] = (frame >> 24) & 0xff; + req.cmd[3] = (frame >> 16) & 0xff; + req.cmd[4] = (frame >> 8) & 0xff; + req.cmd[5] = (frame >> 0) & 0xff; + req.cmd[6] = (nblocks >> 16) & 0xff; + req.cmd[7] = (nblocks >> 8) & 0xff; + req.cmd[8] = (nblocks >> 0) & 0xff; + req.cmd[9] = 0x78; + req.cmdlen = 10; + + req.datalen = nblocks * CD_RAW_FRAME_SIZE; + req.databuf = data; + req.timeout = 10000; + req.flags = SCCMD_READ; + + if(ioctl(fd, SCIOCCOMMAND, &req) < 0) { + perror("SCIOCCOMMAND"); + return -1; + } +#endif data += CD_RAW_FRAME_SIZE; frame++; -- cgit v1.2.3 From e7b7ee301659be9bf81f0f86310fb31e8a154e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 10 Mar 2007 00:57:30 +0000 Subject: When hstrerror() is found in libresolv, link it where it is used. Patch by Albert Lee. CVS patchset: 8660 CVS date: 2007/03/10 00:57:30 --- 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 a3635ccad..f8e17ae61 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -82,7 +82,7 @@ xineplug_inp_dvd_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_dvd_la_LDFLAGS = -avoid-version -module xineplug_inp_net_la_SOURCES = input_net.c net_buf_ctrl.c -xineplug_inp_net_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS) +xineplug_inp_net_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(THREAD_LIBS) xineplug_inp_net_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_net_la_LDFLAGS = -avoid-version -module @@ -102,12 +102,12 @@ xineplug_inp_stdin_fifo_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_stdin_fifo_la_LDFLAGS = -avoid-version -module xineplug_inp_rtp_la_SOURCES = input_rtp.c net_buf_ctrl.c -xineplug_inp_rtp_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS) +xineplug_inp_rtp_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(THREAD_LIBS) xineplug_inp_rtp_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_rtp_la_LDFLAGS = -avoid-version -module xineplug_inp_http_la_SOURCES = input_http.c net_buf_ctrl.c http_helper.c -xineplug_inp_http_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS) +xineplug_inp_http_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(THREAD_LIBS) xineplug_inp_http_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_http_la_LDFLAGS = -avoid-version -module -- cgit v1.2.3 From 46dd1a8031362a79fb790d3020801bbd41ab295a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 16 Mar 2007 16:32:58 +0000 Subject: Move netinet/in.h include down the block; this is currently patched by FreeBSD ports, and makes no functional change of sort on Linux. CVS patchset: 8675 CVS date: 2007/03/16 16:32:58 --- src/input/input_vcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index 82c1b53d9..bcd50ecc1 100644 --- a/src/input/input_vcd.c +++ b/src/input/input_vcd.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_vcd.c,v 1.88 2007/01/19 01:05:25 dgp85 Exp $ + * $Id: input_vcd.c,v 1.89 2007/03/16 16:32:58 dgp85 Exp $ * */ @@ -25,7 +25,6 @@ #include "config.h" #endif -#include #include #include #include @@ -34,6 +33,7 @@ #include #include #include +#include #ifdef HAVE_LINUX_CDROM_H # include #endif -- cgit v1.2.3 From 01f379bf544c35cf3c17d3dacfbb2eec2cc6d7d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 17 Mar 2007 16:47:16 +0000 Subject: Some servers does not send a human-readable http status description, for those, check only the status code. This fixes WikipediaWeekly podcasts for instance. CVS patchset: 8706 CVS date: 2007/03/17 16:47:16 --- src/input/input_http.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/input') diff --git a/src/input/input_http.c b/src/input/input_http.c index a9bcee0d5..3adbc836b 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -19,7 +19,7 @@ * * input plugin for http network streams * - * $Id: input_http.c,v 1.128 2007/02/20 00:34:56 dgp85 Exp $ + * $Id: input_http.c,v 1.129 2007/03/17 16:47:16 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -804,18 +804,20 @@ static int http_plugin_open (input_plugin_t *this_gen ) { if (linenum == 1) { int httpver, httpsub; - char httpstatus[51]; - - if (sscanf(this->buf, "HTTP/%d.%d %d %50[^\015\012]", &httpver, &httpsub, - &httpcode, httpstatus) != 4) { - - /* icecast 1 ? */ - if (sscanf(this->buf, "ICY %d %50[^\015\012]", &httpcode, httpstatus) != 2) { + char httpstatus[51] = { 0, }; + + if ( + (sscanf(this->buf, "HTTP/%d.%d %d %50[^\015\012]", &httpver, &httpsub, + &httpcode, httpstatus) != 4) && + (sscanf(this->buf, "HTTP/%d.%d %d", &httpver, &httpsub, + &httpcode) != 3) && + (sscanf(this->buf, "ICY %d %50[^\015\012]", /* icecast 1 ? */ + &httpcode, httpstatus) != 2) + ) { _x_message(this->stream, XINE_MSG_CONNECTION_REFUSED, "invalid http answer", NULL); xine_log (this->stream->xine, XINE_LOG_MSG, _("input_http: invalid http answer\n")); return -6; - } } if (httpcode >= 300 && httpcode < 400) { -- cgit v1.2.3 From fa60bd19a16595b147477d49215f2aefde5b0d5b Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 17 Mar 2007 19:15:58 +0000 Subject: Avoid a possible floating-point exception when starting stream playback. CVS patchset: 8707 CVS date: 2007/03/17 19:15:58 --- src/input/net_buf_ctrl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/input') diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c index 75743a070..86514cdea 100644 --- a/src/input/net_buf_ctrl.c +++ b/src/input/net_buf_ctrl.c @@ -149,7 +149,7 @@ static void nbc_compute_fifo_length(nbc_t *this, fifo_buffer_t *fifo, buf_element_t *buf, int action) { - int fifo_free, fifo_fill; + int fifo_free, fifo_fill, fifo_div; int64_t video_br, audio_br, diff; int has_video, has_audio; @@ -160,10 +160,13 @@ static void nbc_compute_fifo_length(nbc_t *this, fifo_free = fifo->buffer_pool_num_free; fifo_fill = fifo->fifo_size; + fifo_div = fifo_fill + fifo_free - 1; + if (fifo_div == 0) + fifo_div = 1; /* avoid a possible divide-by-zero */ if (fifo == this->video_fifo) { this->video_fifo_free = fifo_free; - this->video_fifo_fill = (100 * fifo_fill) / (fifo_fill + fifo_free - 1); + this->video_fifo_fill = (100 * fifo_fill) / fifo_div; this->video_fifo_size = fifo->fifo_data_size; if (buf->pts && (this->video_in_disc == 0)) { @@ -196,7 +199,7 @@ static void nbc_compute_fifo_length(nbc_t *this, } else { this->audio_fifo_free = fifo_free; - this->audio_fifo_fill = (100 * fifo_fill) / (fifo_fill + fifo_free - 1); + this->audio_fifo_fill = (100 * fifo_fill) / fifo_div; this->audio_fifo_size = fifo->fifo_data_size; if (buf->pts && (this->audio_in_disc == 0)) { -- cgit v1.2.3 From fe90824d32eac6e47c6520c6d77d9956c82187fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 20 Mar 2007 00:35:29 +0000 Subject: Add B2N macros for OSX. Patch by Martin Aumueller. Also add to the diff from CVS as needs to be submitted. CVS patchset: 8727 CVS date: 2007/03/20 00:35:29 --- src/input/libdvdnav/bswap.h | 6 ++++++ src/input/libdvdnav/diff_against_cvs.patch | 13 +++++++++++++ 2 files changed, 19 insertions(+) (limited to 'src/input') diff --git a/src/input/libdvdnav/bswap.h b/src/input/libdvdnav/bswap.h index 7d7acd556..c1fc7a045 100644 --- a/src/input/libdvdnav/bswap.h +++ b/src/input/libdvdnav/bswap.h @@ -41,6 +41,12 @@ #define B2N_32(x) x = bswap_32(x) #define B2N_64(x) x = bswap_64(x) +#elif defined(__APPLE__) +#include +#define B2N_16(x) x = OSSwapBigToHostInt16(x) +#define B2N_32(x) x = OSSwapBigToHostInt32(x) +#define B2N_64(x) x = OSSwapBigToHostInt64(x) + #elif defined(__NetBSD__) #include #define B2N_16(x) BE16TOH(x) diff --git a/src/input/libdvdnav/diff_against_cvs.patch b/src/input/libdvdnav/diff_against_cvs.patch index 6afca3a98..202474fef 100644 --- a/src/input/libdvdnav/diff_against_cvs.patch +++ b/src/input/libdvdnav/diff_against_cvs.patch @@ -263,6 +263,19 @@ diff -u -p -u -r1.3 bswap.h #include #define B2N_16(x) x = bswap_16(x) #define B2N_32(x) x = bswap_32(x) +@@ -41,6 +41,12 @@ + #define B2N_32(x) x = bswap_32(x) + #define B2N_64(x) x = bswap_64(x) + ++#elif defined(__APPLE__) ++#include ++#define B2N_16(x) x = OSSwapBigToHostInt16(x) ++#define B2N_32(x) x = OSSwapBigToHostInt32(x) ++#define B2N_64(x) x = OSSwapBigToHostInt64(x) ++ + #elif defined(__NetBSD__) + #include + #define B2N_16(x) BE16TOH(x) Index: src/input/libdvdnav/dvd_reader.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/input/libdvdnav/dvd_reader.c,v -- cgit v1.2.3 From 63f41055e2031631c01aee2539fa1a6027513078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 22 Mar 2007 17:37:17 +0000 Subject: Instead of rewriting the install and uninstall rules for headers, simply change their class to xineinclude, and set xineincludedir in Makefile.common. CVS patchset: 8737 CVS date: 2007/03/22 17:37:17 --- src/input/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/Makefile.am b/src/input/Makefile.am index f8e17ae61..dbe9d97dc 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -151,6 +151,6 @@ xineplug_inp_pvr_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS) xineplug_inp_pvr_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_pvr_la_LDFLAGS = -avoid-version -module -include_HEADERS = input_plugin.h +xineinclude_HEADERS = input_plugin.h noinst_HEADERS = net_buf_ctrl.h mms.h mmsh.h pnm.h media_helper.h videodev2.h http_helper.h -- cgit v1.2.3 From 62b1bb0c213c37b58e5a7bb8359f41168c34f817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 22 Mar 2007 20:44:58 +0000 Subject: Fix crosscompile to use build and host definition from autoconf, rather than using hacksaround. Also replace the whole pthread check with an improved macro originally written for XCB, this way it's not going to try linking the fake -lpthread on Darwin, and it also does not force a -I/usr/local/include on FreeBSD. The new macro respects the same variables set by ports, so that it's even more transparent to FreeBSD users. CVS patchset: 8739 CVS date: 2007/03/22 20:44:58 --- src/input/Makefile.am | 22 +++++++++++----------- src/input/libdvdnav/Makefile.am | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/input') diff --git a/src/input/Makefile.am b/src/input/Makefile.am index dbe9d97dc..68adf84be 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -77,17 +77,17 @@ xineplug_inp_file_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_file_la_LDFLAGS = -avoid-version -module xineplug_inp_dvd_la_SOURCES = input_dvd.c media_helper.c -xineplug_inp_dvd_la_LIBADD = $(XINE_LIB) $(link_dvdnav) $(THREAD_LIBS) $(DYNAMIC_LD_LIBS) +xineplug_inp_dvd_la_LIBADD = $(XINE_LIB) $(link_dvdnav) $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS) xineplug_inp_dvd_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_dvd_la_LDFLAGS = -avoid-version -module xineplug_inp_net_la_SOURCES = input_net.c net_buf_ctrl.c -xineplug_inp_net_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(THREAD_LIBS) +xineplug_inp_net_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS) xineplug_inp_net_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_net_la_LDFLAGS = -avoid-version -module xineplug_inp_mms_la_SOURCES = input_mms.c net_buf_ctrl.c mms.c mmsh.c http_helper.c ../demuxers/asfheader.c -xineplug_inp_mms_la_LIBADD = $(XINE_LIB) @LIBICONV@ $(THREAD_LIBS) +xineplug_inp_mms_la_LIBADD = $(XINE_LIB) @LIBICONV@ $(PTHREAD_LIBS) xineplug_inp_mms_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_mms_la_LDFLAGS = -avoid-version -module @@ -97,32 +97,32 @@ xineplug_inp_vcdo_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_vcdo_la_LDFLAGS = -avoid-version -module xineplug_inp_stdin_fifo_la_SOURCES = input_stdin_fifo.c net_buf_ctrl.c -xineplug_inp_stdin_fifo_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS) +xineplug_inp_stdin_fifo_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) xineplug_inp_stdin_fifo_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_stdin_fifo_la_LDFLAGS = -avoid-version -module xineplug_inp_rtp_la_SOURCES = input_rtp.c net_buf_ctrl.c -xineplug_inp_rtp_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(THREAD_LIBS) +xineplug_inp_rtp_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS) xineplug_inp_rtp_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_rtp_la_LDFLAGS = -avoid-version -module xineplug_inp_http_la_SOURCES = input_http.c net_buf_ctrl.c http_helper.c -xineplug_inp_http_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(THREAD_LIBS) +xineplug_inp_http_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS) xineplug_inp_http_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_http_la_LDFLAGS = -avoid-version -module xineplug_inp_pnm_la_SOURCES = input_pnm.c net_buf_ctrl.c pnm.c -xineplug_inp_pnm_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS) +xineplug_inp_pnm_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) xineplug_inp_pnm_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_pnm_la_LDFLAGS = -avoid-version -module xineplug_inp_dvb_la_SOURCES = input_dvb.c net_buf_ctrl.c -xineplug_inp_dvb_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS) +xineplug_inp_dvb_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) xineplug_inp_dvb_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_dvb_la_LDFLAGS = -avoid-version -module xineplug_inp_rtsp_la_SOURCES = input_rtsp.c net_buf_ctrl.c -xineplug_inp_rtsp_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS) libreal/libreal.la librtsp/librtsp.la +xineplug_inp_rtsp_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) libreal/libreal.la librtsp/librtsp.la xineplug_inp_rtsp_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_rtsp_la_LDFLAGS = -avoid-version -module @@ -137,7 +137,7 @@ 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) $(THREAD_LIBS) +xineplug_inp_gnome_vfs_la_LIBADD = $(GNOME_VFS_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) xineplug_inp_gnome_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_gnome_vfs_la_LDFLAGS = -avoid-version -module @@ -147,7 +147,7 @@ xineplug_inp_smb_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_smb_la_LDFLAGS = -avoid-version -module xineplug_inp_pvr_la_SOURCES = input_pvr.c -xineplug_inp_pvr_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS) +xineplug_inp_pvr_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) xineplug_inp_pvr_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) xineplug_inp_pvr_la_LDFLAGS = -avoid-version -module diff --git a/src/input/libdvdnav/Makefile.am b/src/input/libdvdnav/Makefile.am index 2aadb3588..412828261 100644 --- a/src/input/libdvdnav/Makefile.am +++ b/src/input/libdvdnav/Makefile.am @@ -22,7 +22,7 @@ libdvdnav_la_SOURCES = \ dvd_reader.c \ dvd_input.c \ dvd_udf.c -libdvdnav_la_LIBADD = $(THREAD_LIBS) +libdvdnav_la_LIBADD = $(PTHREAD_LIBS) libdvdnav_la_CFLAGS = $(VISIBILITY_FLAG) libdvdnav_la_LDFLAGS = -avoid-version -module -- cgit v1.2.3 From 28f03eec2826b61adc58e545a642d3d14163cf91 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Fri, 23 Mar 2007 21:47:31 +0000 Subject: Fix closing the vcd device if the disc is not a video CD. libvcdinfo 0.7.23 closes the device in this case whereas the built-in version did not, and this was causing double frees due to my previous fix which addressed only the built-in version (which needs to be either updated to 0.7.23 or dropped). CVS patchset: 8743 CVS date: 2007/03/23 21:47:31 --- src/input/vcd/libvcd/info.c | 16 +++++++--------- src/input/vcd/vcdio.c | 5 ++--- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'src/input') diff --git a/src/input/vcd/libvcd/info.c b/src/input/vcd/libvcd/info.c index d178968a8..b01bd6eee 100644 --- a/src/input/vcd/libvcd/info.c +++ b/src/input/vcd/libvcd/info.c @@ -1,5 +1,5 @@ /* - $Id: info.c,v 1.7 2006/09/26 22:29:39 dgp85 Exp $ + $Id: info.c,v 1.8 2007/03/23 21:47:31 dsalt Exp $ Copyright (C) 2002, 2003, 2004 Rocky Bernstein @@ -59,7 +59,7 @@ #include #include -static const char _rcsid[] = "$Id: info.c,v 1.7 2006/09/26 22:29:39 dgp85 Exp $"; +static const char _rcsid[] = "$Id: info.c,v 1.8 2007/03/23 21:47:31 dsalt Exp $"; #define BUF_COUNT 16 #define BUF_SIZE 80 @@ -1904,14 +1904,12 @@ vcdinfo_open(vcdinfo_obj_t **obj_p, char *source_name[], strlen (ISO_XA_MARKER_STRING)); } - if (!read_info(obj->img, &(obj->info), &(obj->vcd_type))) - return VCDINFO_OPEN_OTHER; - - if (vcdinfo_get_format_version (obj) == VCD_TYPE_INVALID) - return VCDINFO_OPEN_OTHER; - - if (!read_entries(obj->img, &(obj->entries))) + if (!read_info(obj->img, &(obj->info), &(obj->vcd_type)) || + vcdinfo_get_format_version (obj) == VCD_TYPE_INVALID || + !read_entries(obj->img, &(obj->entries))) { + free (obj); /* match 0.7.23's behaviour */ return VCDINFO_OPEN_OTHER; + } { size_t len = strlen(*source_name)+1; diff --git a/src/input/vcd/vcdio.c b/src/input/vcd/vcdio.c index 31cc0cd49..387397cf4 100644 --- a/src/input/vcd/vcdio.c +++ b/src/input/vcd/vcdio.c @@ -1,5 +1,5 @@ /* - $Id: vcdio.c,v 1.8 2006/12/13 19:14:19 dsalt Exp $ + $Id: vcdio.c,v 1.9 2007/03/23 21:47:31 dsalt Exp $ Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein @@ -115,8 +115,7 @@ vcdio_open(vcdplayer_t *p_vcdplayer, char *intended_vcd_device) break; default: - /* Opened the device, but it's not a VCD => close it & return failure */ - vcdinfo_close(p_vcdplayer->vcd); + /* Opened the device, but it's not a VCD => is closed, return failure */ return false; } -- cgit v1.2.3 From de8b70199d639a9d33a1a9efc3aecc8f705f88ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 29 Mar 2007 19:45:33 +0000 Subject: Reorder fields to fill hole. CVS patchset: 8774 CVS date: 2007/03/29 19:45:33 --- src/input/input_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/input_file.c b/src/input/input_file.c index 567a41c9f..fd2b0e733 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_file.c,v 1.121 2007/02/25 18:04:08 dgp85 Exp $ + * $Id: input_file.c,v 1.122 2007/03/29 19:47:17 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -66,8 +66,8 @@ typedef struct { xine_t *xine; config_values_t *config; - int show_hidden_files; char *origin_path; + int show_hidden_files; int mrls_allocated_entries; xine_mrl_t **mrls; -- cgit v1.2.3 From 6ff7b823ea37c8baa725fad659b06b23e1d92d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 2 Apr 2007 20:44:04 +0200 Subject: Migrate all .cvsignore files to .hgignore. --HG-- rename : .cvsignore => .hgignore rename : doc/.cvsignore => doc/.hgignore rename : doc/faq/.cvsignore => doc/faq/.hgignore rename : doc/hackersguide/.cvsignore => doc/hackersguide/.hgignore rename : doc/man/.cvsignore => doc/man/.hgignore rename : doc/man/en/.cvsignore => doc/man/en/.hgignore rename : include/.cvsignore => include/.hgignore rename : intl/.cvsignore => intl/.hgignore rename : lib/.cvsignore => lib/.hgignore rename : m4/.cvsignore => m4/.hgignore rename : misc/.cvsignore => misc/.hgignore rename : misc/fonts/.cvsignore => misc/fonts/.hgignore rename : po/.cvsignore => po/.hgignore rename : src/.cvsignore => src/.hgignore rename : src/audio_out/.cvsignore => src/audio_out/.hgignore rename : src/combined/.cvsignore => src/combined/.hgignore rename : src/demuxers/.cvsignore => src/demuxers/.hgignore rename : src/dxr3/.cvsignore => src/dxr3/.hgignore rename : src/input/.cvsignore => src/input/.hgignore rename : src/input/dvb/.cvsignore => src/input/dvb/.hgignore rename : src/input/libdvdnav/.cvsignore => src/input/libdvdnav/.hgignore rename : src/input/libreal/.cvsignore => src/input/libreal/.hgignore rename : src/input/librtsp/.cvsignore => src/input/librtsp/.hgignore rename : src/input/vcd/.cvsignore => src/input/vcd/.hgignore rename : src/input/vcd/libcdio/.cvsignore => src/input/vcd/libcdio/.hgignore rename : src/input/vcd/libcdio/MSWindows/.cvsignore => src/input/vcd/libcdio/MSWindows/.hgignore rename : src/input/vcd/libcdio/cdio/.cvsignore => src/input/vcd/libcdio/cdio/.hgignore rename : src/input/vcd/libcdio/image/.cvsignore => src/input/vcd/libcdio/image/.hgignore rename : src/input/vcd/libvcd/.cvsignore => src/input/vcd/libvcd/.hgignore rename : src/input/vcd/libvcd/libvcd/.cvsignore => src/input/vcd/libvcd/libvcd/.hgignore rename : src/liba52/.cvsignore => src/liba52/.hgignore rename : src/libdts/.cvsignore => src/libdts/.hgignore rename : src/libfaad/.cvsignore => src/libfaad/.hgignore rename : src/libfaad/codebook/.cvsignore => src/libfaad/codebook/.hgignore rename : src/libffmpeg/.cvsignore => src/libffmpeg/.hgignore rename : src/libffmpeg/libavcodec/.cvsignore => src/libffmpeg/libavcodec/.hgignore rename : src/libffmpeg/libavcodec/alpha/.cvsignore => src/libffmpeg/libavcodec/alpha/.hgignore rename : src/libffmpeg/libavcodec/armv4l/.cvsignore => src/libffmpeg/libavcodec/armv4l/.hgignore rename : src/libffmpeg/libavcodec/i386/.cvsignore => src/libffmpeg/libavcodec/i386/.hgignore rename : src/libffmpeg/libavcodec/libpostproc/.cvsignore => src/libffmpeg/libavcodec/libpostproc/.hgignore rename : src/libffmpeg/libavcodec/mlib/.cvsignore => src/libffmpeg/libavcodec/mlib/.hgignore rename : src/libffmpeg/libavcodec/ppc/.cvsignore => src/libffmpeg/libavcodec/ppc/.hgignore rename : src/libffmpeg/libavcodec/sparc/.cvsignore => src/libffmpeg/libavcodec/sparc/.hgignore rename : src/libffmpeg/libavutil/.cvsignore => src/libffmpeg/libavutil/.hgignore rename : src/libflac/.cvsignore => src/libflac/.hgignore rename : src/liblpcm/.cvsignore => src/liblpcm/.hgignore rename : src/libmad/.cvsignore => src/libmad/.hgignore rename : src/libmpeg2/.cvsignore => src/libmpeg2/.hgignore rename : src/libmpeg2new/.cvsignore => src/libmpeg2new/.hgignore rename : src/libmpeg2new/include/.cvsignore => src/libmpeg2new/include/.hgignore rename : src/libmpeg2new/libmpeg2/.cvsignore => src/libmpeg2new/libmpeg2/.hgignore rename : src/libmusepack/.cvsignore => src/libmusepack/.hgignore rename : src/libmusepack/musepack/.cvsignore => src/libmusepack/musepack/.hgignore rename : src/libreal/.cvsignore => src/libreal/.hgignore rename : src/libspeex/.cvsignore => src/libspeex/.hgignore rename : src/libspucc/.cvsignore => src/libspucc/.hgignore rename : src/libspucmml/.cvsignore => src/libspucmml/.hgignore rename : src/libspudec/.cvsignore => src/libspudec/.hgignore rename : src/libspudvb/.cvsignore => src/libspudvb/.hgignore rename : src/libsputext/.cvsignore => src/libsputext/.hgignore rename : src/libtheora/.cvsignore => src/libtheora/.hgignore rename : src/libvorbis/.cvsignore => src/libvorbis/.hgignore rename : src/libw32dll/.cvsignore => src/libw32dll/.hgignore rename : src/libw32dll/DirectShow/.cvsignore => src/libw32dll/DirectShow/.hgignore rename : src/libw32dll/dmo/.cvsignore => src/libw32dll/dmo/.hgignore rename : src/libw32dll/qtx/.cvsignore => src/libw32dll/qtx/.hgignore rename : src/libw32dll/qtx/qtxsdk/.cvsignore => src/libw32dll/qtx/qtxsdk/.hgignore rename : src/libw32dll/wine/.cvsignore => src/libw32dll/wine/.hgignore rename : src/libxineadec/.cvsignore => src/libxineadec/.hgignore rename : src/libxineadec/gsm610/.cvsignore => src/libxineadec/gsm610/.hgignore rename : src/libxineadec/nosefart/.cvsignore => src/libxineadec/nosefart/.hgignore rename : src/libxinevdec/.cvsignore => src/libxinevdec/.hgignore rename : src/post/.cvsignore => src/post/.hgignore rename : src/post/audio/.cvsignore => src/post/audio/.hgignore rename : src/post/deinterlace/.cvsignore => src/post/deinterlace/.hgignore rename : src/post/deinterlace/plugins/.cvsignore => src/post/deinterlace/plugins/.hgignore rename : src/post/goom/.cvsignore => src/post/goom/.hgignore rename : src/post/mosaico/.cvsignore => src/post/mosaico/.hgignore rename : src/post/planar/.cvsignore => src/post/planar/.hgignore rename : src/post/visualizations/.cvsignore => src/post/visualizations/.hgignore rename : src/video_out/.cvsignore => src/video_out/.hgignore rename : src/video_out/libdha/.cvsignore => src/video_out/libdha/.hgignore rename : src/video_out/libdha/bin/.cvsignore => src/video_out/libdha/bin/.hgignore rename : src/video_out/libdha/kernelhelper/.cvsignore => src/video_out/libdha/kernelhelper/.hgignore rename : src/video_out/libdha/oth/.cvsignore => src/video_out/libdha/oth/.hgignore rename : src/video_out/libdha/sysdep/.cvsignore => src/video_out/libdha/sysdep/.hgignore rename : src/video_out/macosx/.cvsignore => src/video_out/macosx/.hgignore rename : src/video_out/vidix/.cvsignore => src/video_out/vidix/.hgignore rename : src/video_out/vidix/drivers/.cvsignore => src/video_out/vidix/drivers/.hgignore rename : src/xine-engine/.cvsignore => src/xine-engine/.hgignore rename : src/xine-utils/.cvsignore => src/xine-utils/.hgignore rename : win32/.cvsignore => win32/.hgignore rename : win32/include/.cvsignore => win32/include/.hgignore --- src/input/.cvsignore | 6 ------ src/input/.hgignore | 6 ++++++ src/input/dvb/.cvsignore | 2 -- src/input/dvb/.hgignore | 2 ++ src/input/libdvdnav/.cvsignore | 6 ------ src/input/libdvdnav/.hgignore | 6 ++++++ src/input/libreal/.cvsignore | 6 ------ src/input/libreal/.hgignore | 6 ++++++ src/input/librtsp/.cvsignore | 6 ------ src/input/librtsp/.hgignore | 6 ++++++ src/input/vcd/.cvsignore | 6 ------ src/input/vcd/.hgignore | 6 ++++++ src/input/vcd/libcdio/.cvsignore | 6 ------ src/input/vcd/libcdio/.hgignore | 6 ++++++ src/input/vcd/libcdio/MSWindows/.cvsignore | 2 -- src/input/vcd/libcdio/MSWindows/.hgignore | 2 ++ src/input/vcd/libcdio/cdio/.cvsignore | 2 -- src/input/vcd/libcdio/cdio/.hgignore | 2 ++ src/input/vcd/libcdio/image/.cvsignore | 2 -- src/input/vcd/libcdio/image/.hgignore | 2 ++ src/input/vcd/libvcd/.cvsignore | 6 ------ src/input/vcd/libvcd/.hgignore | 6 ++++++ src/input/vcd/libvcd/libvcd/.cvsignore | 2 -- src/input/vcd/libvcd/libvcd/.hgignore | 2 ++ 24 files changed, 52 insertions(+), 52 deletions(-) delete mode 100644 src/input/.cvsignore create mode 100644 src/input/.hgignore delete mode 100644 src/input/dvb/.cvsignore create mode 100644 src/input/dvb/.hgignore delete mode 100644 src/input/libdvdnav/.cvsignore create mode 100644 src/input/libdvdnav/.hgignore delete mode 100644 src/input/libreal/.cvsignore create mode 100644 src/input/libreal/.hgignore delete mode 100644 src/input/librtsp/.cvsignore create mode 100644 src/input/librtsp/.hgignore delete mode 100644 src/input/vcd/.cvsignore create mode 100644 src/input/vcd/.hgignore delete mode 100644 src/input/vcd/libcdio/.cvsignore create mode 100644 src/input/vcd/libcdio/.hgignore delete mode 100644 src/input/vcd/libcdio/MSWindows/.cvsignore create mode 100644 src/input/vcd/libcdio/MSWindows/.hgignore delete mode 100644 src/input/vcd/libcdio/cdio/.cvsignore create mode 100644 src/input/vcd/libcdio/cdio/.hgignore delete mode 100644 src/input/vcd/libcdio/image/.cvsignore create mode 100644 src/input/vcd/libcdio/image/.hgignore delete mode 100644 src/input/vcd/libvcd/.cvsignore create mode 100644 src/input/vcd/libvcd/.hgignore delete mode 100644 src/input/vcd/libvcd/libvcd/.cvsignore create mode 100644 src/input/vcd/libvcd/libvcd/.hgignore (limited to 'src/input') diff --git a/src/input/.cvsignore b/src/input/.cvsignore deleted file mode 100644 index 7d926a554..000000000 --- a/src/input/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -.libs -.deps -*.lo -*.la diff --git a/src/input/.hgignore b/src/input/.hgignore new file mode 100644 index 000000000..7d926a554 --- /dev/null +++ b/src/input/.hgignore @@ -0,0 +1,6 @@ +Makefile +Makefile.in +.libs +.deps +*.lo +*.la diff --git a/src/input/dvb/.cvsignore b/src/input/dvb/.cvsignore deleted file mode 100644 index 282522db0..000000000 --- a/src/input/dvb/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/input/dvb/.hgignore b/src/input/dvb/.hgignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/src/input/dvb/.hgignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/src/input/libdvdnav/.cvsignore b/src/input/libdvdnav/.cvsignore deleted file mode 100644 index 7d926a554..000000000 --- a/src/input/libdvdnav/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -.libs -.deps -*.lo -*.la diff --git a/src/input/libdvdnav/.hgignore b/src/input/libdvdnav/.hgignore new file mode 100644 index 000000000..7d926a554 --- /dev/null +++ b/src/input/libdvdnav/.hgignore @@ -0,0 +1,6 @@ +Makefile +Makefile.in +.libs +.deps +*.lo +*.la diff --git a/src/input/libreal/.cvsignore b/src/input/libreal/.cvsignore deleted file mode 100644 index 7d926a554..000000000 --- a/src/input/libreal/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -.libs -.deps -*.lo -*.la diff --git a/src/input/libreal/.hgignore b/src/input/libreal/.hgignore new file mode 100644 index 000000000..7d926a554 --- /dev/null +++ b/src/input/libreal/.hgignore @@ -0,0 +1,6 @@ +Makefile +Makefile.in +.libs +.deps +*.lo +*.la diff --git a/src/input/librtsp/.cvsignore b/src/input/librtsp/.cvsignore deleted file mode 100644 index 7d926a554..000000000 --- a/src/input/librtsp/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -.libs -.deps -*.lo -*.la diff --git a/src/input/librtsp/.hgignore b/src/input/librtsp/.hgignore new file mode 100644 index 000000000..7d926a554 --- /dev/null +++ b/src/input/librtsp/.hgignore @@ -0,0 +1,6 @@ +Makefile +Makefile.in +.libs +.deps +*.lo +*.la diff --git a/src/input/vcd/.cvsignore b/src/input/vcd/.cvsignore deleted file mode 100644 index 7d926a554..000000000 --- a/src/input/vcd/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -.libs -.deps -*.lo -*.la diff --git a/src/input/vcd/.hgignore b/src/input/vcd/.hgignore new file mode 100644 index 000000000..7d926a554 --- /dev/null +++ b/src/input/vcd/.hgignore @@ -0,0 +1,6 @@ +Makefile +Makefile.in +.libs +.deps +*.lo +*.la diff --git a/src/input/vcd/libcdio/.cvsignore b/src/input/vcd/libcdio/.cvsignore deleted file mode 100644 index 7d926a554..000000000 --- a/src/input/vcd/libcdio/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -.libs -.deps -*.lo -*.la diff --git a/src/input/vcd/libcdio/.hgignore b/src/input/vcd/libcdio/.hgignore new file mode 100644 index 000000000..7d926a554 --- /dev/null +++ b/src/input/vcd/libcdio/.hgignore @@ -0,0 +1,6 @@ +Makefile +Makefile.in +.libs +.deps +*.lo +*.la diff --git a/src/input/vcd/libcdio/MSWindows/.cvsignore b/src/input/vcd/libcdio/MSWindows/.cvsignore deleted file mode 100644 index 282522db0..000000000 --- a/src/input/vcd/libcdio/MSWindows/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/input/vcd/libcdio/MSWindows/.hgignore b/src/input/vcd/libcdio/MSWindows/.hgignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/src/input/vcd/libcdio/MSWindows/.hgignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/src/input/vcd/libcdio/cdio/.cvsignore b/src/input/vcd/libcdio/cdio/.cvsignore deleted file mode 100644 index 282522db0..000000000 --- a/src/input/vcd/libcdio/cdio/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/input/vcd/libcdio/cdio/.hgignore b/src/input/vcd/libcdio/cdio/.hgignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/src/input/vcd/libcdio/cdio/.hgignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/src/input/vcd/libcdio/image/.cvsignore b/src/input/vcd/libcdio/image/.cvsignore deleted file mode 100644 index 282522db0..000000000 --- a/src/input/vcd/libcdio/image/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/input/vcd/libcdio/image/.hgignore b/src/input/vcd/libcdio/image/.hgignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/src/input/vcd/libcdio/image/.hgignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/src/input/vcd/libvcd/.cvsignore b/src/input/vcd/libvcd/.cvsignore deleted file mode 100644 index 7d926a554..000000000 --- a/src/input/vcd/libvcd/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -.libs -.deps -*.lo -*.la diff --git a/src/input/vcd/libvcd/.hgignore b/src/input/vcd/libvcd/.hgignore new file mode 100644 index 000000000..7d926a554 --- /dev/null +++ b/src/input/vcd/libvcd/.hgignore @@ -0,0 +1,6 @@ +Makefile +Makefile.in +.libs +.deps +*.lo +*.la diff --git a/src/input/vcd/libvcd/libvcd/.cvsignore b/src/input/vcd/libvcd/libvcd/.cvsignore deleted file mode 100644 index 282522db0..000000000 --- a/src/input/vcd/libvcd/libvcd/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/input/vcd/libvcd/libvcd/.hgignore b/src/input/vcd/libvcd/libvcd/.hgignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/src/input/vcd/libvcd/libvcd/.hgignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in -- cgit v1.2.3