decoder/OggUtil: add struct forward declarations

This commit is contained in:
Max Kellermann 2013-01-08 01:02:06 +01:00
parent 960b9a9664
commit b83d069266
2 changed files with 8 additions and 5 deletions

View File

@ -23,7 +23,7 @@
bool bool
OggFeed(ogg_sync_state &oy, struct decoder *decoder, OggFeed(ogg_sync_state &oy, struct decoder *decoder,
struct input_stream *input_stream, size_t size) input_stream *input_stream, size_t size)
{ {
char *buffer = ogg_sync_buffer(&oy, size); char *buffer = ogg_sync_buffer(&oy, size);
if (buffer == nullptr) if (buffer == nullptr)
@ -40,7 +40,7 @@ OggFeed(ogg_sync_state &oy, struct decoder *decoder,
bool bool
OggExpectPage(ogg_sync_state &oy, ogg_page &page, OggExpectPage(ogg_sync_state &oy, ogg_page &page,
struct decoder *decoder, struct input_stream *input_stream) decoder *decoder, input_stream *input_stream)
{ {
while (true) { while (true) {
int r = ogg_sync_pageout(&oy, &page); int r = ogg_sync_pageout(&oy, &page);

View File

@ -26,14 +26,17 @@
#include <stddef.h> #include <stddef.h>
struct input_stream;
struct decoder;
/** /**
* Feed data from the #input_stream into the #ogg_sync_state. * Feed data from the #input_stream into the #ogg_sync_state.
* *
* @return false on error or end-of-file * @return false on error or end-of-file
*/ */
bool bool
OggFeed(ogg_sync_state &oy, struct decoder *decoder, OggFeed(ogg_sync_state &oy, struct decoder *decoder, input_stream *is,
struct input_stream *input_stream, size_t size); size_t size);
/** /**
* Feed into the #ogg_sync_state until a page gets available. Garbage * Feed into the #ogg_sync_state until a page gets available. Garbage
@ -43,6 +46,6 @@ OggFeed(ogg_sync_state &oy, struct decoder *decoder,
*/ */
bool bool
OggExpectPage(ogg_sync_state &oy, ogg_page &page, OggExpectPage(ogg_sync_state &oy, ogg_page &page,
struct decoder *decoder, struct input_stream *input_stream); decoder *decoder, input_stream *input_stream);
#endif #endif