File: p_index.h

package info (click to toggle)
ogmtools 1%3A1.5-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,564 kB
  • sloc: cpp: 8,003; ansic: 5,865; sh: 3,167; makefile: 71
file content (48 lines) | stat: -rw-r--r-- 1,093 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
  ogmmerge -- utility for splicing together ogg bitstreams
      from component media subtypes

  p_index.h
  class definition for video index

  Written by Moritz Bunkus <moritz@bunkus.org>
  Based on Xiph.org's 'oggmerge' found in their CVS repository
  See http://www.xiph.org

  Distributed under the GPL
  see the file COPYING for details
  or visit http://www.gnu.org/copyleft/gpl.html
*/

#ifdef ENABLE_INDEX
 
#ifndef __P_INDEX_H
#define __P_INDEX_H

#include "ogmmerge.h"
#include "ogmstreams.h"
#include "queue.h"

typedef struct idx_entry {
  ogg_int64_t granulepos;
  off_t       filepos;
};

class index_packetizer_c: public q_c {
  private:
    ogg_int64_t granulepos, packetno;
    int         serial;
  public:
    index_packetizer_c(int nserial) throw (error_c);
    virtual ~index_packetizer_c();
    
    virtual int     process(idx_entry *entries, int num);
    virtual stamp_t make_timestamp(ogg_int64_t granulepos);
    virtual void    produce_eos_packet();
    virtual void    produce_header_packets();
    virtual void    reset();
};

#endif

#endif // ENABLE_INDEX