+2004-08-31 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
+ * ext/alsa/gstalsamixer.c: (gst_alsa_mixer_build_list):
+ * ext/alsa/gstalsamixertrack.c: (gst_alsa_mixer_track_new):
+ Re-commit ALSA switches.
+ * gst/adder/gstadder.c: (gst_adder_loop):
+ 64-bit fix (#151416).
+ * gst/debug/progressreport.c: (gst_progressreport_report):
+ 64-bit fix (#151419).
+ * gst/matroska/matroska-demux.c:
+ (gst_matroska_demux_parse_contents):
+ 64-bit fix (#151420).
+ * gst/playback/test3.c: (update_scale):
+ 64-bit fix (#151421).
+
2004-08-31 Thomas Vander Stichele <thomas at apestaart dot org>
* configure.ac:
for (i = 0; i < count; i++) {
gint channels = 0;
gint flags = GST_MIXER_TRACK_OUTPUT;
+ gboolean got_it = FALSE;
if (snd_mixer_selem_has_capture_switch (element)) {
if (dir != GST_PAD_SRC && dir != GST_PAD_UNKNOWN)
if (snd_mixer_selem_has_capture_volume (element)) {
while (snd_mixer_selem_has_capture_channel (element, channels))
channels++;
- if (first) {
- first = FALSE;
- flags |= GST_MIXER_TRACK_MASTER;
- }
track = gst_alsa_mixer_track_new (element, i, channels,
flags, GST_ALSA_MIXER_TRACK_CAPTURE);
mixer->tracklist = g_list_append (mixer->tracklist, track);
+ got_it = TRUE;
}
if (snd_mixer_selem_has_playback_volume (element)) {
track = gst_alsa_mixer_track_new (element, i, channels,
flags, GST_ALSA_MIXER_TRACK_PLAYBACK);
mixer->tracklist = g_list_append (mixer->tracklist, track);
+ got_it = TRUE;
}
if (snd_mixer_selem_is_enumerated (element)) {
opts = gst_alsa_mixer_options_new (element, i);
mixer->tracklist = g_list_append (mixer->tracklist, opts);
+ got_it = TRUE;
+ }
+
+ if (!got_it) {
+ if (flags == GST_MIXER_TRACK_OUTPUT &&
+ snd_mixer_selem_has_playback_switch (element)) {
+ /* simple mute switch */
+ track = gst_alsa_mixer_track_new (element, i, 0,
+ flags, GST_ALSA_MIXER_TRACK_PLAYBACK);
+ mixer->tracklist = g_list_append (mixer->tracklist, track);
+ }
}
element = snd_mixer_elem_next (element);
alsa_track->track_num = track_num;
/* set volume information */
- if (alsa_flags & GST_ALSA_MIXER_TRACK_PLAYBACK) {
- snd_mixer_selem_get_playback_volume_range (element, &min, &max);
- } else if (alsa_flags & GST_ALSA_MIXER_TRACK_CAPTURE) {
- snd_mixer_selem_get_capture_volume_range (element, &min, &max);
+ if (channels) {
+ if (alsa_flags & GST_ALSA_MIXER_TRACK_PLAYBACK) {
+ snd_mixer_selem_get_playback_volume_range (element, &min, &max);
+ } else if (alsa_flags & GST_ALSA_MIXER_TRACK_CAPTURE) {
+ snd_mixer_selem_get_capture_volume_range (element, &min, &max);
+ }
}
track->min_volume = (gint) min;
track->max_volume = (gint) max;
gint32 *out = (gint32 *) GST_BUFFER_DATA (buf_out);
for (i = 0; i < GST_BUFFER_SIZE (buf_out) / 4; i++)
- out[i] = CLAMP (out[i] + in[i], MIN_INT_32, MAX_INT_32);
+ out[i] = CLAMP (((gint64) out[i]) + ((gint64) in[i]),
+ MIN_INT_32, MAX_INT_32);
} else if (adder->width == 16) {
gint16 *in = (gint16 *) raw_in;
gint16 *out = (gint16 *) GST_BUFFER_DATA (buf_out);
gst_element_query (element, GST_QUERY_TOTAL, &format, &duration);
gst_element_query (element, GST_QUERY_POSITION, &format, &position);
- g_print ("%lld %lld\n", duration, position);
+ g_print ("%" G_GINT64_FORMAT " %" G_GINT64_FORMAT "\n", duration, position);
return TRUE;
}