• Home
  • Raw
  • Download

Lines Matching refs:q

46 int mm_camera_stream_init_q(mm_camera_frame_queue_t *q)  in mm_camera_stream_init_q()  argument
48 pthread_mutex_init(&q->mutex, NULL); in mm_camera_stream_init_q()
51 int mm_camera_stream_deinit_q(mm_camera_frame_queue_t *q) in mm_camera_stream_deinit_q() argument
53 pthread_mutex_destroy(&q->mutex); in mm_camera_stream_deinit_q()
57 int mm_camera_stream_frame_get_q_cnt(mm_camera_frame_queue_t *q) in mm_camera_stream_frame_get_q_cnt() argument
60 pthread_mutex_lock(&q->mutex); in mm_camera_stream_frame_get_q_cnt()
61 cnt = q->cnt; in mm_camera_stream_frame_get_q_cnt()
62 pthread_mutex_unlock(&q->mutex); in mm_camera_stream_frame_get_q_cnt()
66 mm_camera_frame_t *mm_camera_stream_frame_deq_no_lock(mm_camera_frame_queue_t *q) in mm_camera_stream_frame_deq_no_lock() argument
70 tmp = q->head; in mm_camera_stream_frame_deq_no_lock()
73 if(q->head == q->tail) { in mm_camera_stream_frame_deq_no_lock()
74 q->head = NULL; in mm_camera_stream_frame_deq_no_lock()
75 q->tail = NULL; in mm_camera_stream_frame_deq_no_lock()
77 q->head = tmp->next; in mm_camera_stream_frame_deq_no_lock()
80 q->cnt--; in mm_camera_stream_frame_deq_no_lock()
85 void mm_camera_stream_frame_enq_no_lock(mm_camera_frame_queue_t *q, mm_camera_frame_t *node) in mm_camera_stream_frame_enq_no_lock() argument
88 if(q->head == NULL) { in mm_camera_stream_frame_enq_no_lock()
89 q->head = node; in mm_camera_stream_frame_enq_no_lock()
90 q->tail = node; in mm_camera_stream_frame_enq_no_lock()
92 q->tail->next = node; in mm_camera_stream_frame_enq_no_lock()
93 q->tail = node; in mm_camera_stream_frame_enq_no_lock()
95 q->cnt++; in mm_camera_stream_frame_enq_no_lock()
98 mm_camera_frame_t *mm_camera_stream_frame_deq(mm_camera_frame_queue_t *q) in mm_camera_stream_frame_deq() argument
102 pthread_mutex_lock(&q->mutex); in mm_camera_stream_frame_deq()
103 tmp = q->head; in mm_camera_stream_frame_deq()
106 if(q->head == q->tail) { in mm_camera_stream_frame_deq()
107 q->head = NULL; in mm_camera_stream_frame_deq()
108 q->tail = NULL; in mm_camera_stream_frame_deq()
110 q->head = tmp->next; in mm_camera_stream_frame_deq()
113 q->cnt--; in mm_camera_stream_frame_deq()
115 pthread_mutex_unlock(&q->mutex); in mm_camera_stream_frame_deq()
119 void mm_camera_stream_frame_enq(mm_camera_frame_queue_t *q, mm_camera_frame_t *node) in mm_camera_stream_frame_enq() argument
121 pthread_mutex_lock(&q->mutex); in mm_camera_stream_frame_enq()
123 if(q->head == NULL) { in mm_camera_stream_frame_enq()
124 q->head = node; in mm_camera_stream_frame_enq()
125 q->tail = node; in mm_camera_stream_frame_enq()
127 q->tail->next = node; in mm_camera_stream_frame_enq()
128 q->tail = node; in mm_camera_stream_frame_enq()
130 q->cnt++; in mm_camera_stream_frame_enq()
131 pthread_mutex_unlock(&q->mutex); in mm_camera_stream_frame_enq()
134 void mm_stream_frame_flash_q(mm_camera_frame_queue_t *q) in mm_stream_frame_flash_q() argument
136 pthread_mutex_lock(&q->mutex); in mm_stream_frame_flash_q()
137 q->cnt = 0; in mm_stream_frame_flash_q()
138 q->match_cnt = 0; in mm_stream_frame_flash_q()
139 q->head = NULL; in mm_stream_frame_flash_q()
140 q->tail = NULL; in mm_stream_frame_flash_q()
141 pthread_mutex_unlock(&q->mutex); in mm_stream_frame_flash_q()
144 void mm_camera_stream_frame_refill_q(mm_camera_frame_queue_t *q, mm_camera_frame_t *node, int num) in mm_camera_stream_frame_refill_q() argument
148 mm_stream_frame_flash_q(q); in mm_camera_stream_frame_refill_q()
150 mm_camera_stream_frame_enq(q, &node[i]); in mm_camera_stream_frame_refill_q()
152 __func__,(uint32_t)q,num, mm_camera_stream_frame_get_q_cnt(q)); in mm_camera_stream_frame_refill_q()