Commit 7207273e authored by conrad's avatar conrad

add oggz_content_type() public API function:

 * Return human-readable string representation of a content type


git-svn-id: http://svn.annodex.net/liboggz/trunk@3633 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 5c85bc62
......@@ -563,6 +563,15 @@ int oggz_get_numtracks (OGGZ * oggz);
*/
long oggz_serialno_new (OGGZ * oggz);
/**
* Return human-readable string representation of a content type
*
* \retval string the name of the content type
* \retval NULL \a content invalid
*/
const char *
oggz_content_type (OggzStreamContent content);
#include <oggz/oggz_off_t.h>
#include <oggz/oggz_read.h>
#include <oggz/oggz_stream.h>
......
......@@ -88,6 +88,8 @@
oggz_packet_destroy;
oggz_content_type;
local:
*;
};
......@@ -617,3 +617,11 @@ oggz_map_return_value_to_error (int cb_ret)
}
}
const char *
oggz_content_type (OggzStreamContent content)
{
if (content < 0 || content >= OGGZ_CONTENT_UNKNOWN)
return NULL;
return oggz_auto_codec_ident[content].content_type;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment