Add a function to identify a Stream, for user notification.

This commit is contained in:
Vreixo Formoso
2007-12-29 01:58:42 +01:00
parent 5b856cf40b
commit c915c6e3f4
3 changed files with 32 additions and 5 deletions

View File

@ -12,6 +12,7 @@
#include "error.h"
#include <stdlib.h>
#include <string.h>
typedef struct
{
@ -112,6 +113,14 @@ int fsrc_get_id(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id,
return ISO_SUCCESS;
}
static
char *fsrc_get_name(IsoStream *stream)
{
FSrcStreamData *data;
data = (FSrcStreamData*)stream->data;
return strdup(iso_file_source_get_path(data->src));
}
static
void fsrc_free(IsoStream *stream)
{
@ -128,6 +137,7 @@ IsoStreamIface fsrc_stream_class = {
fsrc_read,
fsrc_is_repeatable,
fsrc_get_id,
fsrc_get_name,
fsrc_free
};