rtoss - Blame information for rev 26

Subversion Repositories:
Rev:
Rev Author Line No. Line
14 roytam 1 /*
2  *  GSPlayer - The audio player for WindowsCE
3  *  Copyright (C) 2003  Y.Nagamidori
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18  */
19  
20 #ifndef __LIBOVD_H__
21 #define __LIBOVD_H__
22  
23 #define OVD_FATAL_ERR                   -2
24 #define OVD_ERR                                 -1
25 #define OVD_OK                                  0
26 #define OVD_NEED_MORE_OUTPUT    1
27 #define OVD_EOF                                 2
28 #define OVD_PCMBUF_LEN                  4096
29 #define OVD_COMMENT_LEN                 64
30  
31 typedef struct {
32         int version;
33         int channels;
34         long rate;
35  
36         long bitrate_upper;
37         long bitrate_nominal;
38         long bitrate_lower;
39         long bitrate_window;
40 } ovd_info;
41  
42 typedef struct {
43         TCHAR szDate[OVD_COMMENT_LEN];
44         TCHAR szTrackNum[OVD_COMMENT_LEN];
45         TCHAR szTitle[OVD_COMMENT_LEN];
46         TCHAR szArtist[OVD_COMMENT_LEN];
47         TCHAR szAlbum[OVD_COMMENT_LEN];
48         TCHAR szGenre[OVD_COMMENT_LEN];
49         TCHAR szComment[OVD_COMMENT_LEN];
50 } ovd_comment;
51  
52  
53 typedef struct {
26 roytam 54         unsigned char* buf;
14 roytam 55         unsigned long len;
56         HANDLE handle;
57 } ovd_stream_buf;
58  
59  
60 #ifdef LIBOVD_EXPORTS
61 #define LIBOVD_EXPORT __declspec(dllexport)
62 #else
63 #define LIBOVD_EXPORT
64 #endif
65  
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
69  
70 LIBOVD_EXPORT BOOL ovd_test_file(LPCTSTR pszFile);
71 LIBOVD_EXPORT HANDLE ovd_open_file(LPCTSTR pszFile);
72 LIBOVD_EXPORT void ovd_close(HANDLE hOv);
73 LIBOVD_EXPORT int ovd_read(HANDLE hov, LPBYTE pcmbuf, int pcmbuf_len, int* pcmout);
74 LIBOVD_EXPORT BOOL ovd_seek(HANDLE hov, LONGLONG samples);
75 LIBOVD_EXPORT LONGLONG ovd_get_current(HANDLE hov);
76 LIBOVD_EXPORT LONGLONG ovd_get_duration(HANDLE hov);
77 LIBOVD_EXPORT BOOL ovd_get_info(HANDLE hov, ovd_info* info);
78 LIBOVD_EXPORT BOOL ovd_get_comment(HANDLE hov, ovd_comment* comment);
79 LIBOVD_EXPORT BOOL ovd_get_comment_from_file(LPCTSTR pszFile, ovd_comment* comment);
80  
81 #define OVD_STREAM_BUF_LEN      4096
82  
83 LIBOVD_EXPORT ovd_stream_buf* ovd_init_stream();
84 LIBOVD_EXPORT BOOL ovd_parse_stream(ovd_stream_buf* buf);
85 LIBOVD_EXPORT BOOL ovd_get_stream_info(ovd_stream_buf* buf, ovd_info* info);
86 LIBOVD_EXPORT BOOL ovd_get_stream_comment(ovd_stream_buf* buf, ovd_comment* comment);
87 LIBOVD_EXPORT int ovd_decode_stream(ovd_stream_buf* buf, LPBYTE pcmbuf, int pcmbuf_len, int* pcmout);
88 LIBOVD_EXPORT void ovd_uninit_stream(ovd_stream_buf* buf);
89  
90 #ifdef __cplusplus
91 }
92 #endif
93  
94 #endif // __LIBOVD_H__