Changeset 4237:fabc316e6db6 in roaraudio
- Timestamp:
- 08/25/10 02:41:49 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/streams.c
r4229 r4237 136 136 g_streams[i] = s; 137 137 counters_inc(streams, 1); 138 ROAR_INFO("streams_new(void): New stream %i created (state=initing)", ROAR_DBG_INFO_VERBOSE, i); 138 139 ROAR_DBG("streams_new(void): n->id=%i", n->id); 139 140 ROAR_DBG("streams_new(void) = %i", i); … … 164 165 return 0; 165 166 167 ROAR_INFO("streams_delete(id=%i): stream state: %s->closing", ROAR_DBG_INFO_VERBOSE, id, roar_streamstate2str(s->state)); 166 168 s->state = ROAR_STREAMSTATE_CLOSING; 167 169 … … 591 593 if ( fh == -1 || fh == -2 ) { // yes, this is valid, indecats full vio! 592 594 ss->ready = 1; 595 ROAR_INFO("streams_set_fh(id=%i, fh=%i): stream state: %s->new", ROAR_DBG_INFO_VERBOSE, id, fh, roar_streamstate2str(ss->state)); 593 596 ss->state = ROAR_STREAMSTATE_NEW; 594 597 return 0; … … 627 630 if ( !nonblock ) { 628 631 ss->ready = 1; 632 ROAR_INFO("streams_set_fh(id=%i, fh=%i): stream state: %s->new", ROAR_DBG_INFO_VERBOSE, id, fh, roar_streamstate2str(ss->state)); 629 633 ss->state = ROAR_STREAMSTATE_NEW; 630 634 … … 639 643 ss->ready = 1; 640 644 ss->state = ROAR_STREAMSTATE_NEW; 645 ROAR_INFO("streams_set_fh(id=%i, fh=%i): stream state: %s->new", ROAR_DBG_INFO_VERBOSE, id, fh, roar_streamstate2str(ss->state)); 641 646 642 647 ROAR_DBG("streams_set_fh(id=%i, fh=%i) = 0", id, fh); … … 1709 1714 if ( ss->codecfilter != -1 ) { 1710 1715 if ( codecfilter_write(ss->codecfilter_inst, ss->codecfilter, NULL, 0) == 0 ) 1716 if ( ss->state != ROAR_STREAMSTATE_OLD ) { 1717 ROAR_INFO("streams_send_mon(id=%i): stream state: %s->old", ROAR_DBG_INFO_VERBOSE, id, roar_streamstate2str(ss->state)); 1718 } 1711 1719 ss->state = ROAR_STREAMSTATE_OLD; 1712 1720 } … … 1799 1807 if ( (ret = stream_vio_s_write(ss, obuf, olen)) == olen ) { 1800 1808 s->pos = ROAR_MATH_OVERFLOW_ADD(s->pos, ROAR_OUTPUT_CALC_OUTBUFSAMP(&(s->info), olen)*s->info.channels); 1809 if ( ss->state != ROAR_STREAMSTATE_OLD ) { 1810 ROAR_INFO("streams_send_mon(id=%i): stream state: %s->old", ROAR_DBG_INFO_VERBOSE, id, roar_streamstate2str(ss->state)); 1811 } 1801 1812 ss->state = ROAR_STREAMSTATE_OLD; 1802 1813 ROAR_DBG("streams_send_mon(id=%i) = 0", id); … … 1809 1820 ROAR_WARN("streams_send_mon(id=%i): Overrun in stream: wrote %i of %i bytes, %i bytes missing", id, (int)ret, olen, olen-(int)ret); 1810 1821 s->pos = ROAR_MATH_OVERFLOW_ADD(s->pos, ROAR_OUTPUT_CALC_OUTBUFSAMP(&(s->info), ret)*s->info.channels); 1822 if ( ss->state != ROAR_STREAMSTATE_OLD ) { 1823 ROAR_INFO("streams_send_mon(id=%i): stream state: %s->old", ROAR_DBG_INFO_VERBOSE, id, roar_streamstate2str(ss->state)); 1824 } 1811 1825 ss->state = ROAR_STREAMSTATE_OLD; 1812 1826 _return(0); … … 1817 1831 == olen ) { 1818 1832 s->pos = ROAR_MATH_OVERFLOW_ADD(s->pos, ROAR_OUTPUT_CALC_OUTBUFSAMP(&(s->info), olen)*s->info.channels); 1833 if ( ss->state != ROAR_STREAMSTATE_OLD ) { 1834 ROAR_INFO("streams_send_mon(id=%i): stream state: %s->old", ROAR_DBG_INFO_VERBOSE, id, roar_streamstate2str(ss->state)); 1835 } 1819 1836 ss->state = ROAR_STREAMSTATE_OLD; 1820 1837 _return(0); … … 1837 1854 if ( stream_vio_s_write(ss, obuf, olen) == olen ) { 1838 1855 s->pos = ROAR_MATH_OVERFLOW_ADD(s->pos, ROAR_OUTPUT_CALC_OUTBUFSAMP(&(s->info), olen)*s->info.channels); 1856 if ( ss->state != ROAR_STREAMSTATE_OLD ) { 1857 ROAR_INFO("streams_send_mon(id=%i): stream state: %s->old", ROAR_DBG_INFO_VERBOSE, id, roar_streamstate2str(ss->state)); 1858 } 1839 1859 ss->state = ROAR_STREAMSTATE_OLD; 1840 1860 _return(0); … … 1947 1967 streams_delete(i); 1948 1968 1949 if ( g_streams[i] != NULL ) 1969 if ( g_streams[i] != NULL ) { 1970 if ( g_streams[i]->state != ROAR_STREAMSTATE_OLD ) { 1971 ROAR_INFO("stream_vio_s_read(*): (stream: %i) stream state: %s->old", ROAR_DBG_INFO_VERBOSE, i, roar_streamstate2str(g_streams[i]->state)); 1972 } 1950 1973 g_streams[i]->state = ROAR_STREAMSTATE_OLD; 1974 } 1951 1975 } 1952 1976 } … … 1990 2014 } 1991 2015 1992 if ( g_streams[i] != NULL ) 2016 if ( g_streams[i] != NULL ) { 2017 if ( g_streams[i]->state != ROAR_STREAMSTATE_OLD ) { 2018 ROAR_INFO("stream_vio_s_write(*): (stream: %i) stream state: %s->old", ROAR_DBG_INFO_VERBOSE, i, roar_streamstate2str(g_streams[i]->state)); 2019 } 1993 2020 g_streams[i]->state = ROAR_STREAMSTATE_OLD; 2021 } 1994 2022 } 1995 2023 }
Note: See TracChangeset
for help on using the changeset viewer.