~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to mpeglib/lib/oggvorbis/vorbisInfo.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  info about vorbis files.
 
3
  Copyright (C) 2001  Martin Vogt
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU Library General Public License as published by
 
7
  the Free Software Foundation.
 
8
 
 
9
  For more information look at the file COPYRIGHT in this package
 
10
 
 
11
 */
 
12
 
 
13
 
 
14
 
 
15
#ifndef __VORBISINFO_H
 
16
#define __VORBISINFO_H
 
17
 
 
18
 
 
19
#ifdef HAVE_CONFIG_H
 
20
#include <config.h>
 
21
#endif
 
22
 
 
23
#include <stdio.h>
 
24
#include <iostream.h>
 
25
#include <stdlib.h>
 
26
#include <string.h>
 
27
 
 
28
#ifdef OGG_VORBIS
 
29
 
 
30
#include <vorbis/codec.h>
 
31
#include <vorbis/vorbisfile.h>
 
32
#include "../util/file/fileAccess.h"
 
33
 
 
34
/**
 
35
   callbacks from vorbisfile
 
36
*/
 
37
extern "C" {
 
38
 
 
39
extern size_t  fread_func2  (void *ptr,size_t size,size_t nmemb, void *stream);
 
40
extern int     fseek_func2  (void *stream, ogg_int64_t offset, int whence);
 
41
extern int     fclose_func2 (void *stream);
 
42
extern long    ftell_func2 (void *stream);
 
43
 
 
44
}
 
45
 
 
46
 
 
47
 
 
48
class VorbisInfo {
 
49
 
 
50
  FileAccess* input;
 
51
  OggVorbis_File* vf;
 
52
  vorbis_info *vi;
 
53
 
 
54
  long lastSeekPos;
 
55
 
 
56
 public:
 
57
  VorbisInfo(FileAccess* input);
 
58
  ~VorbisInfo();
 
59
  
 
60
  // returns byte positions
 
61
  long getSeekPosition(int second);
 
62
  // returns length in seconds
 
63
  long getLength();
 
64
  
 
65
  void print(const char* msg);
 
66
  
 
67
  void setSeekPos(long pos);
 
68
  long getSeekPos();
 
69
 
 
70
  FileAccess* getInput();
 
71
 
 
72
 
 
73
};
 
74
 
 
75
#endif
 
76
 
 
77
#endif