"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "axfer/container.c" between
alsa-utils-1.2.1.tar.bz2 and alsa-utils-1.2.2.tar.bz2

About: ALSA (Advanced Linux Sound Architecture) - Utilities.

container.c  (alsa-utils-1.2.1.tar.bz2):container.c  (alsa-utils-1.2.2.tar.bz2)
skipping to change at line 16 skipping to change at line 16
// //
// Licensed under the terms of the GNU General Public License, version 2. // Licensed under the terms of the GNU General Public License, version 2.
#include "container.h" #include "container.h"
#include "misc.h" #include "misc.h"
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <fcntl.h> #include <fcntl.h>
#include <inttypes.h>
static const char *const cntr_type_labels[] = { static const char *const cntr_type_labels[] = {
[CONTAINER_TYPE_PARSER] = "parser", [CONTAINER_TYPE_PARSER] = "parser",
[CONTAINER_TYPE_BUILDER] = "builder", [CONTAINER_TYPE_BUILDER] = "builder",
}; };
static const char *const cntr_format_labels[] = { static const char *const cntr_format_labels[] = {
[CONTAINER_FORMAT_RIFF_WAVE] = "riff/wave", [CONTAINER_FORMAT_RIFF_WAVE] = "riff/wave",
[CONTAINER_FORMAT_AU] = "au", [CONTAINER_FORMAT_AU] = "au",
[CONTAINER_FORMAT_VOC] = "voc", [CONTAINER_FORMAT_VOC] = "voc",
skipping to change at line 359 skipping to change at line 360
cntr_format_labels[cntr->format]); cntr_format_labels[cntr->format]);
fprintf(stderr, " sample format: %s\n", fprintf(stderr, " sample format: %s\n",
snd_pcm_format_name(*format)); snd_pcm_format_name(*format));
fprintf(stderr, " bytes/sample: %u\n", fprintf(stderr, " bytes/sample: %u\n",
cntr->bytes_per_sample); cntr->bytes_per_sample);
fprintf(stderr, " samples/frame: %u\n", fprintf(stderr, " samples/frame: %u\n",
cntr->samples_per_frame); cntr->samples_per_frame);
fprintf(stderr, " frames/second: %u\n", fprintf(stderr, " frames/second: %u\n",
cntr->frames_per_second); cntr->frames_per_second);
if (cntr->type == CONTAINER_TYPE_PARSER) { if (cntr->type == CONTAINER_TYPE_PARSER) {
fprintf(stderr, " frames: %lu\n", fprintf(stderr, " frames: %" PRIu64 "\n",
*frame_count); *frame_count);
} else { } else {
fprintf(stderr, " max frames: %lu\n", fprintf(stderr, " max frames: %" PRIu64 "\n",
*frame_count); *frame_count);
} }
} }
return 0; return 0;
} }
int container_context_process_frames(struct container_context *cntr, int container_context_process_frames(struct container_context *cntr,
void *frame_buffer, void *frame_buffer,
unsigned int *frame_count) unsigned int *frame_count)
skipping to change at line 430 skipping to change at line 431
int container_context_post_process(struct container_context *cntr, int container_context_post_process(struct container_context *cntr,
uint64_t *frame_count) uint64_t *frame_count)
{ {
int err = 0; int err = 0;
assert(cntr); assert(cntr);
assert(frame_count); assert(frame_count);
if (cntr->verbose && cntr->handled_byte_count > 0) { if (cntr->verbose && cntr->handled_byte_count > 0) {
fprintf(stderr, " Handled bytes: %lu\n", fprintf(stderr, " Handled bytes: %" PRIu64 "\n",
cntr->handled_byte_count); cntr->handled_byte_count);
} }
// NOTE* we cannot seek when using standard input/output. // NOTE* we cannot seek when using standard input/output.
if (!cntr->stdio && cntr->ops && cntr->ops->post_process) { if (!cntr->stdio && cntr->ops && cntr->ops->post_process) {
// Usually, need to write out processed bytes in container // Usually, need to write out processed bytes in container
// header even it this program is interrupted. // header even it this program is interrupted.
cntr->interrupted = false; cntr->interrupted = false;
err = cntr->ops->post_process(cntr, cntr->handled_byte_count); err = cntr->ops->post_process(cntr, cntr->handled_byte_count);
 End of changes. 4 change blocks. 
3 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)