Commit 1c6ceb5c authored by Zeeshan Ali's avatar Zeeshan Ali

The first attempt to support MAS. Dont expect it to work :)

Original commit message from CVS:
The first attempt to support MAS. Dont expect it to work :)
parent 0d1b9d28
......@@ -497,6 +497,15 @@ GST_CHECK_FEATURE(DVDNAV, [dvdnav library], dvdnavsrc, [
AS_SCRUB_INCLUDE(DVDNAV_CFLAGS)
])
dnl *** MAS ***
translit(dnm, m, l) AM_CONDITIONAL(USE_MAS, true)
GST_CHECK_FEATURE(MAS, [mas library], massink, [
translit(dnm, m, l) AC_SUBST(MAS_LIBS)
translit(dnm, m, l) AC_SUBST(MAS_CFLAGS)
GST_CHECK_CONFIGPROG(MAS, mas-config)
AS_SCRUB_INCLUDE(MAS_CFLAGS)
])
dnl **** ESound ****
translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink esdmon, [
......@@ -1097,6 +1106,7 @@ ext/lcs/Makefile
ext/libfame/Makefile
ext/libpng/Makefile
ext/mad/Makefile
ext/mas/Makefile
ext/mikmod/Makefile
ext/mjpegtools/Makefile
ext/mpeg2dec/Makefile
......
......@@ -64,6 +64,12 @@ else
ESD_DIR=
endif
if USE_MAS
MAS_DIR=mas
else
MAS_DIR=
endif
## if USE_FESTIVAL
## FESTIVAL_DIR=festival
## else
......@@ -253,7 +259,7 @@ endif
SUBDIRS=$(A52DEC_DIR) $(AALIB_DIR) $(ALSA_DIR) \
$(ARTS_DIR) $(ARTSC_DIR) $(AUDIOFILE_DIR) \
$(AVIFILE_DIR) $(CDPARANOIA_DIR) \
$(DVDREAD_DIR) $(DVDNAV_DIR) $(ESD_DIR) \
$(DVDREAD_DIR) $(DVDNAV_DIR) $(ESD_DIR) $(MAS_DIR) \
$(FFMPEG_DIR) $(FLAC_DIR) $(GNOMEVFS_DIR) $(GSM_DIR) \
$(HERMES_DIR) $(HTTP_DIR) $(JACK_DIR) $(JPEG_DIR) \
$(LADSPA_DIR) $(LAME_DIR) $(LCS_DIR) \
......@@ -268,7 +274,7 @@ DIST_SUBDIRS=\
a52dec aalib alsa \
arts artsd avifile \
audiofile cdparanoia dv \
dvdread dvdnav esd ffmpeg \
dvdread dvdnav esd mas ffmpeg \
flac gnomevfs gsm \
hermes http jack jpeg \
ladspa lame lcs libfame libpng \
......
plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
plugin_LTLIBRARIES = libgstmassink.la
libgstmassink_la_SOURCES = massink.c
libgstmassink_la_CFLAGS = $(GST_CFLAGS) $(MAS_CFLAGS)
libgstmassink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(MAS_LIBS)
noinst_HEADERS = massink.h
EXTRA_DIST = README
This diff is collapsed.
This diff is collapsed.
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* 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.
*/
#ifndef __GST_MASSINK_H__
#define __GST_MASSINK_H__
#include <gst/gst.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <mas/mas.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define GST_TYPE_MASSINK \
(gst_massink_get_type())
#define GST_MASSINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MASSINK,GstMassink))
#define GST_MASSINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MASSINK,GstMassink))
#define GST_IS_MASSINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MASSINK))
#define GST_IS_MASSINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MASSINK))
typedef enum {
GST_MASSINK_OPEN = GST_ELEMENT_FLAG_LAST,
GST_MASSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
} GstMasSinkFlags;
typedef struct _GstMassink GstMassink;
typedef struct _GstMassinkClass GstMassinkClass;
struct _GstMassink {
GstElement element;
GstPad *sinkpad;
gboolean mute;
gint format;
gint depth;
gint channels;
gint frequency;
gchar *host;
mas_channel_t audio_channel;
mas_port_t mix_sink;
mas_port_t srate_source, srate_sink;
mas_port_t audio_source, audio_sink;
mas_port_t endian_sink, endian_source;
mas_port_t squant_sink, squant_source;
mas_port_t open_source; /* (!) */
mas_device_t endian;
mas_device_t srate;
mas_device_t squant;
struct mas_data *data;
GstClock *clock;
};
struct _GstMassinkClass {
GstElementClass parent_class;
};
GType gst_massink_get_type(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GST_MASSINK_H__ */
......@@ -21,6 +21,10 @@
#include <string.h>
#ifdef __MMX__
#include <mmx.h>
#endif
#define GST_TYPE_VIDEO_CROP \
(gst_video_crop_get_type())
#define GST_VIDEO_CROP(obj) \
......@@ -281,17 +285,22 @@ gst_video_crop_i420 (GstVideoCrop *video_crop, GstBuffer *src_buffer, GstBuffer
guint8 *srcY, *srcU, *srcV;
guint8 *destY, *destU, *destV;
gint width = video_crop->crop_width;
gint crop_height = video_crop->crop_height;
gint src_stride = video_crop->width;
gint frame_size = video_crop->width * video_crop->height;
gint crop_height;
gint j;
srcY = GST_BUFFER_DATA (src_buffer) + (src_stride * video_crop->crop_y + video_crop->crop_x);
destY = GST_BUFFER_DATA (dest_buffer);
crop_height = video_crop->crop_height;
/* copy Y plane first */
for (j = crop_height; j; j--) {
memcpy (destY, srcY, width);
srcY += src_stride;
destY += width;
}
for (j = crop_height; j; j--) {
memcpy (destY, srcY, width);
srcY += src_stride;
......
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