Add a function to identify a Stream, for user notification.
This commit is contained in:
10
src/stream.c
10
src/stream.c
@ -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
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user