"que" sounds like a slang word to me. This commit renames a few variables, fix the comments and the logging messages (sometimes along with small other typo fixes).tags/n1.1
@@ -157,7 +157,7 @@ typedef struct VideoState { | |||||
int force_refresh; | int force_refresh; | ||||
int paused; | int paused; | ||||
int last_paused; | int last_paused; | ||||
int que_attachments_req; | |||||
int queue_attachments_req; | |||||
int seek_req; | int seek_req; | ||||
int seek_flags; | int seek_flags; | ||||
int64_t seek_pos; | int64_t seek_pos; | ||||
@@ -1310,7 +1310,7 @@ retry: | |||||
is->frame_last_dropped_pts = AV_NOPTS_VALUE; | is->frame_last_dropped_pts = AV_NOPTS_VALUE; | ||||
} | } | ||||
SDL_UnlockMutex(is->pictq_mutex); | SDL_UnlockMutex(is->pictq_mutex); | ||||
// nothing to do, no picture to display in the que | |||||
// nothing to do, no picture to display in the queue | |||||
} else { | } else { | ||||
double last_duration, duration, delay; | double last_duration, duration, delay; | ||||
/* dequeue the picture */ | /* dequeue the picture */ | ||||
@@ -1643,7 +1643,7 @@ static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacke | |||||
avcodec_flush_buffers(is->video_st->codec); | avcodec_flush_buffers(is->video_st->codec); | ||||
SDL_LockMutex(is->pictq_mutex); | SDL_LockMutex(is->pictq_mutex); | ||||
// Make sure there are no long delay timers (ideally we should just flush the que but thats harder) | |||||
// Make sure there are no long delay timers (ideally we should just flush the queue but that's harder) | |||||
for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) { | for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) { | ||||
is->pictq[i].skip = 1; | is->pictq[i].skip = 1; | ||||
} | } | ||||
@@ -2707,9 +2707,9 @@ static int read_thread(void *arg) | |||||
is->seek_req = 0; | is->seek_req = 0; | ||||
eof = 0; | eof = 0; | ||||
} | } | ||||
if (is->que_attachments_req) { | |||||
if (is->queue_attachments_req) { | |||||
avformat_queue_attached_pictures(ic); | avformat_queue_attached_pictures(ic); | ||||
is->que_attachments_req = 0; | |||||
is->queue_attachments_req = 0; | |||||
} | } | ||||
/* if the queue are full, no need to read more */ | /* if the queue are full, no need to read more */ | ||||
@@ -2901,7 +2901,7 @@ static void stream_cycle_channel(VideoState *is, int codec_type) | |||||
stream_component_close(is, old_index); | stream_component_close(is, old_index); | ||||
stream_component_open(is, stream_index); | stream_component_open(is, stream_index); | ||||
if (codec_type == AVMEDIA_TYPE_VIDEO) | if (codec_type == AVMEDIA_TYPE_VIDEO) | ||||
is->que_attachments_req = 1; | |||||
is->queue_attachments_req = 1; | |||||
} | } | ||||
@@ -35,7 +35,7 @@ void ff_af_queue_init(AVCodecContext *avctx, AudioFrameQueue *afq) | |||||
void ff_af_queue_close(AudioFrameQueue *afq) | void ff_af_queue_close(AudioFrameQueue *afq) | ||||
{ | { | ||||
if(afq->frame_count) | if(afq->frame_count) | ||||
av_log(afq->avctx, AV_LOG_WARNING, "%d frames left in que on closing\n", afq->frame_count); | |||||
av_log(afq->avctx, AV_LOG_WARNING, "%d frames left in the queue on closing\n", afq->frame_count); | |||||
av_freep(&afq->frames); | av_freep(&afq->frames); | ||||
memset(afq, 0, sizeof(*afq)); | memset(afq, 0, sizeof(*afq)); | ||||
} | } | ||||
@@ -83,7 +83,7 @@ void ff_af_queue_remove(AudioFrameQueue *afq, int nb_samples, int64_t *pts, | |||||
out_pts = afq->frames->pts; | out_pts = afq->frames->pts; | ||||
} | } | ||||
if(!afq->frame_count) | if(!afq->frame_count) | ||||
av_log(afq->avctx, AV_LOG_WARNING, "Trying to remove %d samples, but que empty\n", nb_samples); | |||||
av_log(afq->avctx, AV_LOG_WARNING, "Trying to remove %d samples, but the queue is empty\n", nb_samples); | |||||
if (pts) | if (pts) | ||||
*pts = ff_samples_to_time_base(afq->avctx, out_pts); | *pts = ff_samples_to_time_base(afq->avctx, out_pts); | ||||
@@ -105,7 +105,7 @@ void ff_af_queue_remove(AudioFrameQueue *afq, int nb_samples, int64_t *pts, | |||||
av_assert0(afq->remaining_samples == afq->remaining_delay); | av_assert0(afq->remaining_samples == afq->remaining_delay); | ||||
if(afq->frames && afq->frames[0].pts != AV_NOPTS_VALUE) | if(afq->frames && afq->frames[0].pts != AV_NOPTS_VALUE) | ||||
afq->frames[0].pts += nb_samples; | afq->frames[0].pts += nb_samples; | ||||
av_log(afq->avctx, AV_LOG_DEBUG, "Trying to remove %d more samples than are in the que\n", nb_samples); | |||||
av_log(afq->avctx, AV_LOG_DEBUG, "Trying to remove %d more samples than there are in the queue\n", nb_samples); | |||||
} | } | ||||
if (duration) | if (duration) | ||||
*duration = ff_samples_to_time_base(afq->avctx, removed_samples); | *duration = ff_samples_to_time_base(afq->avctx, removed_samples); | ||||
@@ -1001,16 +1001,16 @@ int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const | |||||
for (i = 0; i < graph->filter_count; i++) { | for (i = 0; i < graph->filter_count; i++) { | ||||
AVFilterContext *filter = graph->filters[i]; | AVFilterContext *filter = graph->filters[i]; | ||||
if(filter && (!strcmp(target, "all") || !strcmp(target, filter->name) || !strcmp(target, filter->filter->name))){ | if(filter && (!strcmp(target, "all") || !strcmp(target, filter->name) || !strcmp(target, filter->filter->name))){ | ||||
AVFilterCommand **que = &filter->command_queue, *next; | |||||
while(*que && (*que)->time <= ts) | |||||
que = &(*que)->next; | |||||
next= *que; | |||||
*que= av_mallocz(sizeof(AVFilterCommand)); | |||||
(*que)->command = av_strdup(command); | |||||
(*que)->arg = av_strdup(arg); | |||||
(*que)->time = ts; | |||||
(*que)->flags = flags; | |||||
(*que)->next = next; | |||||
AVFilterCommand **queue = &filter->command_queue, *next; | |||||
while (*queue && (*queue)->time <= ts) | |||||
queue = &(*queue)->next; | |||||
next = *queue; | |||||
*queue = av_mallocz(sizeof(AVFilterCommand)); | |||||
(*queue)->command = av_strdup(command); | |||||
(*queue)->arg = av_strdup(arg); | |||||
(*queue)->time = ts; | |||||
(*queue)->flags = flags; | |||||
(*queue)->next = next; | |||||
if(flags & AVFILTER_CMD_FLAG_ONE) | if(flags & AVFILTER_CMD_FLAG_ONE) | ||||
return 0; | return 0; | ||||
} | } | ||||
@@ -1056,11 +1056,11 @@ static void update_initial_durations(AVFormatContext *s, AVStream *st, | |||||
} | } | ||||
} | } | ||||
if(pktl && pktl->pkt.dts != st->first_dts) { | if(pktl && pktl->pkt.dts != st->first_dts) { | ||||
av_log(s, AV_LOG_DEBUG, "first_dts %s not matching first dts %s in que\n", av_ts2str(st->first_dts), av_ts2str(pktl->pkt.dts)); | |||||
av_log(s, AV_LOG_DEBUG, "first_dts %s not matching first dts %s in the queue\n", av_ts2str(st->first_dts), av_ts2str(pktl->pkt.dts)); | |||||
return; | return; | ||||
} | } | ||||
if(!pktl) { | if(!pktl) { | ||||
av_log(s, AV_LOG_DEBUG, "first_dts %s but no packet with dts in ques\n", av_ts2str(st->first_dts)); | |||||
av_log(s, AV_LOG_DEBUG, "first_dts %s but no packet with dts in the queue\n", av_ts2str(st->first_dts)); | |||||
return; | return; | ||||
} | } | ||||
pktl= s->parse_queue ? s->parse_queue : s->packet_buffer; | pktl= s->parse_queue ? s->parse_queue : s->packet_buffer; | ||||