From ba47a8161c17196ad8e27e96c396f2e0083edb07 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 29 Jul 2010 20:53:14 +0100 Subject: Spelling fixes. Source: informational messages generated by lintian. --- src/audio_out/audio_alsa_out.c | 2 +- src/demuxers/demux_asf.c | 4 ++-- src/demuxers/id3.c | 2 +- src/video_out/video_out_opengl.c | 2 +- src/video_out/video_out_syncfb.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 3d5393f63..af8b4c351 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -404,7 +404,7 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int err = snd_pcm_hw_params_set_access_mask(this->audio_fd, params, mask); if (err < 0) { xprintf (this->class->xine, XINE_VERBOSITY_DEBUG, - "audio_alsa_out: mmap not availiable, falling back to compatiblity mode\n"); + "audio_alsa_out: mmap not available, falling back to compatiblity mode\n"); this->mmap=0; err = snd_pcm_hw_params_set_access(this->audio_fd, params, SND_PCM_ACCESS_RW_INTERLEAVED); diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index e2da05c75..1250ba9a5 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -1965,7 +1965,7 @@ static int demux_asf_seek (demux_plugin_t *this_gen, start_pos -= this->packet_size; } if (state != 5) { - xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_asf: demux_asf_seek: begining of the stream\n"); + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_asf: demux_asf_seek: beginning of the stream\n"); this->input->seek (this->input, this->first_packet_pos, SEEK_SET); this->keyframe_found = 1; } else { @@ -2101,7 +2101,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, default: xprintf (stream->xine, XINE_VERBOSITY_DEBUG, - "demux_asf: warning, unkown method %d\n", stream->content_detection_method); + "demux_asf: warning, unknown method %d\n", stream->content_detection_method); return NULL; } diff --git a/src/demuxers/id3.c b/src/demuxers/id3.c index 755decaf4..f11e80e8d 100644 --- a/src/demuxers/id3.c +++ b/src/demuxers/id3.c @@ -60,7 +60,7 @@ static const char* const id3_genre[] = "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", - "Cabaret", "New Wave", "Psychadelic", "Rave", "Showtunes", + "Cabaret", "New Wave", "Psychedelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk", "Folk-Rock", "National Folk", "Swing", "Fast Fusion", diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index 648cd38c5..76040f623 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -955,7 +955,7 @@ static int render_setup_fp_yuv (opengl_driver_t *this) { glGetIntegerv (MYGL_PROGRAM_ERROR_POSITION_ARB, &errorpos); if (errorpos != -1) xprintf (this->xine, XINE_VERBOSITY_NONE, - "video_out_opengl: fragprog_yuv errorpos %d begining with '%.20s'. Ask a wizard.\n", + "video_out_opengl: fragprog_yuv errorpos %d beginning with '%.20s'. Ask a wizard.\n", errorpos, fragprog_yuv+errorpos); glEnable (MYGL_FRAGMENT_PROGRAM_ARB); diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index aaf7d43c7..b3385a943 100644 --- a/src/video_out/video_out_syncfb.c +++ b/src/video_out/video_out_syncfb.c @@ -996,7 +996,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi xprintf(this->xine, XINE_VERBOSITY_LOG, _("video_out_syncfb: info. (brightness/contrast control won\'t be available because " "your SyncFB kernel module seems to be outdated. Please refer to README." - "syncfb for informations on how to update it.)\n")); + "syncfb for information on how to update it.)\n")); } /* check for virtual screen size and screen depth - this is rather important -- cgit v1.2.3 From 8f646f0599963b54439616cc7bb6059bde455a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Merz?= Date: Wed, 18 Aug 2010 19:28:38 +0100 Subject: Pulseaudio volume control feedback If xine volume is changed from outside the xine frontend, e.g. gnome sound preferences. xine-lib generates a XINE_EVENT_AUDIO_LEVEL event that fontends (like xine-ui) can use to update the volume level. --- src/audio_out/audio_pulse_out.c | 110 +++++++++++++++++++++++++++++++--------- 1 file changed, 86 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/audio_out/audio_pulse_out.c b/src/audio_out/audio_pulse_out.c index d97b710a5..ccb780d0d 100644 --- a/src/audio_out/audio_pulse_out.c +++ b/src/audio_out/audio_pulse_out.c @@ -202,7 +202,8 @@ static void __xine_pa_context_success_callback(pa_context *c, int success, void * instance. * * This function saves the volume field of the passed structure to the - * @c cvolume variable of the output instance. + * @c cvolume variable of the output instance and send an update volume + * event to the frontend. */ static void __xine_pa_sink_info_callback(pa_context *c, const pa_sink_input_info *info, int is_last, void *userdata) { @@ -226,6 +227,63 @@ static void __xine_pa_sink_info_callback(pa_context *c, const pa_sink_input_info #else this->muted = pa_cvolume_is_muted (&this->cvolume); #endif + + /* send update volume event to frontend */ + + xine_event_t event; + xine_audio_level_data_t data; + xine_stream_t *stream; + xine_list_iterator_t ite; + + data.right = data.left = (int) (pa_sw_volume_to_linear(this->swvolume)*100); + + data.mute = this->muted; + + event.type = XINE_EVENT_AUDIO_LEVEL; + event.data = &data; + event.data_length = sizeof(data); + + pthread_mutex_lock(&this->xine->streams_lock); + for(ite = xine_list_front(this->xine->streams); ite; ite = + xine_list_next(this->xine->streams, ite)) { + stream = xine_list_get_value(this->xine->streams, ite); + event.stream = stream; + xine_event_send(stream, &event); + } + pthread_mutex_unlock(&this->xine->streams_lock); +} + +/** + * @brief Callback function called when the state of the daemon changes + * @param c Context in which the state of the daemon changes + * @param t Subscription event type + * @param idx Index of the sink + * @param this_gen pulse_driver_t pointer for the PulseAudio output + * instance. + */ +static void __xine_pa_context_subscribe_callback(pa_context *c, + pa_subscription_event_type_t t, uint32_t idx, void *this_gen) +{ + pulse_driver_t * this = (pulse_driver_t*) this_gen; + int index; + + index = pa_stream_get_index(this->stream); + + if (index != idx) + return; + + if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) != PA_SUBSCRIPTION_EVENT_CHANGE) + return; + + pa_operation *operation = pa_context_get_sink_input_info( + this->context, index, __xine_pa_sink_info_callback, this); + + if (operation == NULL) { + xprintf(this->xine, XINE_VERBOSITY_DEBUG, "audio_pulse_out: failed to get sink info: %s\n", pa_strerror(pa_context_errno (this->context))); + return; + } + + pa_operation_unref(operation); } static int connect_context(pulse_driver_t *this) { @@ -248,6 +306,10 @@ static int connect_context(pulse_driver_t *this) { _x_assert(this->context); pa_context_set_state_callback(this->context, __xine_pa_context_state_callback, this); + + /* set subscribe callback (for volume change information) */ + + pa_context_set_subscribe_callback(this->context, __xine_pa_context_subscribe_callback, this); } if (pa_context_get_state(this->context) == PA_CONTEXT_UNCONNECTED) { @@ -272,6 +334,17 @@ static int connect_context(pulse_driver_t *this) { pa_threaded_mainloop_wait(this->mainloop); } + /* subscribe to sink input events (for volume change information) */ + + pa_operation *operation = pa_context_subscribe(this->context, + PA_SUBSCRIPTION_MASK_SINK_INPUT, + __xine_pa_context_success_callback, this); + + if (operation == NULL) { + xprintf (this->xine, XINE_VERBOSITY_DEBUG, "audio_pulse_out: failed to enable event notification: %s\n", pa_strerror(pa_context_errno(this->context))); + return -1; + } + return 0; } @@ -433,34 +506,23 @@ static int ao_pulse_open(ao_driver_t *this_gen, entry = cfg->lookup_entry (cfg, "audio.volume.mixer_volume"); if (entry) { this->ao_driver.set_property(&this->ao_driver, AO_PROP_MIXER_VOL, entry->num_value); - - /* Notify frontend about the volume change */ - xine_event_t event; - xine_audio_level_data_t data; - xine_stream_t *stream; - xine_list_iterator_t ite; - - data.right = data.left = entry->num_value; - data.mute = 0; - - event.type = XINE_EVENT_AUDIO_LEVEL; - event.data = &data; - event.data_length = sizeof(data); - - pthread_mutex_lock(&this->xine->streams_lock); - for(ite = xine_list_front(this->xine->streams); ite; ite = - xine_list_next(this->xine->streams, ite)) { - stream = xine_list_get_value(this->xine->streams, ite); - event.stream = stream; - xine_event_send(stream, &event); - } - pthread_mutex_unlock(&this->xine->streams_lock); - } } + } + + /* get pa sink input information to trigger a update volume event in the frontend */ + + pa_operation *operation = pa_context_get_sink_input_info( + this->context, pa_stream_get_index(this->stream), + __xine_pa_sink_info_callback, this); + if (operation == NULL) { + xprintf(this->xine, XINE_VERBOSITY_DEBUG, "audio_pulse_out: failed to get sink info: %s\n", pa_strerror(pa_context_errno (this->context))); + goto fail; } + pa_operation_unref(operation); + return this->sample_rate; fail: -- cgit v1.2.3 From 7aa4e6782cd2e28c3d57d30959e408bdc5e75ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Merz?= Date: Sat, 21 Aug 2010 16:20:22 +0000 Subject: Pulseaudio volume control feedback (stream end) During channel changes, the audio stream ends and a new stream begins. This in turn can lead to 'pa_stream_get_index' ending up in an assertion. Because of that, a check if there is a stream is a good idea. --- src/audio_out/audio_pulse_out.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/audio_out/audio_pulse_out.c b/src/audio_out/audio_pulse_out.c index ccb780d0d..ae74a57bc 100644 --- a/src/audio_out/audio_pulse_out.c +++ b/src/audio_out/audio_pulse_out.c @@ -267,6 +267,9 @@ static void __xine_pa_context_subscribe_callback(pa_context *c, pulse_driver_t * this = (pulse_driver_t*) this_gen; int index; + if (this->stream == NULL) + return; + index = pa_stream_get_index(this->stream); if (index != idx) -- cgit v1.2.3 From 714cab339b43166682cc2bc297f9ba2b3c9f9edd Mon Sep 17 00:00:00 2001 From: Geoff Leach Date: Mon, 16 Aug 2010 12:02:55 +0000 Subject: Fix building with recent videoproto --- src/video_out/xxmc.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/video_out/xxmc.h b/src/video_out/xxmc.h index 6110978d1..bc9ceb3ef 100644 --- a/src/video_out/xxmc.h +++ b/src/video_out/xxmc.h @@ -77,11 +77,9 @@ #include #include #include +#include #ifdef HAVE_VLDXVMC #include -#else - #include - #include #endif #define LOG_MODULE "video_out_xxmc" -- cgit v1.2.3 From 34c3a6dfb8448135c0aa8c9d8805cbff06b9e688 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Thu, 16 Sep 2010 01:56:30 +0000 Subject: Add f4v/f4a file extensions to the Qt demuxer's MIME table --- src/demuxers/demux_qt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index bea9c3118..34681829e 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -3263,8 +3263,8 @@ static const char *get_mimetypes (demux_class_t *this_gen) { "video/x-quicktime: mov,qt: Quicktime animation;" "audio/x-m4a: m4a,m4b: MPEG-4 audio;" "application/x-quicktimeplayer: qtl: Quicktime list;" - "video/mp4: mp4,mpg4: MPEG-4 video;" - "audio/mp4: mp4,mpg4: MPEG-4 audio;"; + "video/mp4: f4v,mp4,mpg4: MPEG-4 video;" + "audio/mp4: f4a,mp4,mpg4: MPEG-4 audio;"; } static void class_dispose (demux_class_t *this_gen) { -- cgit v1.2.3 From 4100ae40f29ee52181e927a8976b04614f6e1620 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 20 Sep 2010 19:37:38 +0100 Subject: Update Qt demuxer's extensions list. --- src/demuxers/demux_qt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 34681829e..463e82970 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -3255,7 +3255,7 @@ static const char *get_identifier (demux_class_t *this_gen) { } static const char *get_extensions (demux_class_t *this_gen) { - return "mov qt qtl mp4 m4a m4b"; + return "mov qt qtl mp4 m4a m4b f4a f4v"; } static const char *get_mimetypes (demux_class_t *this_gen) { -- cgit v1.2.3