static int32_t aac_afh_get_track(struct mp4 *mp4)
{
- int32_t i, num_tracks = mp4_total_tracks(mp4);
+ int32_t i, num_tracks = mp4_get_total_tracks(mp4);
assert(num_tracks >= 0);
for (i = 0; i < num_tracks; i++)
struct mp4_metadata meta;
};
-int32_t mp4_total_tracks(const struct mp4 *f)
-{
- return f->total_tracks;
-}
-
/*
* Returns -1, 0, or 1 on errors/EOF/success. Partial reads followed by EOF or
* read errors are treated as errors.
* Return the number of milliseconds of the given track.
*
* \param f As returned by \ref mp4_open_read(), must not be NULL.
- * \param track Between zero and the value returned by \ref mp4_total_tracks().
+ * \param track Between zero and the value returned by \ref mp4_get_total_tracks().
*
* The function returns zero if the audio file is of zero length or contains a
* corrupt track header.
return t->duration * 1000 / t->timeScale;
}
+int32_t mp4_get_total_tracks(const struct mp4 *f)
+{
+ return f->total_tracks;
+}
+
/**
* Check whether the given track number corresponds to an audio track.
*
struct mp4; /* opaque */
void mp4_set_sample_position(struct mp4 *f, int32_t track, int32_t sample);
-int32_t mp4_total_tracks(const struct mp4 *f);
+int32_t mp4_get_total_tracks(const struct mp4 *f);
bool mp4_is_audio_track(const struct mp4 *f, int32_t track);
struct mp4 *mp4_open_read(const struct mp4_callback *cb);
void mp4_close(struct mp4 *f);