update queue

dev
xufuji456 3 years ago
parent b885fa4b96
commit c60ebdb6ec
  1. 8
      app/src/main/cpp/visualizer/execute_fft.c
  2. 7
      app/src/main/cpp/visualizer/execute_fft.h
  3. 1
      app/src/main/cpp/visualizer/queue.c
  4. 2
      app/src/main/cpp/visualizer/vlc_queue.h

@ -38,7 +38,7 @@ static inline block_t *block_Duplicate(const block_t *p_block)
return p_dup;
}
/*static*/ int Open(filter_sys_t *p_sys)
/*static*/ int open_visualizer(filter_sys_t *p_sys)
{
if (p_sys == NULL)
return VLC_ENOMEM;
@ -67,7 +67,7 @@ static inline block_t *block_Duplicate(const block_t *p_block)
// return VLC_ENOMEM;
// }
pthread_create (&p_sys->thread, NULL, Thread, p_sys);
pthread_create (&p_sys->thread, NULL, fft_thread, p_sys);
return VLC_SUCCESS;
}
@ -78,7 +78,7 @@ static inline block_t *block_Duplicate(const block_t *p_block)
return p_in_buf;
}
/*static*/ void Close(filter_sys_t *p_filter)
/*static*/ void close_visualizer(filter_sys_t *p_filter)
{
filter_sys_t *p_sys = p_filter;
@ -90,7 +90,7 @@ static inline block_t *block_Duplicate(const block_t *p_block)
free(p_sys->p_prev_s16_buff);
}
static void *Thread(void *p_data)
static void *fft_thread(void *p_data)
{
filter_sys_t *p_sys = (filter_sys_t*)p_data;
block_t *block;

@ -49,7 +49,6 @@ struct block_t
typedef struct
{
// vlc_thread_t thread;
pthread_t thread;
/* Audio data */
@ -66,12 +65,12 @@ typedef struct
window_param wind_param;
} filter_sys_t;
static void *Thread(void *);
static void *fft_thread(void *);
/*static*/ int Open(filter_sys_t *p_sys);
/*static*/ int open_visualizer(filter_sys_t *p_sys);
/*static*/ block_t *filter_audio(filter_sys_t *p_sys, block_t *p_in_buf);
/*static*/ void Close(filter_sys_t *p_filter);
/*static*/ void close_visualizer(filter_sys_t *p_filter);
#endif //PLAYER_CORE_RUN_FFT_H

@ -132,7 +132,6 @@ void *vlc_queue_Dequeue(vlc_queue_t *q)
void *entry;
vlc_queue_Lock(q);
// vlc_testcancel();
while (vlc_queue_IsEmpty(q))
vlc_queue_Wait(q);

@ -46,9 +46,7 @@ typedef struct vlc_queue
struct vlc_queue_entry *first;
struct vlc_queue_entry **lastp;
ptrdiff_t next_offset;
// vlc_mutex_t lock;
pthread_mutex_t lock;
// vlc_cond_t wait;
pthread_cond_t wait;
} vlc_queue_t;

Loading…
Cancel
Save