- Timestamp:
- Jun 9, 2016, 10:11:19 AM (9 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- f264b17
- Parents:
- ae15c63
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/source_avcodec.c
rae15c63 r6769586 73 73 void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, uint_t * read_samples); 74 74 75 uint_t aubio_source_avcodec_has_network_url(aubio_source_avcodec_t *s); 76 77 uint_t aubio_source_avcodec_has_network_url(aubio_source_avcodec_t *s) { 78 char proto[20], authorization[256], hostname[128], uripath[256]; 79 int proto_size = 20, authorization_size = 256, hostname_size = 128, 80 *port_ptr = 0, path_size = 256; 81 av_url_split(proto, proto_size, authorization, authorization_size, hostname, 82 hostname_size, port_ptr, uripath, path_size, s->path); 83 if (strlen(proto)) { 84 return 1; 85 } 86 return 0; 87 } 88 89 75 90 aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * path, uint_t samplerate, uint_t hop_size) { 76 91 aubio_source_avcodec_t * s = AUBIO_NEW(aubio_source_avcodec_t); … … 99 114 av_register_all(); 100 115 101 // if path[0] != '/' 102 //avformat_network_init(); 116 if (aubio_source_avcodec_has_network_url(s)) { 117 avformat_network_init(); 118 } 103 119 104 120 // try opening the file and get some info about it
Note: See TracChangeset
for help on using the changeset viewer.