2003-02-16 11:44:19 +00:00
|
|
|
/*
|
|
|
|
mkvmerge -- utility for splicing together matroska files
|
|
|
|
from component media subtypes
|
|
|
|
|
|
|
|
queue.cpp
|
|
|
|
|
|
|
|
Written by Moritz Bunkus <moritz@bunkus.org>
|
|
|
|
|
|
|
|
Distributed under the GPL
|
|
|
|
see the file COPYING for details
|
|
|
|
or visit http://www.gnu.org/copyleft/gpl.html
|
|
|
|
*/
|
|
|
|
|
2003-02-16 12:17:11 +00:00
|
|
|
/*!
|
|
|
|
\file
|
2003-02-16 17:04:39 +00:00
|
|
|
\version \$Id: queue.h,v 1.3 2003/02/16 17:04:39 mosu Exp $
|
2003-02-16 12:17:11 +00:00
|
|
|
\brief class definition for the queueing class
|
|
|
|
\author Moritz Bunkus <moritz @ bunkus.org>
|
|
|
|
*/
|
|
|
|
|
2003-02-16 17:04:39 +00:00
|
|
|
#ifndef __QUEUE_H
|
|
|
|
#define __QUEUE_H
|
2003-02-16 11:44:19 +00:00
|
|
|
|
|
|
|
#include "error.h"
|
2003-02-16 17:04:39 +00:00
|
|
|
#include "pr_generic.h"
|
2003-02-16 11:44:19 +00:00
|
|
|
|
|
|
|
// q_page_t is used internally only
|
|
|
|
typedef struct q_page {
|
|
|
|
packet_t *pack;
|
|
|
|
struct q_page *next;
|
|
|
|
} q_page_t;
|
|
|
|
|
|
|
|
class q_c: public generic_packetizer_c {
|
|
|
|
private:
|
|
|
|
struct q_page *first;
|
|
|
|
struct q_page *current;
|
|
|
|
|
|
|
|
public:
|
|
|
|
q_c() throw (error_c);
|
|
|
|
virtual ~q_c();
|
|
|
|
|
|
|
|
virtual int add_packet(char *data, int lenth,
|
2003-02-16 17:04:39 +00:00
|
|
|
u_int64_t timestamp, int is_key = 0);
|
2003-02-16 11:44:19 +00:00
|
|
|
virtual packet_t *get_packet();
|
|
|
|
virtual int packet_available();
|
|
|
|
virtual stamp_t get_smallest_timestamp();
|
|
|
|
|
|
|
|
virtual long get_queued_bytes();
|
|
|
|
};
|
|
|
|
|
2003-02-16 17:04:39 +00:00
|
|
|
#endif // __QUEUE_H
|