Revision dfd2a005 libavformat/r3d.c

View differences:

libavformat/r3d.c
43 43
    if (atom->size < 8)
44 44
        return -1;
45 45
    atom->tag = get_le32(s->pb);
46
    dprintf(s, "atom %d %.4s offset %#llx\n",
46
    av_dlog(s, "atom %d %.4s offset %#llx\n",
47 47
            atom->size, (char*)&atom->tag, atom->offset);
48 48
    return atom->size;
49 49
}
......
61 61

  
62 62
    tmp  = get_byte(s->pb); // major version
63 63
    tmp2 = get_byte(s->pb); // minor version
64
    dprintf(s, "version %d.%d\n", tmp, tmp2);
64
    av_dlog(s, "version %d.%d\n", tmp, tmp2);
65 65

  
66 66
    tmp = get_be16(s->pb); // unknown
67
    dprintf(s, "unknown1 %d\n", tmp);
67
    av_dlog(s, "unknown1 %d\n", tmp);
68 68

  
69 69
    tmp = get_be32(s->pb);
70 70
    av_set_pts_info(st, 32, 1, tmp);
71 71

  
72 72
    tmp = get_be32(s->pb); // filenum
73
    dprintf(s, "filenum %d\n", tmp);
73
    av_dlog(s, "filenum %d\n", tmp);
74 74

  
75 75
    url_fskip(s->pb, 32); // unknown
76 76

  
......
78 78
    st->codec->height = get_be32(s->pb);
79 79

  
80 80
    tmp = get_be16(s->pb); // unknown
81
    dprintf(s, "unknown2 %d\n", tmp);
81
    av_dlog(s, "unknown2 %d\n", tmp);
82 82

  
83 83
    st->codec->time_base.den = get_be16(s->pb);
84 84
    st->codec->time_base.num = get_be16(s->pb);
85 85

  
86 86
    tmp = get_byte(s->pb); // audio channels
87
    dprintf(s, "audio channels %d\n", tmp);
87
    av_dlog(s, "audio channels %d\n", tmp);
88 88
    if (tmp > 0) {
89 89
        AVStream *ast = av_new_stream(s, 1);
90 90
        if (!ast)
......
99 99
    filename[sizeof(filename)-1] = 0;
100 100
    av_metadata_set2(&st->metadata, "filename", filename, 0);
101 101

  
102
    dprintf(s, "filename %s\n", filename);
103
    dprintf(s, "resolution %dx%d\n", st->codec->width, st->codec->height);
104
    dprintf(s, "timescale %d\n", st->time_base.den);
105
    dprintf(s, "frame rate %d/%d\n",
102
    av_dlog(s, "filename %s\n", filename);
103
    av_dlog(s, "resolution %dx%d\n", st->codec->width, st->codec->height);
104
    av_dlog(s, "timescale %d\n", st->time_base.den);
105
    av_dlog(s, "frame rate %d/%d\n",
106 106
            st->codec->time_base.num, st->codec->time_base.den);
107 107

  
108 108
    return 0;
......
125 125
            r3d->video_offsets_count = i;
126 126
            break;
127 127
        }
128
        dprintf(s, "video offset %d: %#x\n", i, r3d->video_offsets[i]);
128
        av_dlog(s, "video offset %d: %#x\n", i, r3d->video_offsets[i]);
129 129
    }
130 130

  
131 131
    if (st->codec->time_base.den)
132 132
        st->duration = (uint64_t)r3d->video_offsets_count*
133 133
            st->time_base.den*st->codec->time_base.num/st->codec->time_base.den;
134
    dprintf(s, "duration %lld\n", st->duration);
134
    av_dlog(s, "duration %lld\n", st->duration);
135 135

  
136 136
    return 0;
137 137
}
......
147 147
    get_be32(s->pb); // rdas offset
148 148

  
149 149
    tmp = get_be32(s->pb);
150
    dprintf(s, "num video chunks %d\n", tmp);
150
    av_dlog(s, "num video chunks %d\n", tmp);
151 151

  
152 152
    tmp = get_be32(s->pb);
153
    dprintf(s, "num audio chunks %d\n", tmp);
153
    av_dlog(s, "num audio chunks %d\n", tmp);
154 154

  
155 155
    url_fskip(s->pb, 6*4);
156 156
}
......
176 176
    }
177 177

  
178 178
    s->data_offset = url_ftell(s->pb);
179
    dprintf(s, "data offset %#llx\n", s->data_offset);
179
    av_dlog(s, "data offset %#llx\n", s->data_offset);
180 180
    if (url_is_streamed(s->pb))
181 181
        return 0;
182 182
    // find REOB/REOF/REOS to load index
......
217 217
    dts = get_be32(s->pb);
218 218

  
219 219
    tmp = get_be32(s->pb);
220
    dprintf(s, "frame num %d\n", tmp);
220
    av_dlog(s, "frame num %d\n", tmp);
221 221

  
222 222
    tmp  = get_byte(s->pb); // major version
223 223
    tmp2 = get_byte(s->pb); // minor version
224
    dprintf(s, "version %d.%d\n", tmp, tmp2);
224
    av_dlog(s, "version %d.%d\n", tmp, tmp2);
225 225

  
226 226
    tmp = get_be16(s->pb); // unknown
227
    dprintf(s, "unknown %d\n", tmp);
227
    av_dlog(s, "unknown %d\n", tmp);
228 228

  
229 229
    if (tmp > 4) {
230 230
        tmp = get_be16(s->pb); // unknown
231
        dprintf(s, "unknown %d\n", tmp);
231
        av_dlog(s, "unknown %d\n", tmp);
232 232

  
233 233
        tmp = get_be16(s->pb); // unknown
234
        dprintf(s, "unknown %d\n", tmp);
234
        av_dlog(s, "unknown %d\n", tmp);
235 235

  
236 236
        tmp = get_be32(s->pb);
237
        dprintf(s, "width %d\n", tmp);
237
        av_dlog(s, "width %d\n", tmp);
238 238
        tmp = get_be32(s->pb);
239
        dprintf(s, "height %d\n", tmp);
239
        av_dlog(s, "height %d\n", tmp);
240 240

  
241 241
        tmp = get_be32(s->pb);
242
        dprintf(s, "metadata len %d\n", tmp);
242
        av_dlog(s, "metadata len %d\n", tmp);
243 243
    }
244 244
    tmp = atom->size - 8 - (url_ftell(s->pb) - pos);
245 245
    if (tmp < 0)
......
255 255
    if (st->codec->time_base.den)
256 256
        pkt->duration = (uint64_t)st->time_base.den*
257 257
            st->codec->time_base.num/st->codec->time_base.den;
258
    dprintf(s, "pkt dts %lld duration %d\n", pkt->dts, pkt->duration);
258
    av_dlog(s, "pkt dts %lld duration %d\n", pkt->dts, pkt->duration);
259 259

  
260 260
    return 0;
261 261
}
......
275 275
    samples = get_be32(s->pb);
276 276

  
277 277
    tmp = get_be32(s->pb);
278
    dprintf(s, "packet num %d\n", tmp);
278
    av_dlog(s, "packet num %d\n", tmp);
279 279

  
280 280
    tmp = get_be16(s->pb); // unkown
281
    dprintf(s, "unknown %d\n", tmp);
281
    av_dlog(s, "unknown %d\n", tmp);
282 282

  
283 283
    tmp  = get_byte(s->pb); // major version
284 284
    tmp2 = get_byte(s->pb); // minor version
285
    dprintf(s, "version %d.%d\n", tmp, tmp2);
285
    av_dlog(s, "version %d.%d\n", tmp, tmp2);
286 286

  
287 287
    tmp = get_be32(s->pb); // unknown
288
    dprintf(s, "unknown %d\n", tmp);
288
    av_dlog(s, "unknown %d\n", tmp);
289 289

  
290 290
    size = atom->size - 8 - (url_ftell(s->pb) - pos);
291 291
    if (size < 0)
......
299 299
    pkt->stream_index = 1;
300 300
    pkt->dts = dts;
301 301
    pkt->duration = av_rescale(samples, st->time_base.den, st->codec->sample_rate);
302
    dprintf(s, "pkt dts %lld duration %d samples %d sample rate %d\n",
302
    av_dlog(s, "pkt dts %lld duration %d samples %d sample rate %d\n",
303 303
            pkt->dts, pkt->duration, samples, st->codec->sample_rate);
304 304

  
305 305
    return 0;
......
356 356

  
357 357
    frame_num = sample_time*st->codec->time_base.den/
358 358
        ((int64_t)st->codec->time_base.num*st->time_base.den);
359
    dprintf(s, "seek frame num %d timestamp %lld\n", frame_num, sample_time);
359
    av_dlog(s, "seek frame num %d timestamp %lld\n", frame_num, sample_time);
360 360

  
361 361
    if (frame_num < r3d->video_offsets_count) {
362 362
        url_fseek(s->pb, r3d->video_offsets_count, SEEK_SET);

Also available in: Unified diff