2004-11-07 18:30:06 +00:00
|
|
|
/* GStreamer Musepack decoder plugin
|
|
|
|
* Copyright (C) 2004 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "gstmusepackreader.h"
|
|
|
|
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
static mpc_int32_t
|
|
|
|
gst_musepack_reader_peek (void *this, void *ptr, mpc_int32_t size)
|
2004-11-07 18:30:06 +00:00
|
|
|
{
|
2005-11-22 15:09:28 +00:00
|
|
|
GstMusepackDec *musepackdec = GST_MUSEPACK_DEC (this);
|
|
|
|
GstBuffer *buf = NULL;
|
2004-11-07 18:30:06 +00:00
|
|
|
gint read;
|
|
|
|
|
2005-11-22 15:09:28 +00:00
|
|
|
if (musepackdec->eos) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2004-11-07 18:30:06 +00:00
|
|
|
do {
|
2005-11-22 15:09:28 +00:00
|
|
|
if (GST_FLOW_OK != gst_pad_pull_range (musepackdec->sinkpad,
|
|
|
|
musepackdec->offset, size, &buf)) {
|
|
|
|
return 0;
|
|
|
|
}
|
2004-11-07 18:30:06 +00:00
|
|
|
|
2005-11-22 15:09:28 +00:00
|
|
|
read = GST_BUFFER_SIZE (buf);
|
2004-11-07 18:30:06 +00:00
|
|
|
|
2005-11-22 15:09:28 +00:00
|
|
|
if (musepackdec->eos ||
|
|
|
|
musepackdec->flush_pending || musepackdec->seek_pending) {
|
|
|
|
break;
|
2004-11-07 18:30:06 +00:00
|
|
|
}
|
2005-11-22 15:09:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* FIX ME: do i have to handle those event in sink_event? */
|
|
|
|
/* we pipeline doesnt stop after receive EOS */
|
|
|
|
/*
|
|
|
|
|
|
|
|
if (read != size) {
|
|
|
|
GstEvent *event;
|
|
|
|
guint32 remaining;
|
|
|
|
|
|
|
|
gst_bytestream_get_status (bs, &remaining, &event);
|
|
|
|
if (!event) {
|
|
|
|
GST_ELEMENT_ERROR (gst_pad_get_parent (bs->pad),
|
|
|
|
RESOURCE, READ, (NULL), (NULL));
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (GST_EVENT_TYPE (event)) {
|
|
|
|
case GST_EVENT_INTERRUPT:
|
|
|
|
gst_event_unref (event);
|
|
|
|
goto done;
|
|
|
|
case GST_EVENT_EOS:
|
|
|
|
gst_event_unref (event);
|
|
|
|
goto done;
|
|
|
|
case GST_EVENT_FLUSH:
|
|
|
|
gst_event_unref (event);
|
|
|
|
break;
|
|
|
|
case GST_EVENT_DISCONTINUOUS:
|
|
|
|
gst_event_unref (event);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
gst_pad_event_default (bs->pad, event);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
2004-11-07 18:30:06 +00:00
|
|
|
} while (read != size);
|
|
|
|
|
|
|
|
if (read != 0) {
|
2005-11-22 15:09:28 +00:00
|
|
|
memcpy (ptr, GST_BUFFER_DATA (buf), read);
|
2004-11-07 18:30:06 +00:00
|
|
|
}
|
2005-11-22 15:09:28 +00:00
|
|
|
gst_buffer_unref (buf);
|
2004-11-07 18:30:06 +00:00
|
|
|
|
|
|
|
return read;
|
|
|
|
}
|
|
|
|
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
static mpc_int32_t
|
|
|
|
gst_musepack_reader_read (void *this, void *ptr, mpc_int32_t size)
|
2004-11-07 18:30:06 +00:00
|
|
|
{
|
2005-11-22 15:09:28 +00:00
|
|
|
GstMusepackDec *musepackdec = GST_MUSEPACK_DEC (this);
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
gint read;
|
|
|
|
|
|
|
|
/* read = peek + flush */
|
|
|
|
if ((read = gst_musepack_reader_peek (this, ptr, size)) > 0) {
|
2005-11-22 15:09:28 +00:00
|
|
|
musepackdec->offset += read;
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return read;
|
|
|
|
}
|
|
|
|
|
2005-11-22 15:09:28 +00:00
|
|
|
static mpc_bool_t
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
gst_musepack_reader_seek (void *this, mpc_int32_t offset)
|
|
|
|
{
|
2005-11-22 15:09:28 +00:00
|
|
|
GstMusepackDec *musepackdec = GST_MUSEPACK_DEC (this);
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
guint8 dummy;
|
2004-11-07 18:30:06 +00:00
|
|
|
|
|
|
|
/* hacky hack - if we're after typefind, we'll fail because
|
|
|
|
* typefind is still typefinding (heh :) ). So read first. */
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
gst_musepack_reader_peek (this, &dummy, 1);
|
2004-11-07 18:30:06 +00:00
|
|
|
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
/* seek */
|
2005-11-22 15:09:28 +00:00
|
|
|
musepackdec->offset = offset;
|
2004-11-07 18:30:06 +00:00
|
|
|
|
|
|
|
/* get discont */
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
if (gst_musepack_reader_peek (this, &dummy, 1) != 1)
|
|
|
|
return FALSE;
|
2004-11-07 18:30:06 +00:00
|
|
|
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
return TRUE;
|
2004-11-07 18:30:06 +00:00
|
|
|
}
|
|
|
|
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
static mpc_int32_t
|
|
|
|
gst_musepack_reader_tell (void *this)
|
2004-11-07 18:30:06 +00:00
|
|
|
{
|
2005-11-22 15:09:28 +00:00
|
|
|
GstMusepackDec *musepackdec = GST_MUSEPACK_DEC (this);
|
|
|
|
GstQuery *query;
|
|
|
|
gint64 position;
|
|
|
|
GstFormat format = GST_FORMAT_BYTES;
|
|
|
|
|
|
|
|
query = gst_query_new_position (GST_FORMAT_BYTES);
|
|
|
|
if (gst_pad_query (musepackdec->sinkpad, query)) {
|
|
|
|
|
|
|
|
gst_query_parse_position (query, &format, &position);
|
|
|
|
|
|
|
|
if (format != GST_FORMAT_BYTES) {
|
|
|
|
GstFormat dest_format = GST_FORMAT_BYTES;
|
|
|
|
|
|
|
|
if (!gst_musepackdec_src_convert (musepackdec->srcpad,
|
|
|
|
format, position, &dest_format, &position)) {
|
|
|
|
position = -1;
|
|
|
|
}
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
|
2005-11-22 15:09:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
position = -1;
|
|
|
|
}
|
|
|
|
gst_query_unref (query);
|
|
|
|
|
|
|
|
return position;
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static mpc_int32_t
|
|
|
|
gst_musepack_reader_get_size (void *this)
|
|
|
|
{
|
2005-11-22 15:09:28 +00:00
|
|
|
GstMusepackDec *musepackdec = GST_MUSEPACK_DEC (this);
|
|
|
|
GstQuery *query;
|
|
|
|
gint64 duration;
|
|
|
|
GstFormat format = GST_FORMAT_BYTES;
|
|
|
|
|
|
|
|
query = gst_query_new_duration (GST_FORMAT_BYTES);
|
|
|
|
if (gst_pad_query (musepackdec->sinkpad, query)) {
|
|
|
|
|
|
|
|
gst_query_parse_duration (query, &format, &duration);
|
|
|
|
|
|
|
|
if (format != GST_FORMAT_BYTES) {
|
|
|
|
GstFormat dest_format = GST_FORMAT_BYTES;
|
|
|
|
|
|
|
|
if (!gst_musepackdec_src_convert (musepackdec->srcpad,
|
|
|
|
format, duration, &dest_format, &duration)) {
|
|
|
|
duration = -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
duration = -1;
|
|
|
|
}
|
|
|
|
gst_query_unref (query);
|
|
|
|
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
|
2005-11-22 15:09:28 +00:00
|
|
|
return duration;
|
2004-11-07 18:30:06 +00:00
|
|
|
}
|
|
|
|
|
2005-11-22 15:09:28 +00:00
|
|
|
static mpc_bool_t
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
gst_musepack_reader_canseek (void *this)
|
2004-11-07 18:30:06 +00:00
|
|
|
{
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
return TRUE;
|
2004-11-07 18:30:06 +00:00
|
|
|
}
|
|
|
|
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
void
|
2005-11-22 15:09:28 +00:00
|
|
|
gst_musepack_init_reader (mpc_reader * r, GstMusepackDec * musepackdec)
|
2004-11-07 18:30:06 +00:00
|
|
|
{
|
2005-11-22 15:09:28 +00:00
|
|
|
r->data = musepackdec;
|
Update to 1.1 API (#165446).
Original commit message from CVS:
* configure.ac:
* ext/musepack/Makefile.am:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_class_init),
(gst_musepackdec_init), (gst_musepackdec_dispose),
(gst_musepackdec_src_query), (gst_musepackdec_src_convert),
(gst_musepack_stream_init), (gst_musepackdec_loop),
(gst_musepackdec_change_state):
* ext/musepack/gstmusepackdec.cpp:
* ext/musepack/gstmusepackdec.h:
* ext/musepack/gstmusepackreader.c: (gst_musepack_reader_peek),
(gst_musepack_reader_read), (gst_musepack_reader_seek),
(gst_musepack_reader_tell), (gst_musepack_reader_get_size),
(gst_musepack_reader_canseek), (gst_musepack_init_reader):
* ext/musepack/gstmusepackreader.cpp:
* ext/musepack/gstmusepackreader.h:
Update to 1.1 API (#165446).
2005-01-29 01:28:34 +00:00
|
|
|
|
|
|
|
r->read = gst_musepack_reader_read;
|
|
|
|
r->seek = gst_musepack_reader_seek;
|
|
|
|
r->tell = gst_musepack_reader_tell;
|
|
|
|
r->get_size = gst_musepack_reader_get_size;
|
|
|
|
r->canseek = gst_musepack_reader_canseek;
|
2004-11-07 18:30:06 +00:00
|
|
|
}
|