comparison src/http/modules/ngx_http_mp4_module.c @ 636:41147ba87bd9 NGINX_1_0_8

nginx 1.0.8 *) Bugfix: nginx could not be built --with-http_mp4_module and without --with-debug option.
author Igor Sysoev <http://sysoev.ru>
date Sat, 01 Oct 2011 00:00:00 +0400
parents 0d6525917227
children 692f4d4d7f10
comparison
equal deleted inserted replaced
635:f7c187824e89 636:41147ba87bd9
740 740
741 adjustment = mp4->ftyp_size + mp4->moov_size 741 adjustment = mp4->ftyp_size + mp4->moov_size
742 + ngx_http_mp4_update_mdat_atom(mp4, start_offset) 742 + ngx_http_mp4_update_mdat_atom(mp4, start_offset)
743 - start_offset; 743 - start_offset;
744 744
745 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, 745 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
746 "mp4 adjustment:%D", adjustment); 746 "mp4 adjustment:%D", adjustment);
747 747
748 for (i = 0; i < mp4->trak.nelts; i++) { 748 for (i = 0; i < mp4->trak.nelts; i++) {
749 if (trak[i].out[NGX_HTTP_MP4_CO64_DATA].buf) { 749 if (trak[i].out[NGX_HTTP_MP4_CO64_DATA].buf) {
750 ngx_http_mp4_adjust_co64_atom(mp4, &trak[i], adjustment); 750 ngx_http_mp4_adjust_co64_atom(mp4, &trak[i], adjustment);
834 atom_header = mp4->buffer_pos; 834 atom_header = mp4->buffer_pos;
835 } 835 }
836 836
837 atom_name = atom_header + sizeof(uint32_t); 837 atom_name = atom_header + sizeof(uint32_t);
838 838
839 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, 839 ngx_log_debug4(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
840 "mp4 atom: %*s @%O:%uL", 840 "mp4 atom: %*s @%O:%uL",
841 4, atom_name, mp4->offset, atom_size); 841 4, atom_name, mp4->offset, atom_size);
842 842
843 for (n = 0; atom[n].name; n++) { 843 for (n = 0; atom[n].name; n++) {
844 844
1066 1066
1067 atom_data_size = mp4->mdat_data.buf->file_last - start_offset; 1067 atom_data_size = mp4->mdat_data.buf->file_last - start_offset;
1068 mp4->mdat_data.buf->file_pos = start_offset; 1068 mp4->mdat_data.buf->file_pos = start_offset;
1069 mp4->content_length += atom_data_size; 1069 mp4->content_length += atom_data_size;
1070 1070
1071 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, 1071 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
1072 "mdat new offset @%O:%O", start_offset, atom_data_size); 1072 "mdat new offset @%O:%O", start_offset, atom_data_size);
1073 1073
1074 atom_header = mp4->mdat_atom_header; 1074 atom_header = mp4->mdat_atom_header;
1075 1075
1076 if ((uint64_t) atom_data_size > 0xffffffff) { 1076 if ((uint64_t) atom_data_size > 0xffffffff) {
2177 end = (ngx_mp4_ctts_entry_t *) data->last; 2177 end = (ngx_mp4_ctts_entry_t *) data->last;
2178 2178
2179 while (entry < end) { 2179 while (entry < end) {
2180 count = ngx_mp4_get_32value(entry->count); 2180 count = ngx_mp4_get_32value(entry->count);
2181 2181
2182 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, 2182 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
2183 "start:%uD, count:%uD, offset:%uD", 2183 "start:%uD, count:%uD, offset:%uD",
2184 start_sample, count, ngx_mp4_get_32value(entry->offset)); 2184 start_sample, count, ngx_mp4_get_32value(entry->offset));
2185 2185
2186 if (start_sample <= count) { 2186 if (start_sample <= count) {
2187 count -= (start_sample - 1); 2187 count -= (start_sample - 1);