AlsaPlayer
0.99.80
Main Page
Data Structures
Files
File List
Globals
alsaplayer
input_plugin.h
Go to the documentation of this file.
1
/* input_plugin.h - Use this to write input plugins
2
* Copyright (C) 1999-2002 Andy Lo A Foe <andy@alsaplayer.org>
3
*
4
* This file is part of AlsaPlayer.
5
*
6
* AlsaPlayer is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* AlsaPlayer is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, see <http://www.gnu.org/licenses/>.
18
*
19
* $Id: input_plugin.h 1250 2007-07-08 14:17:12Z dominique_libre $
20
*
21
*/
22
23
#ifndef __input_plugin_h__
24
#define __input_plugin_h__
25
26
#include <pthread.h>
27
31
#define P_SEEK 1
32
36
#define P_PERFECTSEEK 2
37
41
#define P_REENTRANT 4
42
46
#define P_FILEBASED 8
47
51
#define P_STREAMBASED 16
52
56
#define P_BUFFERING 32
57
58
/*
59
* Format of version number is 0x1000 + version
60
* So 0x1001 is *binary* format version 1
61
* THE VERSION NUMBER IS *NOT* A USER SERVICABLE PART!
62
*/
63
67
#define INPUT_PLUGIN_BASE_VERSION 0x1000
68
74
#define INPUT_PLUGIN_VERSION (INPUT_PLUGIN_BASE_VERSION + 16)
75
81
typedef
struct
_input_object
82
{
87
int
ready
;
92
int
flags
;
97
int
nr_frames
;
102
int
nr_tracks
;
107
int
nr_channels
;
112
int
frame_size
;
116
void
*
local_data
;
120
char
*
path
;
125
pthread_mutex_t
object_mutex
;
126
}
input_object
;
127
128
133
typedef
struct
_stream_info
134
{
139
char
stream_type
[128];
143
char
artist
[128];
147
char
title
[128];
151
char
album
[128];
155
char
genre
[128];
159
char
year
[10];
163
char
track
[10];
167
char
comment
[128];
173
char
status
[32];
177
char
path
[1024];
181
int
channels
;
185
int
tracks
;
189
int
current_track
;
193
int
sample_rate
;
197
int
bitrate
;
198
}
stream_info
;
199
203
typedef
int
input_version_type
;
204
208
typedef
int
input_flags_type
;
209
213
typedef
int(*
input_init_type
)(void);
214
218
typedef
void(*
input_shutdown_type
)(void);
219
223
typedef
void
*
input_plugin_handle_type
;
224
233
typedef
float(*
input_can_handle_type
)(
const
char
*path);
234
240
typedef
int(*
input_open_type
)(
input_object
*obj,
const
char
*path);
241
246
typedef
void(*
input_close_type
)(
input_object
*obj);
247
256
typedef
int(*
input_play_frame_type
)(
input_object
*obj,
char
*buffer);
257
264
typedef
int(*
input_frame_seek_type
)(
input_object
*obj,
int
frame);
265
271
typedef
int(*
input_frame_size_type
)(
input_object
*obj);
272
277
typedef
int(*
input_nr_frames_type
)(
input_object
*obj);
278
286
typedef
long(*
input_frame_to_sec_type
)(
input_object
*obj ,
int
frame);
287
293
typedef
int(*
input_sample_rate_type
)(
input_object
*obj);
294
300
typedef
int(*
input_channels_type
)(
input_object
*obj);
301
309
typedef
int(*
input_stream_info_type
)(
input_object
*obj,
stream_info
*info);
310
315
typedef
int(*
input_nr_tracks_type
)(
input_object
*obj);
316
317
/* @param obj input object
318
* @param track track to seek to
319
*
320
* Seek to a track. Optional
321
*/
322
typedef
int(*
input_track_seek_type
)(
input_object
*obj,
int
track);
323
324
325
typedef
struct
_input_plugin
326
{
330
input_version_type
version
;
334
input_flags_type
flags
;
338
char
*
name
;
343
char
*
author
;
347
void
*
handle
;
348
input_init_type
init
;
349
input_shutdown_type
shutdown
;
350
input_plugin_handle_type
plugin_handle
;
351
input_can_handle_type
can_handle
;
352
input_open_type
open
;
353
input_close_type
close
;
354
input_play_frame_type
play_frame
;
355
input_frame_seek_type
frame_seek
;
356
input_frame_size_type
frame_size
;
357
input_nr_frames_type
nr_frames
;
358
input_frame_to_sec_type
frame_to_sec
;
359
input_sample_rate_type
sample_rate
;
360
input_channels_type
channels
;
361
input_stream_info_type
stream_info
;
362
input_nr_tracks_type
nr_tracks
;
363
input_track_seek_type
track_seek
;
364
}
input_plugin
;
365
373
typedef
input_plugin
*(*input_plugin_info_type)(void);
374
375
#endif
Generated on Fri Oct 31 2014 21:36:02 for AlsaPlayer by
1.8.1.2