Rev 5592 | Rev 6106 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5592 | Rev 5603 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include "pixlib3.h" |
1 | #include "pixlib3.h" |
- | 2 | #include |
|
Line 2... | Line 3... | ||
2 | 3 | ||
3 | #define BLACK_MAGIC_SOUND |
4 | #define BLACK_MAGIC_SOUND |
Line 4... | Line 5... | ||
4 | #define BLACK_MAGIC_VIDEO |
5 | #define BLACK_MAGIC_VIDEO |
Line 62... | Line 63... | ||
62 | #define ID_PROGRESS 102 |
63 | #define ID_PROGRESS 102 |
63 | #define ID_VOL_LEVEL 103 |
64 | #define ID_VOL_LEVEL 103 |
64 | #define ID_VOL_CTRL 104 |
65 | #define ID_VOL_CTRL 104 |
65 | 66 | ||
Line -... | Line 67... | ||
- | 67 | ||
66 | typedef struct |
68 | typedef struct |
67 | { |
69 | { |
68 | volatile uint32_t lock; |
70 | mutex_t lock; |
69 | char *buffer; |
71 | char *buffer; |
70 | volatile uint32_t count; |
72 | int count; |
71 | }astream_t; |
73 | }astream_t; |
Line 72... | Line 74... | ||
72 | 74 | ||
73 | typedef struct |
75 | typedef struct |
74 | { |
76 | { |
Line 85... | Line 87... | ||
85 | AVPacketList *first_pkt; |
87 | AVPacketList *first_pkt; |
86 | AVPacketList *last_pkt; |
88 | AVPacketList *last_pkt; |
87 | int size; |
89 | int size; |
88 | int count; |
90 | int count; |
89 | volatile uint32_t lock; |
91 | mutex_t lock; |
90 | } queue_t; |
92 | } queue_t; |
91 | 93 | ||
Line 92... | Line 94... | ||
92 | int put_packet(queue_t *q, AVPacket *pkt); |
94 | int put_packet(queue_t *q, AVPacket *pkt); |
93 | int get_packet(queue_t *q, AVPacket *pkt); |
95 | int get_packet(queue_t *q, AVPacket *pkt); |
Line -... | Line 96... | ||
- | 96 | ||
- | 97 | ||
- | 98 | #define DECODER_THREAD 1 |
|
- | 99 | #define AUDIO_THREAD 2 |
|
- | 100 | #define VIDEO_THREAD 4 |
|
94 | 101 | ||
95 | 102 | extern int threads_running; |
|
Line 96... | Line 103... | ||
96 | extern astream_t astream; |
103 | extern astream_t astream; |
97 | extern AVRational video_time_base; |
104 | extern AVRational video_time_base; |
Line 118... | Line 125... | ||
118 | 125 | ||
Line 119... | Line 126... | ||
119 | 126 | ||
Line 120... | Line -... | ||
120 | int create_thread(int (*proc)(void *param), void *param, int stack_size); |
- | |
121 | - | ||
122 | void mutex_lock(volatile uint32_t *val); |
- | |
123 | - | ||
124 | static inline void mutex_unlock(volatile uint32_t *val) |
- | |
125 | { |
- | |
Line 126... | Line 127... | ||
126 | *val = 0; |
127 | int create_thread(int (*proc)(void *param), void *param, int stack_size); |
127 | } |
128 | |
128 | 129 | ||
129 | static inline void GetNotify(void *event) |
130 | static inline void GetNotify(void *event) |