From 9149ec5d89d5ee2f89027691ce0f627fe91fa287 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 7 May 2011 21:28:56 +0000 Subject: cache2.c: Avoid warnings about discarding volatile In practice this should not really make a difference, but the code is not significantly worse and it is more correct. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33435 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33447 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/cache2.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'stream') diff --git a/stream/cache2.c b/stream/cache2.c index e930d72255..ee1cf47245 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -254,6 +254,8 @@ static int cache_fill(cache_vars_t *s) } static int cache_execute_control(cache_vars_t *s) { + double double_res; + unsigned uint_res; static unsigned last; int quit = s->control == -2; if (quit || !s->stream->control) { @@ -273,18 +275,22 @@ static int cache_execute_control(cache_vars_t *s) { } if (s->control == -1) return 1; switch (s->control) { - case STREAM_CTRL_GET_CURRENT_TIME: case STREAM_CTRL_SEEK_TO_TIME: + double_res = s->control_double_arg; + case STREAM_CTRL_GET_CURRENT_TIME: case STREAM_CTRL_GET_ASPECT_RATIO: - s->control_res = s->stream->control(s->stream, s->control, &s->control_double_arg); + s->control_res = s->stream->control(s->stream, s->control, &double_res); + s->control_double_arg = double_res; break; case STREAM_CTRL_SEEK_TO_CHAPTER: + case STREAM_CTRL_SET_ANGLE: + uint_res = s->control_uint_arg; case STREAM_CTRL_GET_NUM_CHAPTERS: case STREAM_CTRL_GET_CURRENT_CHAPTER: case STREAM_CTRL_GET_NUM_ANGLES: case STREAM_CTRL_GET_ANGLE: - case STREAM_CTRL_SET_ANGLE: - s->control_res = s->stream->control(s->stream, s->control, &s->control_uint_arg); + s->control_res = s->stream->control(s->stream, s->control, &uint_res); + s->control_uint_arg = uint_res; break; default: s->control_res = STREAM_UNSUPPORTED; -- cgit v1.2.3 From 8278977c0de65322a6c59c13a1f50f61ddd43e2c Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 7 May 2011 21:32:50 +0000 Subject: cleanup: Make vcd_seek_to_track() static in more files git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33436 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/vcd_read_darwin.h | 2 +- stream/vcd_read_fbsd.h | 2 +- stream/vcd_read_os2.h | 2 +- stream/vcd_read_win32.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'stream') diff --git a/stream/vcd_read_darwin.h b/stream/vcd_read_darwin.h index 927b659871..71fc093984 100644 --- a/stream/vcd_read_darwin.h +++ b/stream/vcd_read_darwin.h @@ -67,7 +67,7 @@ static inline unsigned int vcd_get_msf(mp_vcd_priv_t* vcd) return CDConvertMSFToLBA(vcd->msf); } -int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track) +static int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track) { struct CDTrackInfo entry; diff --git a/stream/vcd_read_fbsd.h b/stream/vcd_read_fbsd.h index 6e50ac9ac9..8a59a2a8ee 100644 --- a/stream/vcd_read_fbsd.h +++ b/stream/vcd_read_fbsd.h @@ -136,7 +136,7 @@ read_toc_entry(mp_vcd_priv_t *vcd, int nr) return 1; } -int +static int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track) { if (!read_toc_entry(vcd, track)) diff --git a/stream/vcd_read_os2.h b/stream/vcd_read_os2.h index 0585d1d7d0..1df2abec89 100644 --- a/stream/vcd_read_os2.h +++ b/stream/vcd_read_os2.h @@ -57,7 +57,7 @@ static inline unsigned vcd_get_msf(mp_vcd_priv_t *vcd) (vcd->msfCurrent.bSecond + vcd->msfCurrent.bMinute * 60) * 75 - 150; } -int vcd_seek_to_track(mp_vcd_priv_t *vcd, int track) +static int vcd_seek_to_track(mp_vcd_priv_t *vcd, int track) { struct { UCHAR auchSign[4]; diff --git a/stream/vcd_read_win32.h b/stream/vcd_read_win32.h index f4ac384d1d..2e13232606 100644 --- a/stream/vcd_read_win32.h +++ b/stream/vcd_read_win32.h @@ -53,7 +53,7 @@ static inline unsigned vcd_get_msf(mp_vcd_priv_t* vcd, int track){ vcd->toc.TrackData[index].Address[1] * 60) * 75 - 150; } -int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track) +static int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track) { unsigned sect; if (track < vcd->toc.FirstTrack || track > vcd->toc.LastTrack) -- cgit v1.2.3 From f293935d39cc3bf5141e3b12c980e6918e78886a Mon Sep 17 00:00:00 2001 From: vayne Date: Mon, 9 May 2011 17:36:38 +0000 Subject: Windows: stream_cddb.c: include for MinGW git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33449 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_cddb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'stream') diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c index 5a4b3c1cee..afc512e5b7 100644 --- a/stream/stream_cddb.c +++ b/stream/stream_cddb.c @@ -38,6 +38,7 @@ #include #if defined(__MINGW32__) || defined(__CYGWIN__) #ifdef __MINGW32__ +#include #define mkdir(a,b) mkdir(a) #endif #include -- cgit v1.2.3 From 96c992de47abffd66dda6e94e4093552f7528472 Mon Sep 17 00:00:00 2001 From: ib Date: Wed, 11 May 2011 11:35:38 +0000 Subject: stream.c: make some stream messages translatable git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33454 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'stream') diff --git a/stream/stream.c b/stream/stream.c index fde102759c..4b55072561 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -167,7 +167,7 @@ static stream_t *open_stream_plugin(const stream_info_t *sinfo, m_option_t url_opt = { "stream url", arg , CONF_TYPE_CUSTOM_URL, 0, 0 ,0, (void *)sinfo->opts }; if(m_option_parse(&url_opt,"stream url",filename,arg,M_CONFIG_FILE) < 0) { - mp_msg(MSGT_OPEN,MSGL_ERR, "URL parsing failed on url %s\n",filename); + mp_tmsg(MSGT_OPEN,MSGL_ERR, "URL parsing failed on url %s\n",filename); m_struct_free(desc,arg); return NULL; } @@ -251,7 +251,7 @@ stream_t *open_stream_full(const char *filename, int mode, } } - mp_msg(MSGT_OPEN,MSGL_ERR, "No stream found to handle url %s\n",filename); + mp_tmsg(MSGT_OPEN,MSGL_ERR, "No stream found to handle url %s\n", filename); return NULL; } @@ -365,7 +365,7 @@ if(newpos==0 || newpos!=s->pos){ #ifdef CONFIG_NETWORKING if(s->seek) { // new stream seek is much cleaner than streaming_ctrl one if(!s->seek(s,newpos)) { - mp_msg(MSGT_STREAM,MSGL_ERR, "Seek failed\n"); + mp_tmsg(MSGT_STREAM,MSGL_ERR, "Seek failed\n"); return 0; } break; @@ -373,14 +373,15 @@ if(newpos==0 || newpos!=s->pos){ if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_seek ) { if( s->streaming_ctrl->streaming_seek( s->fd, newpos, s->streaming_ctrl )<0 ) { - mp_msg(MSGT_STREAM,MSGL_INFO,"Stream not seekable!\n"); + mp_tmsg(MSGT_STREAM,MSGL_INFO,"Stream not seekable!\n"); return 1; } break; } #endif if(newpospos){ - mp_msg(MSGT_STREAM,MSGL_INFO,"Cannot seek backward in linear streams!\n"); + mp_tmsg(MSGT_STREAM, MSGL_INFO, + "Cannot seek backward in linear streams!\n"); return 1; } break; @@ -390,7 +391,7 @@ if(newpos==0 || newpos!=s->pos){ return 0; // Now seek if(!s->seek(s,newpos)) { - mp_msg(MSGT_STREAM,MSGL_ERR, "Seek failed\n"); + mp_tmsg(MSGT_STREAM,MSGL_ERR, "Seek failed\n"); return 0; } } -- cgit v1.2.3