mod_musicindex  1.4.1
playlist-vorbis.c File Reference

Ogg files management system. More...

#include "playlist.h"
#include "playlist-vorbis.h"
#include <vorbis/codec.h>
#include <vorbis/vorbisfile.h>

Go to the source code of this file.

Functions

static short ogg_ext_check (const char *const filename)
 Checks for valid OGG filename extension.
mu_entmake_ogg_entry (request_rec *r, apr_pool_t *pool, FILE *const in, const char *const filename)
 Fills in the information fields about OGG data.

Detailed Description

Ogg files management system.

Author
Regis Boudin
Thibaut Varene
Version
Revision:
1010
Date
2003-2005
2007

This file contains everything needed to produce music entries from Ogg Vorbis files.

Definition in file playlist-vorbis.c.

Function Documentation

mu_ent* make_ogg_entry ( request_rec *  r,
apr_pool_t pool,
FILE *const  in,
const char *const  filename 
)

Fills in the information fields about OGG data.

This function reads the ogg tags (using libvorbisfile) from the ogg file in and fills in the struct mu_ent fields accordingly.

Parameters
poolPool
inogg file to parse (closed on normal exit)
filenamecurrent filename
rApache request_rec struct to handle log writings (debugging)
Returns
When possible, struct mu_ent correctly set up, file stream closed.

Definition at line 70 of file playlist-vorbis.c.

References mu_ent::album, apr_pstrdup, mu_ent::artist, mu_ent::bitrate, mu_ent::date, EF_VBR, mu_ent::filetype, mu_ent::flags, mu_ent::freq, FT_OGG, mu_ent::genre, mu_ent::length, MI_QUICKPL, mu_ent::mtime, musicindex_module, NEW_ENT, ogg_ext_check(), mu_config::options, mu_ent::posn, mu_ent::size, mu_ent::title, and mu_ent::track.

static short ogg_ext_check ( const char *const  filename)
inlinestatic

Checks for valid OGG filename extension.

Parameters
filenameThe filename to check.
Returns
FALSE when the extension is correct, TRUE otherwise.

Definition at line 48 of file playlist-vorbis.c.

References FALSE, and TRUE.

Referenced by make_ogg_entry().