History

audio_frame_queue: Clean up ff_af_queue_log_state debug function

The function is debug-only, so only compile it in debug mode. Make it static as it has no uses outside of the file. Change av_log() to av_dlog().

Diego Biurrun committed 14 years ago

Commit d7f97861 parent 1ce5dce2 files · +10 −17Browse files

Showing the changes to libavcodec/audio_frame_queue.c (1 of 2 files). Show all

Unified · Split

libavcodec/audio_frame_queue.c+10−10
@@ -87,7 +87,7 @@ int ff_af_queue_add(AudioFrameQueue *afq, const AVFrame *f) · 86 unmodified lines
87 afq->remaining_samples += f->nb_samples;87 afq->remaining_samples += f->nb_samples;
88 88
89#ifdef DEBUG89#ifdef DEBUG
90 ff_af_queue_log_state(afq);90 af_queue_log_state(afq);
91#endif91#endif
92 92
93 return 0;93 return 0;
@@ -100,7 +100,7 @@ void ff_af_queue_remove(AudioFrameQueue *afq, int nb_samples, int64_t *pts, · 6 unmodified lines
100 int removed_samples = 0;100 int removed_samples = 0;
101 101
102#ifdef DEBUG102#ifdef DEBUG
103 ff_af_queue_log_state(afq);103 af_queue_log_state(afq);
104#endif104#endif
105 105
106 /* get output pts from the next frame or generated pts */106 /* get output pts from the next frame or generated pts */
@@ -146,18 +146,18 @@ void ff_af_queue_remove(AudioFrameQueue *afq, int nb_samples, int64_t *pts, · 39 unmodified lines
146 *duration = ff_samples_to_time_base(afq->avctx, removed_samples);146 *duration = ff_samples_to_time_base(afq->avctx, removed_samples);
147}147}
148 148
149void ff_af_queue_log_state(AudioFrameQueue *afq)149#ifdef DEBUG
150static void af_queue_log_state(AudioFrameQueue *afq)
150{151{
151 AudioFrame *f;152 AudioFrame *f;
152 av_log(afq->avctx, AV_LOG_DEBUG, "remaining delay = %d\n",153 av_dlog(afq->avctx, "remaining delay = %d\n", afq->remaining_delay);
153 afq->remaining_delay);154 av_dlog(afq->avctx, "remaining samples = %d\n", afq->remaining_samples);
154 av_log(afq->avctx, AV_LOG_DEBUG, "remaining samples = %d\n",155 av_dlog(afq->avctx, "frames:\n");
155 afq->remaining_samples);
156 av_log(afq->avctx, AV_LOG_DEBUG, "frames:\n");
157 f = afq->frame_queue;156 f = afq->frame_queue;
158 while (f) {157 while (f) {
159 av_log(afq->avctx, AV_LOG_DEBUG, " [ pts=%9"PRId64" duration=%d ]\n",158 av_dlog(afq->avctx, " [ pts=%9"PRId64" duration=%d ]\n",
160 f->pts, f->duration);159 f->pts, f->duration);
161 f = f->next;160 f = f->next;
162 }161 }
163}162}
163#endif /* DEBUG */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t