|
AlsaPlayer 0.99.80
|
#include "stream_info.h"#include <pthread.h>Go to the source code of this file.
Data Structures | |
| struct | _input_object |
| struct | _input_plugin |
Defines | |
| #define | P_SEEK 1 |
| #define | P_PERFECTSEEK 2 |
| #define | P_REENTRANT 4 |
| #define | P_FILEBASED 8 |
| #define | P_STREAMBASED 16 |
| #define | P_BUFFERING 32 |
| #define | INPUT_PLUGIN_BASE_VERSION 0x1000 |
| #define | INPUT_PLUGIN_VERSION (INPUT_PLUGIN_BASE_VERSION + 16) |
Typedefs | |
| typedef struct _input_object | input_object |
| typedef int | input_version_type |
| typedef int | input_flags_type |
| typedef int(* | input_init_type )(void) |
| typedef void(* | input_shutdown_type )(void) |
| typedef void * | input_plugin_handle_type |
| typedef float(* | input_can_handle_type )(const char *path) |
| typedef int(* | input_open_type )(input_object *obj, const char *path) |
| typedef void(* | input_close_type )(input_object *obj) |
| typedef int(* | input_play_frame_type )(input_object *obj, char *buffer) |
| typedef int(* | input_frame_seek_type )(input_object *obj, int frame) |
| typedef int(* | input_frame_size_type )(input_object *obj) |
| typedef int(* | input_nr_frames_type )(input_object *obj) |
| typedef long(* | input_frame_to_sec_type )(input_object *obj, int frame) |
| typedef int(* | input_sample_rate_type )(input_object *obj) |
| typedef int(* | input_channels_type )(input_object *obj) |
| typedef int(* | input_stream_info_type )(input_object *obj, stream_info *info) |
| typedef int(* | input_nr_tracks_type )(input_object *obj) |
| typedef int(* | input_track_seek_type )(input_object *obj, int track) |
| typedef struct _input_plugin | input_plugin |
| typedef input_plugin *(* | input_plugin_info_type )(void) |
| #define INPUT_PLUGIN_BASE_VERSION 0x1000 |
The base version number of the scope plugin. Set at 0x1000.
| #define INPUT_PLUGIN_VERSION (INPUT_PLUGIN_BASE_VERSION + 16) |
The version of the input plugin API. This should be incremented whenever structural changes are made to the API. This value should only be changed by the maintainers.
| #define P_BUFFERING 32 |
Set minimal buffer
| #define P_FILEBASED 8 |
Set this flag if the stream is file based (local disk file)
| #define P_PERFECTSEEK 2 |
Set this flag if your plugin is able to do sample accurate seeking in the stream. This is required for reverse speed playback.
| #define P_REENTRANT 4 |
Set this flag if your plugin is reentrant.
| #define P_SEEK 1 |
Set this flag if your plugin is able to seek in the stream
| #define P_STREAMBASED 16 |
Set this if the stream is a real stream e.g. HTTP or UDP based
| typedef float(* input_can_handle_type)(const char *path) |
| path | Path to stream |
Returns a rating between 0.0 and 1.0 for how well this plugin can handle the given path 1.0 = Excellent 0.0 = Huh?
| typedef int(* input_channels_type)(input_object *obj) |
| obj | input object |
Returns number of channels in the stream
| typedef void(* input_close_type)(input_object *obj) |
| obj | input object |
Close stream
| typedef int input_flags_type |
Capability flags for this plugin
| typedef int(* input_frame_seek_type)(input_object *obj, int frame) |
| obj | input object |
| frame | Seek to a specific frame number |
| typedef int(* input_frame_size_type)(input_object *obj) |
| obj | input object |
Returns the frame size in bytes
| typedef long(* input_frame_to_sec_type)(input_object *obj,int frame) |
| obj | input object |
| frame | frame number |
Returns the offset from the start time in centiseconds (100th of a second) for the frame given.
| typedef int(* input_init_type)(void) |
Init plugin
| typedef int(* input_nr_frames_type)(input_object *obj) |
| obj | input object |
Returns the total number of frames in the stream
| typedef int(* input_nr_tracks_type)(input_object *obj) |
| obj | input object |
Return number of tracks. Optional
| typedef struct _input_object input_object |
This is a structure that keeps frequently used parameters of an input instance. It also contains a pointer to any local_data that might be allocated by the plugin itself.
| typedef int(* input_open_type)(input_object *obj, const char *path) |
| obj | input object |
| path | path of stream to open |
Open stream
| typedef int(* input_play_frame_type)(input_object *obj, char *buffer) |
| obj | input object |
| buffer | buffer where we should write the frame to |
Play/decode a single frame. This function should write exactly one frame to the buffer. If there is not enough PCM data to fill the frame it should be padded with zeros (silence).
| typedef struct _input_plugin input_plugin |
| typedef void* input_plugin_handle_type |
Handle for plugin. Filled in by the host
| typedef input_plugin*(* input_plugin_info_type)(void) |
Every input plugin should have an input_plugin_info() function that returns a pointer to an input_plugin structure that is set up with pointers to your implementations. If your plugin is compiled using C++ make sure you 'extern "C"' the input_plugin_info() function or else the HOST will not be able to load the plugin.
| typedef int(* input_sample_rate_type)(input_object *obj) |
| obj | input object |
Returns the sample rate of the stream
| typedef void(* input_shutdown_type)(void) |
Prepare the plugin for removal
| typedef int(* input_stream_info_type)(input_object *obj, stream_info *info) |
| obj | input object |
| info | pointer to stream_info structure |
Return stream info of the current stream. You should not allocate space for the stream_info structure. The HOST will take care of that.
| typedef int(* input_track_seek_type)(input_object *obj, int track) |
| typedef int input_version_type |
input plugin binary version. Must be set to INPUT_PLUGIN_VERSION
1.7.4