- Timestamp:
- Mar 4, 2008 3:31:13 PM (17 years ago)
- Location:
- pjproject/trunk/pjmedia
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/clock.h
r974 r1843 63 63 * #pjmedia_clock_wait() in order to synchronize timing. 64 64 */ 65 PJMEDIA_CLOCK_NO_ASYNC = 1 65 PJMEDIA_CLOCK_NO_ASYNC = 1, 66 67 /** 68 * Prevent the clock from setting it's thread to highest priority. 69 */ 70 PJMEDIA_CLOCK_NO_HIGHEST_PRIO = 2 66 71 }; 67 72 … … 87 92 * along with clock_rate, specifies the interval 88 93 * of each clock run (or clock ticks). 89 * @param options By default, the callback will be called 90 * asynchronously (depending on the clock 91 * implementation backend, a thread may be 92 * created). If PJMEDIA_CLOCK_NO_ASYNC is set, 93 * application must poll the clock with 94 * #pjmedia_clock_wait() to let the clock runs. 94 * @param options Bitmask of pjmedia_clock_options. 95 95 * @param cb Callback to be called for each clock tick. 96 96 * @param user_data User data, which will be passed to the callback. -
pjproject/trunk/pjmedia/include/pjmedia/master_port.h
r974 r1843 71 71 * @param u_port Upstream port. 72 72 * @param d_port Downstream port. 73 * @param options Options flags, must be zero for now. 73 * @param options Options flags, from bitmask combinations from 74 * pjmedia_clock_options. 74 75 * @param p_m Pointer to receive the master port instance. 75 76 * -
pjproject/trunk/pjmedia/src/pjmedia/clock_thread.c
r1747 r1843 216 216 pjmedia_clock *clock = (pjmedia_clock*) arg; 217 217 218 /* Set thread priority to maximum unless not wanted. */ 219 if ((clock->options & PJMEDIA_CLOCK_NO_HIGHEST_PRIO) == 0) { 220 int max = pj_thread_get_prio_max(pj_thread_this()); 221 if (max > 0) 222 pj_thread_set_prio(pj_thread_this(), max); 223 } 224 218 225 /* Get the first tick */ 219 226 pj_get_timestamp(&clock->next_tick); -
pjproject/trunk/pjmedia/src/pjmedia/master_port.c
r1266 r1843 103 103 104 104 /* Create media clock */ 105 status = pjmedia_clock_create(pool, clock_rate, samples_per_frame, 0,106 &clock_callback, m, &m->clock);105 status = pjmedia_clock_create(pool, clock_rate, samples_per_frame, 106 options, &clock_callback, m, &m->clock); 107 107 if (status != PJ_SUCCESS) { 108 108 pj_lock_destroy(m->lock);
Note: See TracChangeset
for help on using the changeset viewer.