diff options
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/input_cdda.c | 12 | ||||
-rw-r--r-- | src/input/input_dvb.c | 4 | ||||
-rw-r--r-- | src/input/input_dvd.c | 13 | ||||
-rw-r--r-- | src/input/input_http.c | 14 | ||||
-rw-r--r-- | src/input/input_pvr.c | 6 | ||||
-rw-r--r-- | src/input/input_v4l.c | 28 | ||||
-rw-r--r-- | src/input/net_buf_ctrl.c | 16 | ||||
-rw-r--r-- | src/input/vcd/xineplug_inp_vcd.c | 6 |
8 files changed, 53 insertions, 46 deletions
diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index b98659819..d8d7d2439 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.37 2003/11/15 13:01:04 miguelfreitas Exp $ + * $Id: input_cdda.c,v 1.38 2003/11/16 23:33:44 f1rmb Exp $ */ #ifdef HAVE_CONFIG_H @@ -2406,7 +2406,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) { printf("Disc Title: %s\n", this->cddb.disc_title); #endif - xine_set_meta_info(this->stream, XINE_META_INFO_ALBUM, this->cddb.disc_title); + _x_meta_info_set(this->stream, XINE_META_INFO_ALBUM, this->cddb.disc_title); } if(this->cddb.track[this->track].title) { @@ -2414,7 +2414,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) { printf("Track %d Title: %s\n", this->track+1, this->cddb.track[this->track].title); #endif - xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, this->cddb.track[this->track].title); + _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, this->cddb.track[this->track].title); } if(this->cddb.disc_artist) { @@ -2422,7 +2422,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) { printf("Disc Artist: %s\n", this->cddb.disc_artist); #endif - xine_set_meta_info(this->stream, XINE_META_INFO_ARTIST, this->cddb.disc_artist); + _x_meta_info_set(this->stream, XINE_META_INFO_ARTIST, this->cddb.disc_artist); } if(this->cddb.disc_category) { @@ -2430,7 +2430,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) { printf("Disc Category: %s\n", this->cddb.disc_category); #endif - xine_set_meta_info(this->stream, XINE_META_INFO_GENRE, this->cddb.disc_category); + _x_meta_info_set(this->stream, XINE_META_INFO_GENRE, this->cddb.disc_category); } if(this->cddb.disc_year) { @@ -2438,7 +2438,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) { printf("Disc Year: %s\n", this->cddb.disc_year); #endif - xine_set_meta_info(this->stream, XINE_META_INFO_YEAR, this->cddb.disc_year); + _x_meta_info_set(this->stream, XINE_META_INFO_YEAR, this->cddb.disc_year); } free_cdrom_toc(toc); diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 551222b17..5aae8adc8 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -419,7 +419,7 @@ static void switch_channel (dvb_input_plugin_t *this) { this->channels[this->channel].name); ui_data.str_len = strlen (ui_data.str); - xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, ui_data.str); + _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, ui_data.str); event.type = XINE_EVENT_UI_SET_TITLE; event.stream = this->stream; @@ -955,7 +955,7 @@ static int dvb_plugin_open (input_plugin_t *this_gen) { snprintf (str, 256, "%04d - %s", this->channel, this->channels[this->channel].name); - xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, str); + _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, str); return 1; } diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 792575fd8..01f8ed89a 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.172 2003/11/15 13:01:07 miguelfreitas Exp $ + * $Id: input_dvd.c,v 1.173 2003/11/16 23:33:44 f1rmb Exp $ * */ @@ -861,7 +861,7 @@ static void xine_dvd_send_button_update(dvd_input_plugin_t *this, int mode) { int32_t button; int32_t show; - if (!this || !this->stream || xine_get_stream_info(this->stream,XINE_STREAM_INFO_IGNORE_SPU)) + if (!this || !this->stream || _x_stream_info_get(this->stream,XINE_STREAM_INFO_IGNORE_SPU)) return; if (!this->stream->spu_decoder_plugin || @@ -1527,7 +1527,7 @@ static input_plugin_t *dvd_class_get_instance (input_class_t *class_gen, xine_st this->input_plugin.input_class = class_gen; this->stream = stream; - xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HAS_STILL, 1); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HAS_STILL, 1); this->dvdnav = NULL; this->opened = 0; @@ -1727,6 +1727,13 @@ static void *init_class (xine_t *xine, void *data) { /* * $Log: input_dvd.c,v $ + * Revision 1.173 2003/11/16 23:33:44 f1rmb + * New stream/meta info (safe) stuff. + * BIG NOTE: use helpers to access to these informations (get/set/reset): + * _x_{stream,meta}_info_{get,set,reset}() + * are for internal use, don't use *_public() ones from inside the beast ;-) + * Some wrongly names "xine_" fonction renaming. + * * Revision 1.172 2003/11/15 13:01:07 miguelfreitas * more helper functions cleanup (stream info, meta info) * diff --git a/src/input/input_http.c b/src/input/input_http.c index d0a52310a..176cee289 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.73 2003/11/16 15:32:10 mroi Exp $ + * $Id: input_http.c,v 1.74 2003/11/16 23:33:44 f1rmb Exp $ */ #ifdef HAVE_CONFIG_H @@ -358,10 +358,10 @@ static void http_plugin_read_metainf (input_plugin_t *this_gen) { free(this->shoutcast_songtitle); this->shoutcast_songtitle = strdup(songtitle); - xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, songtitle); + _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, songtitle); /* prepares the event */ - radio = xine_get_meta_info(this->stream, XINE_META_INFO_ALBUM); + radio = _x_meta_info_get(this->stream, XINE_META_INFO_ALBUM); if (radio) { strcpy(data.str, radio); /* WARNING: the data.str is char[256] */ @@ -496,20 +496,20 @@ static int read_shoutcast_header(http_input_plugin_t *this) { lprintf ("input_http: shoutcast answer: >%s<\n", this->buf); if (!strncasecmp(this->buf, "icy-name:", 9)) { - xine_set_meta_info(this->stream, XINE_META_INFO_ALBUM, + _x_meta_info_set(this->stream, XINE_META_INFO_ALBUM, (this->buf + 9 + (*(this->buf + 9) == ' '))); - xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, + _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, (this->buf + 9 + (*(this->buf + 9) == ' '))); } if (!strncasecmp(this->buf, "icy-genre:", 10)) { - xine_set_meta_info(this->stream, XINE_META_INFO_GENRE, + _x_meta_info_set(this->stream, XINE_META_INFO_GENRE, (this->buf + 10 + (*(this->buf + 10) == ' '))); } /* icy-notice1 is always the same */ if (!strncasecmp(this->buf, "icy-notice2:", 12)) { - xine_set_meta_info(this->stream, XINE_META_INFO_COMMENT, + _x_meta_info_set(this->stream, XINE_META_INFO_COMMENT, (this->buf + 12 + (*(this->buf + 12) == ' '))); } diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c index 076c5cc60..b54e696ba 100644 --- a/src/input/input_pvr.c +++ b/src/input/input_pvr.c @@ -38,7 +38,7 @@ * usage: * xine pvr:/<prefix_to_tmp_files>\!<prefix_to_saved_files>\!<max_page_age> * - * $Id: input_pvr.c,v 1.35 2003/11/15 13:01:09 miguelfreitas Exp $ + * $Id: input_pvr.c,v 1.36 2003/11/16 23:33:44 f1rmb Exp $ */ /************************************************************************** @@ -1235,14 +1235,14 @@ static buf_element_t *pvr_plugin_read_block (input_plugin_t *this_gen, fifo_buff if( this->pvr_play_paused ) speed = XINE_SPEED_PAUSE; - if( this->pvr_playing && xine_get_stream_info(this->stream, XINE_STREAM_INFO_IGNORE_VIDEO) ) { + if( this->pvr_playing && _x_stream_info_get(this->stream, XINE_STREAM_INFO_IGNORE_VIDEO) ) { /* video decoding has being disabled. avoid tweaking the clock */ this->pvr_playing = 0; this->scr_tunning = 0; pvrscr_speed_tunning(this->scr, 1.0 ); this->want_data = 0; pthread_cond_signal (&this->wake_pvr); - } else if ( !this->pvr_playing && !xine_get_stream_info(this->stream,XINE_STREAM_INFO_IGNORE_VIDEO) ) { + } else if ( !this->pvr_playing && !_x_stream_info_get(this->stream,XINE_STREAM_INFO_IGNORE_VIDEO) ) { this->pvr_playing = 1; this->play_blk = this->rec_blk; } diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c index 783c6a52b..e6a17f3dc 100644 --- a/src/input/input_v4l.c +++ b/src/input/input_v4l.c @@ -748,11 +748,11 @@ static int open_radio_capture_device(v4l_input_plugin_t *this) if (set_input_source(this, this->tuner_name) > 0) tuner_found = 1; - xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, periods); - xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS, bits); - xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, rate); - xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1); - xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, periods); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, bits); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, rate); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0); /* * Pre allocate some frames for audio and video. This way this hasn't to be @@ -861,13 +861,13 @@ static int open_video_capture_device(v4l_input_plugin_t *this) return 0; } - xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, resolutions[j].width); - xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, resolutions[j].height); - xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, periods); - xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS, bits); - xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, rate); - xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1); - xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, resolutions[j].width); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, resolutions[j].height); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, periods); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, bits); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, rate); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1); /* * Pre allocate some frames for audio and video. This way this hasn't to be @@ -1013,8 +1013,8 @@ static int open_video_capture_device(v4l_input_plugin_t *this) } /* Save dimensions */ - xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, resolutions[j].width); - xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, resolutions[j].height); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, resolutions[j].width); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, resolutions[j].height); /* Using deinterlaceing is highly recommended. Setting to true */ this->old_interlace = diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c index 967468fd3..b34c3d164 100644 --- a/src/input/net_buf_ctrl.c +++ b/src/input/net_buf_ctrl.c @@ -154,10 +154,10 @@ static void nbc_compute_fifo_length(nbc_t *this, int64_t video_br, audio_br; int has_video, has_audio; - has_video = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO); - has_audio = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO); - video_br = xine_get_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE); - audio_br = xine_get_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE); + has_video = _x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_VIDEO); + has_audio = _x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_AUDIO); + video_br = _x_stream_info_get(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE); + audio_br = _x_stream_info_get(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE); fifo_free = fifo->buffer_pool_num_free; fifo_fill = fifo->fifo_size; @@ -277,8 +277,8 @@ static void nbc_put_cb (fifo_buffer_t *fifo, if (this->buffering) { - has_video = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO); - has_audio = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO); + has_video = _x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_VIDEO); + has_audio = _x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_AUDIO); /* restart playing if high_water_mark is reached by all fifos * do not restart if has_video and has_audio are false to avoid * a yoyo effect at the beginning of the stream when these values @@ -399,8 +399,8 @@ static void nbc_get_cb (fifo_buffer_t *fifo, if (!this->buffering) { /* start buffering if one fifo is empty */ - int has_video = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO); - int has_audio = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO); + int has_video = _x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_VIDEO); + int has_audio = _x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_AUDIO); if (fifo->fifo_size == 0 && (((fifo == this->video_fifo) && has_video) || ((fifo == this->audio_fifo) && has_audio))) { diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c index cba0bf170..4bc714ae3 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.8 2003/11/15 13:01:10 miguelfreitas Exp $ + $Id: xineplug_inp_vcd.c,v 1.9 2003/11/16 23:33:44 f1rmb Exp $ Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com> @@ -181,12 +181,12 @@ meta_info_assign(int field, xine_stream_t *stream, const char * info) { if (NULL != info) { dbg_print(INPUT_DBG_META, "meta[%d]: %s\n", field, info); - xine_set_meta_info(stream, field, info); + _x_meta_info_set(stream, field, info); } } #define stream_info_assign(field, stream, info) \ - xine_set_stream_info(stream, field, info); + _x_stream_info_set(stream, field, info); /* Set stream information. */ static void |