Unverified Commit cd2f3a7f authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

remove page callback

parent b293fe71
......@@ -71,8 +71,6 @@ extern "C" {
#define OPE_GET_SERIALNO_REQUEST 14007
#define OPE_SET_PACKET_CALLBACK_REQUEST 14008
#define OPE_GET_PACKET_CALLBACK_REQUEST 14009
#define OPE_SET_PAGE_CALLBACK_REQUEST 14010
#define OPE_GET_PAGE_CALLBACK_REQUEST 14011
#define OPE_SET_DECISION_DELAY(x) OPE_SET_DECISION_DELAY_REQUEST, __opus_check_int(x)
#define OPE_GET_DECISION_DELAY(x) OPE_GET_DECISION_DELAY_REQUEST, __opus_check_int_ptr(x)
......@@ -85,8 +83,6 @@ extern "C" {
/* FIXME: Add type-checking macros to these. */
#define OPE_SET_PACKET_CALLBACK(x) OPE_SET_PACKET_CALLBACK_REQUEST, (x)
#define OPE_GET_PACKET_CALLBACK(x) OPE_GET_PACKET_CALLBACK_REQUEST, (x)
#define OPE_SET_PAGE_CALLBACK(x) OPE_SET_PAGE_CALLBACK_REQUEST, (x)
#define OPE_GET_PAGE_CALLBACK(x) OPE_GET_PAGE_CALLBACK_REQUEST, (x)
typedef int (*ope_write_func)(void *user_data, const unsigned char *ptr, int len);
......@@ -94,8 +90,6 @@ typedef int (*ope_close_func)(void *user_data);
typedef int (*ope_packet_func)(void *user_data, const unsigned char *packet_ptr, int packet_len, opus_uint32 flags);
typedef int (*ope_page_func)(void *user_data, int page_len, opus_uint32 flags);
/** Callback functions for accessing the stream. */
typedef struct {
/** Callback for writing to the stream. */
......
......@@ -110,7 +110,6 @@ struct OggOpusEnc {
int chaining_keyframe_length;
OpusEncCallbacks callbacks;
ope_packet_func packet_callback;
ope_page_func page_callback;
OpusHeader header;
int comment_padding;
EncStream *streams;
......@@ -141,7 +140,6 @@ static int oe_write_page(OggOpusEnc *enc, ogg_page *page, void *user_data)
err = enc->callbacks.write(user_data, page->body, page->body_len);
if (err) return -1;
length = page->header_len+page->body_len;
if (enc->page_callback) enc->page_callback(user_data, length, 0);
return length;
}
......@@ -258,7 +256,6 @@ OggOpusEnc *ope_create_callbacks(const OpusEncCallbacks *callbacks, void *user_d
enc->oggp = NULL;
#endif
enc->packet_callback = NULL;
enc->page_callback = NULL;
enc->rate = rate;
enc->channels = channels;
enc->frame_size = 960;
......@@ -795,13 +792,6 @@ int ope_encoder_ctl(OggOpusEnc *enc, int request, ...) {
ret = OPE_OK;
}
break;
case OPE_SET_PAGE_CALLBACK_REQUEST:
{
ope_page_func value = va_arg(ap, ope_page_func);
enc->page_callback = value;
ret = OPE_OK;
}
break;
default:
return OPE_UNIMPLEMENTED;
}
......
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