mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 15:12:58 +00:00
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 :)
This commit is contained in:
parent
1655534c37
commit
94885fb105
4 changed files with 31 additions and 5 deletions
10
configure.ac
10
configure.ac
|
@ -497,6 +497,15 @@ GST_CHECK_FEATURE(DVDNAV, [dvdnav library], dvdnavsrc, [
|
||||||
AS_SCRUB_INCLUDE(DVDNAV_CFLAGS)
|
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 ****
|
dnl **** ESound ****
|
||||||
translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
|
translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
|
||||||
GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink esdmon, [
|
GST_CHECK_FEATURE(ESD, [esound plug-ins], esdsink esdmon, [
|
||||||
|
@ -1097,6 +1106,7 @@ ext/lcs/Makefile
|
||||||
ext/libfame/Makefile
|
ext/libfame/Makefile
|
||||||
ext/libpng/Makefile
|
ext/libpng/Makefile
|
||||||
ext/mad/Makefile
|
ext/mad/Makefile
|
||||||
|
ext/mas/Makefile
|
||||||
ext/mikmod/Makefile
|
ext/mikmod/Makefile
|
||||||
ext/mjpegtools/Makefile
|
ext/mjpegtools/Makefile
|
||||||
ext/mpeg2dec/Makefile
|
ext/mpeg2dec/Makefile
|
||||||
|
|
|
@ -64,6 +64,12 @@ else
|
||||||
ESD_DIR=
|
ESD_DIR=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if USE_MAS
|
||||||
|
MAS_DIR=mas
|
||||||
|
else
|
||||||
|
MAS_DIR=
|
||||||
|
endif
|
||||||
|
|
||||||
## if USE_FESTIVAL
|
## if USE_FESTIVAL
|
||||||
## FESTIVAL_DIR=festival
|
## FESTIVAL_DIR=festival
|
||||||
## else
|
## else
|
||||||
|
@ -253,7 +259,7 @@ endif
|
||||||
SUBDIRS=$(A52DEC_DIR) $(AALIB_DIR) $(ALSA_DIR) \
|
SUBDIRS=$(A52DEC_DIR) $(AALIB_DIR) $(ALSA_DIR) \
|
||||||
$(ARTS_DIR) $(ARTSC_DIR) $(AUDIOFILE_DIR) \
|
$(ARTS_DIR) $(ARTSC_DIR) $(AUDIOFILE_DIR) \
|
||||||
$(AVIFILE_DIR) $(CDPARANOIA_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) \
|
$(FFMPEG_DIR) $(FLAC_DIR) $(GNOMEVFS_DIR) $(GSM_DIR) \
|
||||||
$(HERMES_DIR) $(HTTP_DIR) $(JACK_DIR) $(JPEG_DIR) \
|
$(HERMES_DIR) $(HTTP_DIR) $(JACK_DIR) $(JPEG_DIR) \
|
||||||
$(LADSPA_DIR) $(LAME_DIR) $(LCS_DIR) \
|
$(LADSPA_DIR) $(LAME_DIR) $(LCS_DIR) \
|
||||||
|
@ -268,7 +274,7 @@ DIST_SUBDIRS=\
|
||||||
a52dec aalib alsa \
|
a52dec aalib alsa \
|
||||||
arts artsd avifile \
|
arts artsd avifile \
|
||||||
audiofile cdparanoia dv \
|
audiofile cdparanoia dv \
|
||||||
dvdread dvdnav esd ffmpeg \
|
dvdread dvdnav esd mas ffmpeg \
|
||||||
flac gnomevfs gsm \
|
flac gnomevfs gsm \
|
||||||
hermes http jack jpeg \
|
hermes http jack jpeg \
|
||||||
ladspa lame lcs libfame libpng \
|
ladspa lame lcs libfame libpng \
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef __MMX__
|
||||||
|
#include <mmx.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GST_TYPE_VIDEO_CROP \
|
#define GST_TYPE_VIDEO_CROP \
|
||||||
(gst_video_crop_get_type())
|
(gst_video_crop_get_type())
|
||||||
#define GST_VIDEO_CROP(obj) \
|
#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 *srcY, *srcU, *srcV;
|
||||||
guint8 *destY, *destU, *destV;
|
guint8 *destY, *destU, *destV;
|
||||||
gint width = video_crop->crop_width;
|
gint width = video_crop->crop_width;
|
||||||
|
gint crop_height = video_crop->crop_height;
|
||||||
gint src_stride = video_crop->width;
|
gint src_stride = video_crop->width;
|
||||||
gint frame_size = video_crop->width * video_crop->height;
|
gint frame_size = video_crop->width * video_crop->height;
|
||||||
gint crop_height;
|
|
||||||
gint j;
|
gint j;
|
||||||
|
|
||||||
srcY = GST_BUFFER_DATA (src_buffer) + (src_stride * video_crop->crop_y + video_crop->crop_x);
|
srcY = GST_BUFFER_DATA (src_buffer) + (src_stride * video_crop->crop_y + video_crop->crop_x);
|
||||||
destY = GST_BUFFER_DATA (dest_buffer);
|
destY = GST_BUFFER_DATA (dest_buffer);
|
||||||
|
|
||||||
crop_height = video_crop->crop_height;
|
|
||||||
|
|
||||||
/* copy Y plane first */
|
/* 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--) {
|
for (j = crop_height; j; j--) {
|
||||||
memcpy (destY, srcY, width);
|
memcpy (destY, srcY, width);
|
||||||
srcY += src_stride;
|
srcY += src_stride;
|
||||||
|
|
|
@ -285,6 +285,7 @@ gst_wavenc_chain (GstPad *pad,
|
||||||
|
|
||||||
outbuf = gst_buffer_new_and_alloc (WAV_HEADER_LEN);
|
outbuf = gst_buffer_new_and_alloc (WAV_HEADER_LEN);
|
||||||
memcpy (GST_BUFFER_DATA (outbuf), wavenc->header, WAV_HEADER_LEN);
|
memcpy (GST_BUFFER_DATA (outbuf), wavenc->header, WAV_HEADER_LEN);
|
||||||
|
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
|
||||||
|
|
||||||
gst_pad_push (wavenc->srcpad, outbuf);
|
gst_pad_push (wavenc->srcpad, outbuf);
|
||||||
wavenc->flush_header = FALSE;
|
wavenc->flush_header = FALSE;
|
||||||
|
|
Loading…
Reference in a new issue