summaryrefslogtreecommitdiff
path: root/src/libreal/xine_real_video_decoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libreal/xine_real_video_decoder.c')
-rw-r--r--src/libreal/xine_real_video_decoder.c47
1 files changed, 16 insertions, 31 deletions
diff --git a/src/libreal/xine_real_video_decoder.c b/src/libreal/xine_real_video_decoder.c
index ea1fc8c54..28fddafda 100644
--- a/src/libreal/xine_real_video_decoder.c
+++ b/src/libreal/xine_real_video_decoder.c
@@ -15,9 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- * $Id: xine_decoder.c,v 1.93 2007/03/17 15:45:41 dgp85 Exp $
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
* thin layer to use real binary-only codecs in xine
*
@@ -39,10 +37,10 @@
#define LOG
*/
#include "bswap.h"
-#include "xine_internal.h"
-#include "video_out.h"
-#include "buffer.h"
-#include "xineutils.h"
+#include <xine/xine_internal.h>
+#include <xine/video_out.h>
+#include <xine/buffer.h>
+#include <xine/xineutils.h>
#include "real_common.h"
@@ -194,8 +192,8 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) {
_x_abort();
}
- init_data.w = BE_16(&buf->content[12]);
- init_data.h = BE_16(&buf->content[14]);
+ init_data.w = _X_BE_16(&buf->content[12]);
+ init_data.h = _X_BE_16(&buf->content[14]);
this->width = (init_data.w + 1) & (~1);
this->height = (init_data.h + 1) & (~1);
@@ -209,8 +207,8 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) {
* much resemblence to the actual frequency of frames in the file. Hence
* it's better to just let the engine estimate the frame duration for us */
#if 0
- this->fps = (double) BE_16(&buf->content[22]) +
- ((double) BE_16(&buf->content[24]) / 65536.0);
+ this->fps = (double) _X_BE_16(&buf->content[22]) +
+ ((double) _X_BE_16(&buf->content[24]) / 65536.0);
this->duration = 90000.0 / this->fps;
#endif
@@ -227,8 +225,8 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) {
_x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_RATIO, this->ratio*10000);
_x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->duration);
- init_data.subformat = BE_32(&buf->content[26]);
- init_data.format = BE_32(&buf->content[30]);
+ init_data.subformat = _X_BE_32(&buf->content[26]);
+ init_data.format = _X_BE_32(&buf->content[30]);
#ifdef LOG
printf ("libreal: init_data for rvyuv_init:\n");
@@ -268,7 +266,7 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) {
this->rvyuv_custom_message (&cmsg_data, this->context);
}
- this->stream->video_out->open(this->stream->video_out, this->stream);
+ (this->stream->video_out->open) (this->stream->video_out, this->stream);
this->frame_size = this->width * this->height;
this->frame_buffer = xine_xmalloc (this->width * this->height * 3 / 2);
@@ -512,19 +510,6 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen,
/*
* real plugin class
*/
-
-static char *get_identifier (video_decoder_class_t *this) {
- return "realvdec";
-}
-
-static char *get_description (video_decoder_class_t *this) {
- return "real binary-only codec based video decoder plugin";
-}
-
-static void dispose_class (video_decoder_class_t *this) {
- free (this);
-}
-
void *init_realvdec (xine_t *xine, void *data) {
real_class_t *this;
@@ -533,9 +518,9 @@ void *init_realvdec (xine_t *xine, void *data) {
this = (real_class_t *) xine_xmalloc (sizeof (real_class_t));
this->decoder_class.open_plugin = open_plugin;
- this->decoder_class.get_identifier = get_identifier;
- this->decoder_class.get_description = get_description;
- this->decoder_class.dispose = dispose_class;
+ this->decoder_class.identifier = "realvdec";
+ this->decoder_class.description = N_("real binary-only codec based video decoder plugin");
+ this->decoder_class.dispose = default_video_decoder_class_dispose;
_x_real_codecs_init(xine);
@@ -546,7 +531,7 @@ void *init_realvdec (xine_t *xine, void *data) {
* exported plugin catalog entry
*/
-static uint32_t supported_types[] = { BUF_VIDEO_RV20,
+static const uint32_t supported_types[] = { BUF_VIDEO_RV20,
BUF_VIDEO_RV30,
BUF_VIDEO_RV40,
0 };