/*******************************************************************
                         GOP List interfaces
 *******************************************************************/

#ifndef GOP_LIST_H
#define GOP_LIST_H

#include <stdio.h>
#include <stdlib.h>
#include "mpeg_io.h"
#include "gop.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
	int index;
	int frame;

	size_t offset;

	void *prev;
	void *next;
} GOP_ENTRY;

typedef struct {
	int num_of_gop;
	int num_of_frame;
	GOP *gops;
} GOP_LIST;

#ifndef GOP_LIST_C
extern int create_gop_list(MPEG_IO *in, GOP_LIST *out);
extern int release_gop_list(GOP_LIST *p);
extern GOP gop_list_find_gop(GOP_LIST *p, int frame);
#endif

#ifdef __cplusplus
}
#endif

#endif