@@ -75,7 +75,7 @@ struct av_frame {
7575struct ug_input_state {
7676 uint32_t magic ;
7777 pthread_mutex_t lock ;
78- struct simple_linked_list * list ;
78+ struct simple_linked_list * frame_queue ;
7979 struct display * display ;
8080
8181 struct video_rxtx * video_rxtx ;
@@ -91,11 +91,11 @@ ug_input_frame_arrived(void *state, struct video_frame *v,
9191 struct ug_input_state * s = state ;
9292 assert (s -> magic == MAGIC );
9393 pthread_mutex_lock (& s -> lock );
94- if (simple_linked_list_size (s -> list ) < MAX_QUEUE_SIZE ) {
94+ if (simple_linked_list_size (s -> frame_queue ) < MAX_QUEUE_SIZE ) {
9595 struct av_frame * avf = (struct av_frame * ) malloc (sizeof * avf );
9696 avf -> aframe = a ;
9797 avf -> vframe = v ;
98- simple_linked_list_append (s -> list , avf );
98+ simple_linked_list_append (s -> frame_queue , avf );
9999 } else {
100100 MSG (WARNING , "Dropping frame!\n" );
101101 AUDIO_FRAME_DISPOSE (a );
@@ -162,7 +162,7 @@ static int vidcap_ug_input_init(const struct vidcap_params *cap_params, void **s
162162 struct ug_input_state * s = calloc (1 , sizeof * s );
163163 s -> magic = MAGIC ;
164164 pthread_mutex_init (& s -> lock , nullptr );
165- s -> list = simple_linked_list_init ();
165+ s -> frame_queue = simple_linked_list_init ();
166166
167167 char cfg [128 ] = "" ;
168168
@@ -237,8 +237,8 @@ static void vidcap_ug_input_done(void *state)
237237 display_join (s -> display );
238238 display_done (s -> display );
239239
240- while (simple_linked_list_size (s -> list ) == 0 ) {
241- struct av_frame * item = simple_linked_list_pop (s -> list );
240+ while (simple_linked_list_size (s -> frame_queue ) == 0 ) {
241+ struct av_frame * item = simple_linked_list_pop (s -> frame_queue );
242242 VIDEO_FRAME_DISPOSE (item -> vframe );
243243 AUDIO_FRAME_DISPOSE (item -> aframe );
244244 free (item );
@@ -248,7 +248,7 @@ static void vidcap_ug_input_done(void *state)
248248 vrxtx_destroy (s -> video_rxtx );
249249
250250 pthread_mutex_destroy (& s -> lock );
251- simple_linked_list_destroy (s -> list );
251+ simple_linked_list_destroy (s -> frame_queue );
252252
253253 free (s );
254254}
@@ -258,12 +258,12 @@ static struct video_frame *vidcap_ug_input_grab(void *state, struct audio_frame
258258 struct ug_input_state * s = state ;
259259 * audio = nullptr ;
260260 pthread_mutex_lock (& s -> lock );
261- while (simple_linked_list_size (s -> list ) == 0 ) {
261+ while (simple_linked_list_size (s -> frame_queue ) == 0 ) {
262262 pthread_mutex_unlock (& s -> lock );
263263 return nullptr ;
264264 }
265265
266- struct av_frame * item = simple_linked_list_pop (s -> list );
266+ struct av_frame * item = simple_linked_list_pop (s -> frame_queue );
267267 struct video_frame * frame = item -> vframe ;
268268 * audio = item -> aframe ;
269269 free (item );
0 commit comments