From 9b5de053995488d5ddc78c1bf4df651101271d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 21 Dec 2016 11:00:47 +0200 Subject: Remove various unported plugins If they were not ported after 4+ years it seems unlikely that anybody is ever going to need them again. They're still in the GIT history if needed. https://bugzilla.gnome.org/show_bug.cgi?id=774530 --- config.h.meson | 42 - configure.ac | 232 +- docs/plugins/Makefile.am | 10 +- docs/plugins/gst-plugins-bad-plugins-sections.txt | 116 - docs/plugins/gst-plugins-bad-plugins.signals | 32 - ext/Makefile.am | 62 +- ext/apexsink/LGPL-3.0.txt | 165 - ext/apexsink/Makefile.am | 12 - ext/apexsink/gstapexplugin.c | 44 - ext/apexsink/gstapexraop.c | 798 ----- ext/apexsink/gstapexraop.h | 148 - ext/apexsink/gstapexsink.c | 665 ---- ext/apexsink/gstapexsink.h | 98 - ext/libvisual/Makefile.am | 15 - ext/libvisual/visual-gl.c | 1248 ------- ext/meson.build | 9 +- ext/nas/Makefile.am | 11 - ext/nas/nassink.c | 583 ---- ext/nas/nassink.h | 72 - ext/sdl/Makefile.am | 19 - ext/sdl/gstsdl.c | 45 - ext/sdl/sdlaudiosink.c | 439 --- ext/sdl/sdlaudiosink.h | 65 - ext/sdl/sdlvideosink.c | 1006 ------ ext/sdl/sdlvideosink.h | 82 - ext/sndio/Makefile.am | 11 - ext/sndio/gstsndio.c | 53 - ext/sndio/sndiosink.c | 527 --- ext/sndio/sndiosink.h | 67 - ext/sndio/sndiosrc.c | 524 --- ext/sndio/sndiosrc.h | 67 - ext/timidity/Makefile.am | 33 - ext/timidity/README | 3 - ext/timidity/gsttimidity.c | 821 ----- ext/timidity/gsttimidity.h | 84 - ext/timidity/gstwildmidi.c | 1038 ------ ext/timidity/gstwildmidi.h | 90 - ext/wildmidi/Makefile.am | 19 + ext/wildmidi/README | 3 + ext/wildmidi/gstwildmidi.c | 1038 ++++++ ext/wildmidi/gstwildmidi.h | 90 + ext/xvid/Makefile.am | 9 - ext/xvid/gstxvid.c | 371 --- ext/xvid/gstxvid.h | 57 - ext/xvid/gstxviddec.c | 673 ---- ext/xvid/gstxviddec.h | 73 - ext/xvid/gstxvidenc.c | 1403 -------- ext/xvid/gstxvidenc.h | 137 - gst/audiobuffer/Makefile.am | 10 - gst/audiobuffer/gstaudioringbuffer.c | 1178 ------- gst/audiobuffer/meson.build | 12 - gst/cdxaparse/Makefile.am | 24 - gst/cdxaparse/gstcdxaparse.c | 585 ---- gst/cdxaparse/gstcdxaparse.h | 75 - gst/cdxaparse/gstvcdparse.c | 409 --- gst/cdxaparse/gstvcdparse.h | 64 - gst/cdxaparse/meson.build | 13 - gst/dccp/Makefile.am | 25 - gst/dccp/gstdccp.c | 560 ---- gst/dccp/gstdccp.h | 94 - gst/dccp/gstdccp_common.h | 56 - gst/dccp/gstdccpclientsink.c | 335 -- gst/dccp/gstdccpclientsink.h | 82 - gst/dccp/gstdccpclientsrc.c | 405 --- gst/dccp/gstdccpclientsrc.h | 72 - gst/dccp/gstdccpplugin.c | 60 - gst/dccp/gstdccpserversink.c | 465 --- gst/dccp/gstdccpserversink.h | 91 - gst/dccp/gstdccpserversrc.c | 390 --- gst/dccp/gstdccpserversrc.h | 88 - gst/dccp/meson.build | 17 - gst/faceoverlay/Makefile.am | 13 - gst/faceoverlay/gstfaceoverlay.c | 452 --- gst/faceoverlay/gstfaceoverlay.h | 94 - gst/faceoverlay/meson.build | 12 - gst/games/Makefile.am | 13 - gst/games/gstpuzzle.c | 576 ---- gst/games/gstvideoimage.c | 946 ------ gst/games/gstvideoimage.h | 114 - gst/games/meson.build | 13 - gst/hdvparse/Makefile.am | 12 - gst/hdvparse/gsthdvparse.c | 888 ----- gst/hdvparse/gsthdvparse.h | 56 - gst/hdvparse/meson.build | 12 - gst/meson.build | 30 - gst/mixmatrix/Makefile.am | 9 - gst/mixmatrix/meson.build | 12 - gst/mixmatrix/mixmatrix.c | 530 --- gst/mve/Makefile.am | 21 - gst/mve/TODO | 5 - gst/mve/gstmve.c | 46 - gst/mve/gstmvedemux.c | 1153 ------- gst/mve/gstmvedemux.h | 114 - gst/mve/gstmvemux.c | 1486 --------- gst/mve/gstmvemux.h | 127 - gst/mve/meson.build | 20 - gst/mve/mve.h | 62 - gst/mve/mveaudiodec.c | 82 - gst/mve/mveaudioenc.c | 154 - gst/mve/mvevideodec16.c | 849 ----- gst/mve/mvevideodec8.c | 802 ----- gst/mve/mvevideoenc16.c | 1652 ---------- gst/mve/mvevideoenc8.c | 1733 ---------- gst/nuvdemux/Makefile.am | 10 - gst/nuvdemux/gstnuvdemux.c | 940 ------ gst/nuvdemux/gstnuvdemux.h | 173 - gst/nuvdemux/meson.build | 12 - gst/overlay/Makefile.am | 14 - gst/overlay/gstoverlay.c | 357 -- gst/overlay/gstoverlay.h | 67 - gst/overlay/meson.build | 12 - gst/patchdetect/Makefile.am | 19 - gst/patchdetect/gstpatchdetect.c | 1235 ------- gst/patchdetect/gstpatchdetect.h | 58 - gst/patchdetect/meson.build | 12 - gst/rtjpeg/.gitignore | 7 - gst/rtjpeg/Makefile.am | 10 - gst/rtjpeg/README | 12 - gst/rtjpeg/RTjpeg.c | 3448 -------------------- gst/rtjpeg/RTjpeg.h | 52 - gst/rtjpeg/gstrtjpeg.c | 43 - gst/rtjpeg/gstrtjpegdec.c | 123 - gst/rtjpeg/gstrtjpegdec.h | 70 - gst/rtjpeg/gstrtjpegenc.c | 123 - gst/rtjpeg/gstrtjpegenc.h | 71 - gst/rtjpeg/meson.build | 15 - gst/sdi/Makefile.am | 13 - gst/sdi/gstsdi.c | 44 - gst/sdi/gstsdidemux.c | 537 --- gst/sdi/gstsdidemux.h | 76 - gst/sdi/gstsdimux.c | 312 -- gst/sdi/gstsdimux.h | 54 - gst/sdi/meson.build | 13 - gst/tta/Makefile.am | 13 - gst/tta/crc32.h | 114 - gst/tta/filters.h | 110 - gst/tta/gsttta.c | 40 - gst/tta/gstttadec.c | 444 --- gst/tta/gstttadec.h | 84 - gst/tta/gstttaparse.c | 507 --- gst/tta/gstttaparse.h | 79 - gst/tta/meson.build | 14 - gst/tta/ttadec.h | 144 - gst/vbidec/Makefile.am | 10 - gst/vbidec/gstvbidec.c | 381 --- gst/vbidec/gstvbidec.h | 22 - gst/vbidec/meson.build | 14 - gst/vbidec/vbidata.c | 1201 ------- gst/vbidec/vbidata.h | 59 - gst/vbidec/vbiscreen.c | 825 ----- gst/vbidec/vbiscreen.h | 50 - meson.build | 3 - po/POTFILES.in | 3 - po/POTFILES.skip | 3 - sys/Makefile.am | 42 +- sys/avc/Makefile.am | 25 - sys/avc/gstavcplugin.cpp | 41 - sys/avc/gstavcsrc.cpp | 423 --- sys/avc/gstavcsrc.h | 67 - sys/dxr3/.gitignore | 1 - sys/dxr3/Makefile.am | 30 - sys/dxr3/ac3_padder.c | 254 -- sys/dxr3/ac3_padder.h | 129 - sys/dxr3/dxr3audiosink.c | 740 ----- sys/dxr3/dxr3audiosink.h | 112 - sys/dxr3/dxr3common.h | 39 - sys/dxr3/dxr3init.c | 56 - sys/dxr3/dxr3marshal.list | 5 - sys/dxr3/dxr3spusink.c | 513 --- sys/dxr3/dxr3spusink.h | 86 - sys/dxr3/dxr3videosink.c | 717 ---- sys/dxr3/dxr3videosink.h | 96 - sys/linsys/Makefile.am | 26 - sys/linsys/gstlinsys.c | 47 - sys/linsys/gstlinsyssdisink.c | 488 --- sys/linsys/gstlinsyssdisink.h | 59 - sys/linsys/gstlinsyssdisrc.c | 551 ---- sys/linsys/gstlinsyssdisrc.h | 62 - sys/linsys/include/asi.h | 255 -- sys/linsys/include/master.h | 69 - sys/linsys/include/sdi.h | 115 - sys/linsys/include/sdiaudio.h | 149 - sys/linsys/include/sdivideo.h | 155 - sys/meson.build | 7 - sys/pvr2d/Makefile.am | 22 - sys/pvr2d/gstpvr.c | 113 - sys/pvr2d/gstpvr.h | 46 - sys/pvr2d/gstpvrbufferpool.c | 381 --- sys/pvr2d/gstpvrbufferpool.h | 83 - sys/pvr2d/gstpvrvideosink.c | 1479 --------- sys/pvr2d/gstpvrvideosink.h | 153 - sys/pvr2d/pvr_includes/dri2_ws.h | 176 - sys/pvr2d/pvr_includes/img_defs.h | 123 - sys/pvr2d/pvr_includes/img_types.h | 143 - sys/pvr2d/pvr_includes/pvr2d.h | 669 ---- sys/pvr2d/pvr_includes/services.h | 1211 ------- sys/pvr2d/pvr_includes/servicesext.h | 855 ----- sys/pvr2d/pvr_includes/wsegl.h | 285 -- sys/qcam/Makefile.am | 12 - sys/qcam/dark.c | 258 -- sys/qcam/exposure.c | 287 -- sys/qcam/gstqcamsrc.c | 445 --- sys/qcam/gstqcamsrc.h | 78 - sys/qcam/qcam-Linux.c | 277 -- sys/qcam/qcam-Linux.h | 32 - sys/qcam/qcam-lib.c | 849 ----- sys/qcam/qcam-os.c | 277 -- sys/qcam/qcam-os.h | 32 - sys/qcam/qcam.h | 134 - sys/qcam/qcamip.h | 67 - sys/wininet/Makefile.am | 11 - sys/wininet/gstwininetsrc.c | 450 --- sys/wininet/gstwininetsrc.h | 69 - tests/check/Makefile.am | 18 +- tests/check/elements/timidity.c | 74 - tests/icles/dccp/README | 52 - tests/icles/dccp/call/DCCPClient.c | 152 - tests/icles/dccp/call/DCCPServer.c | 145 - tests/icles/dccp/call/README | 1 - tests/icles/dccp/file/DCCPClientSaveFile.c | 113 - tests/icles/dccp/file/DCCPServerSendFile.c | 112 - tests/icles/dccp/mic/DCCPClientPlayMic.c | 116 - tests/icles/dccp/mic/DCCPServerMic.c | 111 - tests/icles/dccp/mp3/DCCPClientPlayMP3.c | 117 - tests/icles/dccp/mp3/DCCPServerSendMP3.c | 113 - tests/icles/dccp/mp3Speex/DCCPClientPlaySpeexMP3.c | 120 - tests/icles/dccp/mp3Speex/DCCPServerSendSpeexMP3.c | 128 - .../icles/dccp/mp3Stream/DCCPClientPlayMP3Stream.c | 113 - .../icles/dccp/mp3Stream/DCCPServerSendMP3Stream.c | 113 - 229 files changed, 1164 insertions(+), 57269 deletions(-) delete mode 100644 ext/apexsink/LGPL-3.0.txt delete mode 100644 ext/apexsink/Makefile.am delete mode 100644 ext/apexsink/gstapexplugin.c delete mode 100644 ext/apexsink/gstapexraop.c delete mode 100644 ext/apexsink/gstapexraop.h delete mode 100644 ext/apexsink/gstapexsink.c delete mode 100644 ext/apexsink/gstapexsink.h delete mode 100644 ext/libvisual/Makefile.am delete mode 100644 ext/libvisual/visual-gl.c delete mode 100644 ext/nas/Makefile.am delete mode 100644 ext/nas/nassink.c delete mode 100644 ext/nas/nassink.h delete mode 100644 ext/sdl/Makefile.am delete mode 100644 ext/sdl/gstsdl.c delete mode 100644 ext/sdl/sdlaudiosink.c delete mode 100644 ext/sdl/sdlaudiosink.h delete mode 100644 ext/sdl/sdlvideosink.c delete mode 100644 ext/sdl/sdlvideosink.h delete mode 100644 ext/sndio/Makefile.am delete mode 100644 ext/sndio/gstsndio.c delete mode 100644 ext/sndio/sndiosink.c delete mode 100644 ext/sndio/sndiosink.h delete mode 100644 ext/sndio/sndiosrc.c delete mode 100644 ext/sndio/sndiosrc.h delete mode 100644 ext/timidity/Makefile.am delete mode 100644 ext/timidity/README delete mode 100644 ext/timidity/gsttimidity.c delete mode 100644 ext/timidity/gsttimidity.h delete mode 100644 ext/timidity/gstwildmidi.c delete mode 100644 ext/timidity/gstwildmidi.h create mode 100644 ext/wildmidi/Makefile.am create mode 100644 ext/wildmidi/README create mode 100644 ext/wildmidi/gstwildmidi.c create mode 100644 ext/wildmidi/gstwildmidi.h delete mode 100644 ext/xvid/Makefile.am delete mode 100644 ext/xvid/gstxvid.c delete mode 100644 ext/xvid/gstxvid.h delete mode 100644 ext/xvid/gstxviddec.c delete mode 100644 ext/xvid/gstxviddec.h delete mode 100644 ext/xvid/gstxvidenc.c delete mode 100644 ext/xvid/gstxvidenc.h delete mode 100644 gst/audiobuffer/Makefile.am delete mode 100644 gst/audiobuffer/gstaudioringbuffer.c delete mode 100644 gst/audiobuffer/meson.build delete mode 100644 gst/cdxaparse/Makefile.am delete mode 100644 gst/cdxaparse/gstcdxaparse.c delete mode 100644 gst/cdxaparse/gstcdxaparse.h delete mode 100644 gst/cdxaparse/gstvcdparse.c delete mode 100644 gst/cdxaparse/gstvcdparse.h delete mode 100644 gst/cdxaparse/meson.build delete mode 100644 gst/dccp/Makefile.am delete mode 100644 gst/dccp/gstdccp.c delete mode 100644 gst/dccp/gstdccp.h delete mode 100644 gst/dccp/gstdccp_common.h delete mode 100644 gst/dccp/gstdccpclientsink.c delete mode 100644 gst/dccp/gstdccpclientsink.h delete mode 100644 gst/dccp/gstdccpclientsrc.c delete mode 100644 gst/dccp/gstdccpclientsrc.h delete mode 100644 gst/dccp/gstdccpplugin.c delete mode 100644 gst/dccp/gstdccpserversink.c delete mode 100644 gst/dccp/gstdccpserversink.h delete mode 100644 gst/dccp/gstdccpserversrc.c delete mode 100644 gst/dccp/gstdccpserversrc.h delete mode 100644 gst/dccp/meson.build delete mode 100644 gst/faceoverlay/Makefile.am delete mode 100644 gst/faceoverlay/gstfaceoverlay.c delete mode 100644 gst/faceoverlay/gstfaceoverlay.h delete mode 100644 gst/faceoverlay/meson.build delete mode 100644 gst/games/Makefile.am delete mode 100644 gst/games/gstpuzzle.c delete mode 100644 gst/games/gstvideoimage.c delete mode 100644 gst/games/gstvideoimage.h delete mode 100644 gst/games/meson.build delete mode 100644 gst/hdvparse/Makefile.am delete mode 100644 gst/hdvparse/gsthdvparse.c delete mode 100644 gst/hdvparse/gsthdvparse.h delete mode 100644 gst/hdvparse/meson.build delete mode 100644 gst/mixmatrix/Makefile.am delete mode 100644 gst/mixmatrix/meson.build delete mode 100644 gst/mixmatrix/mixmatrix.c delete mode 100644 gst/mve/Makefile.am delete mode 100644 gst/mve/TODO delete mode 100644 gst/mve/gstmve.c delete mode 100644 gst/mve/gstmvedemux.c delete mode 100644 gst/mve/gstmvedemux.h delete mode 100644 gst/mve/gstmvemux.c delete mode 100644 gst/mve/gstmvemux.h delete mode 100644 gst/mve/meson.build delete mode 100644 gst/mve/mve.h delete mode 100644 gst/mve/mveaudiodec.c delete mode 100644 gst/mve/mveaudioenc.c delete mode 100644 gst/mve/mvevideodec16.c delete mode 100644 gst/mve/mvevideodec8.c delete mode 100644 gst/mve/mvevideoenc16.c delete mode 100644 gst/mve/mvevideoenc8.c delete mode 100644 gst/nuvdemux/Makefile.am delete mode 100644 gst/nuvdemux/gstnuvdemux.c delete mode 100644 gst/nuvdemux/gstnuvdemux.h delete mode 100644 gst/nuvdemux/meson.build delete mode 100644 gst/overlay/Makefile.am delete mode 100644 gst/overlay/gstoverlay.c delete mode 100644 gst/overlay/gstoverlay.h delete mode 100644 gst/overlay/meson.build delete mode 100644 gst/patchdetect/Makefile.am delete mode 100644 gst/patchdetect/gstpatchdetect.c delete mode 100644 gst/patchdetect/gstpatchdetect.h delete mode 100644 gst/patchdetect/meson.build delete mode 100644 gst/rtjpeg/.gitignore delete mode 100644 gst/rtjpeg/Makefile.am delete mode 100644 gst/rtjpeg/README delete mode 100644 gst/rtjpeg/RTjpeg.c delete mode 100644 gst/rtjpeg/RTjpeg.h delete mode 100644 gst/rtjpeg/gstrtjpeg.c delete mode 100644 gst/rtjpeg/gstrtjpegdec.c delete mode 100644 gst/rtjpeg/gstrtjpegdec.h delete mode 100644 gst/rtjpeg/gstrtjpegenc.c delete mode 100644 gst/rtjpeg/gstrtjpegenc.h delete mode 100644 gst/rtjpeg/meson.build delete mode 100644 gst/sdi/Makefile.am delete mode 100644 gst/sdi/gstsdi.c delete mode 100644 gst/sdi/gstsdidemux.c delete mode 100644 gst/sdi/gstsdidemux.h delete mode 100644 gst/sdi/gstsdimux.c delete mode 100644 gst/sdi/gstsdimux.h delete mode 100644 gst/sdi/meson.build delete mode 100644 gst/tta/Makefile.am delete mode 100644 gst/tta/crc32.h delete mode 100644 gst/tta/filters.h delete mode 100644 gst/tta/gsttta.c delete mode 100644 gst/tta/gstttadec.c delete mode 100644 gst/tta/gstttadec.h delete mode 100644 gst/tta/gstttaparse.c delete mode 100644 gst/tta/gstttaparse.h delete mode 100644 gst/tta/meson.build delete mode 100644 gst/tta/ttadec.h delete mode 100644 gst/vbidec/Makefile.am delete mode 100644 gst/vbidec/gstvbidec.c delete mode 100644 gst/vbidec/gstvbidec.h delete mode 100644 gst/vbidec/meson.build delete mode 100644 gst/vbidec/vbidata.c delete mode 100644 gst/vbidec/vbidata.h delete mode 100644 gst/vbidec/vbiscreen.c delete mode 100644 gst/vbidec/vbiscreen.h delete mode 100644 sys/avc/Makefile.am delete mode 100644 sys/avc/gstavcplugin.cpp delete mode 100644 sys/avc/gstavcsrc.cpp delete mode 100644 sys/avc/gstavcsrc.h delete mode 100644 sys/dxr3/.gitignore delete mode 100644 sys/dxr3/Makefile.am delete mode 100644 sys/dxr3/ac3_padder.c delete mode 100644 sys/dxr3/ac3_padder.h delete mode 100644 sys/dxr3/dxr3audiosink.c delete mode 100644 sys/dxr3/dxr3audiosink.h delete mode 100644 sys/dxr3/dxr3common.h delete mode 100644 sys/dxr3/dxr3init.c delete mode 100644 sys/dxr3/dxr3marshal.list delete mode 100644 sys/dxr3/dxr3spusink.c delete mode 100644 sys/dxr3/dxr3spusink.h delete mode 100644 sys/dxr3/dxr3videosink.c delete mode 100644 sys/dxr3/dxr3videosink.h delete mode 100644 sys/linsys/Makefile.am delete mode 100644 sys/linsys/gstlinsys.c delete mode 100644 sys/linsys/gstlinsyssdisink.c delete mode 100644 sys/linsys/gstlinsyssdisink.h delete mode 100644 sys/linsys/gstlinsyssdisrc.c delete mode 100644 sys/linsys/gstlinsyssdisrc.h delete mode 100644 sys/linsys/include/asi.h delete mode 100644 sys/linsys/include/master.h delete mode 100644 sys/linsys/include/sdi.h delete mode 100644 sys/linsys/include/sdiaudio.h delete mode 100644 sys/linsys/include/sdivideo.h delete mode 100644 sys/pvr2d/Makefile.am delete mode 100644 sys/pvr2d/gstpvr.c delete mode 100644 sys/pvr2d/gstpvr.h delete mode 100644 sys/pvr2d/gstpvrbufferpool.c delete mode 100644 sys/pvr2d/gstpvrbufferpool.h delete mode 100644 sys/pvr2d/gstpvrvideosink.c delete mode 100644 sys/pvr2d/gstpvrvideosink.h delete mode 100644 sys/pvr2d/pvr_includes/dri2_ws.h delete mode 100644 sys/pvr2d/pvr_includes/img_defs.h delete mode 100644 sys/pvr2d/pvr_includes/img_types.h delete mode 100644 sys/pvr2d/pvr_includes/pvr2d.h delete mode 100644 sys/pvr2d/pvr_includes/services.h delete mode 100644 sys/pvr2d/pvr_includes/servicesext.h delete mode 100644 sys/pvr2d/pvr_includes/wsegl.h delete mode 100644 sys/qcam/Makefile.am delete mode 100644 sys/qcam/dark.c delete mode 100644 sys/qcam/exposure.c delete mode 100644 sys/qcam/gstqcamsrc.c delete mode 100644 sys/qcam/gstqcamsrc.h delete mode 100644 sys/qcam/qcam-Linux.c delete mode 100644 sys/qcam/qcam-Linux.h delete mode 100644 sys/qcam/qcam-lib.c delete mode 100644 sys/qcam/qcam-os.c delete mode 100644 sys/qcam/qcam-os.h delete mode 100644 sys/qcam/qcam.h delete mode 100644 sys/qcam/qcamip.h delete mode 100644 sys/wininet/Makefile.am delete mode 100644 sys/wininet/gstwininetsrc.c delete mode 100644 sys/wininet/gstwininetsrc.h delete mode 100644 tests/check/elements/timidity.c delete mode 100644 tests/icles/dccp/README delete mode 100644 tests/icles/dccp/call/DCCPClient.c delete mode 100644 tests/icles/dccp/call/DCCPServer.c delete mode 100644 tests/icles/dccp/call/README delete mode 100644 tests/icles/dccp/file/DCCPClientSaveFile.c delete mode 100644 tests/icles/dccp/file/DCCPServerSendFile.c delete mode 100644 tests/icles/dccp/mic/DCCPClientPlayMic.c delete mode 100644 tests/icles/dccp/mic/DCCPServerMic.c delete mode 100644 tests/icles/dccp/mp3/DCCPClientPlayMP3.c delete mode 100644 tests/icles/dccp/mp3/DCCPServerSendMP3.c delete mode 100644 tests/icles/dccp/mp3Speex/DCCPClientPlaySpeexMP3.c delete mode 100644 tests/icles/dccp/mp3Speex/DCCPServerSendSpeexMP3.c delete mode 100644 tests/icles/dccp/mp3Stream/DCCPClientPlayMP3Stream.c delete mode 100644 tests/icles/dccp/mp3Stream/DCCPServerSendMP3Stream.c diff --git a/config.h.meson b/config.h.meson index 551e4315c..e24ba97d2 100644 --- a/config.h.meson +++ b/config.h.meson @@ -94,9 +94,6 @@ /* Define to enable Android Media (used by androidmedia). */ #mesondefine HAVE_ANDROID_MEDIA -/* Define to enable AirPort Express Wireless sink (used by apexsink). */ -#mesondefine HAVE_APEXSINK - /* Define to enable Apple video (used by applemedia). */ #mesondefine HAVE_APPLE_MEDIA @@ -229,12 +226,6 @@ /* Define to 1 if you have the header file. */ #mesondefine HAVE_FCNTL_H -/* FIONREAD ioctl found in sys/filio.h */ -#mesondefine HAVE_FIONREAD_IN_SYS_FILIO - -/* FIONREAD ioctl found in sys/ioclt.h */ -#mesondefine HAVE_FIONREAD_IN_SYS_IOCTL - /* Define to enable Flite plugin (used by flite). */ #mesondefine HAVE_FLITE @@ -322,12 +313,6 @@ /* Define if libusb 1.x is installed */ #mesondefine HAVE_LIBUSB -/* Define to enable libvisual visualization library (used by libvisual). */ -#mesondefine HAVE_LIBVISUAL - -/* Define to enable Linear Systems SDI plugin (used by linsys). */ -#mesondefine HAVE_LINSYS - /* Define if we have liblrdf */ #mesondefine HAVE_LRDF @@ -364,9 +349,6 @@ /* Define to enable MythTV client plugins (used by mythtvsrc). */ #mesondefine HAVE_MYTHTV -/* Define to enable nas plug-in (used by nassink). */ -#mesondefine HAVE_NAS - /* Define to enable neon http client plugins (used by neonhttpsrc). */ #mesondefine HAVE_NEON @@ -454,9 +436,6 @@ /* Define to enable Schroedinger video codec (used by schro). */ #mesondefine HAVE_SCHRO -/* Define to enable SDL plug-in (used by sdlvideosink sdlaudiosink). */ -#mesondefine HAVE_SDL - /* Define to enable POSIX shared memory source and sink (used by shm). */ #mesondefine HAVE_SHM @@ -466,9 +445,6 @@ /* Define to enable sndfile plug-in (used by sfdec sfenc). */ #mesondefine HAVE_SNDFILE -/* Define to enable sndio audio (used by sndio). */ -#mesondefine HAVE_SNDIO - /* Define to enable soundtouch plug-in (used by soundtouch). */ #mesondefine HAVE_SOUNDTOUCH @@ -523,9 +499,6 @@ /* Define if libtiger is available */ #mesondefine HAVE_TIGER -/* Define to enable timidity midi soft synth plugin (used by timidity). */ -#mesondefine HAVE_TIMIDITY - /* Define to 1 if you have the header file. */ #mesondefine HAVE_UNISTD_H @@ -574,12 +547,6 @@ /* Define to 1 if you have the header file. */ #mesondefine HAVE_WINDOWS_H -/* Define to enable Windows internet library (used by wininet). */ -#mesondefine HAVE_WININET - -/* Define to 1 if you have the header file. */ -#mesondefine HAVE_WININET_H - /* Define to enable Winks plug-in (used by winks). */ #mesondefine HAVE_WINKS @@ -595,9 +562,6 @@ /* Define if you have X11 library */ #mesondefine HAVE_X11 -/* Define to enable xvid plugins (used by xvid). */ -#mesondefine HAVE_XVID - /* Define to enable ZBar barcode detector (used by zbar). */ #mesondefine HAVE_ZBAR @@ -607,9 +571,6 @@ /* library dir */ #mesondefine LIBDIR -/* directory in which the detected libvisual's plugins are located */ -#mesondefine LIBVISUAL_PLUGINSBASEDIR - /* gettext locale dir */ #mesondefine LOCALEDIR @@ -668,9 +629,6 @@ /* the target CPU */ #mesondefine TARGET_CPU -/* Define location of timidity.cfg */ -#mesondefine TIMIDITY_CFG - /* Use Mali FB EGL platform */ #mesondefine USE_EGL_MALI_FB diff --git a/configure.ac b/configure.ac index 10bdca764..dfe2f9d97 100644 --- a/configure.ac +++ b/configure.ac @@ -164,16 +164,8 @@ AX_CREATE_STDINT_H AC_CHECK_HEADERS([pthread.h], HAVE_PTHREAD_H=yes) AM_CONDITIONAL(HAVE_PTHREAD_H, test "x$HAVE_PTHREAD_H" = "xyes") -if test "x$HAVE_PTHREAD_H" != "xyes"; then - GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/dccp//` -fi - dnl *** checks for types/defines *** -dnl Check for FIONREAD ioctl declaration -dnl used in gst/dccp -GST_CHECK_FIONREAD - dnl *** checks for structures *** dnl *** checks for compiler characteristics *** @@ -467,21 +459,6 @@ dnl used in examples AG_GST_DEFAULT_ELEMENTS dnl *** plug-ins to include *** -dnl Non ported plugins (non-dependant, then dependant) -dnl Make sure you have a space before and after all plugins -GST_PLUGINS_NONPORTED=" cdxaparse \ - dccp faceoverlay \ - hdvparse \ - mve nuvdemux \ - patchdetect \ - sdi tta \ - linsys \ - apexsink \ - nas sdl timidity \ - wininet \ - xvid sndio libvisual" - -AC_SUBST(GST_PLUGINS_NONPORTED) dnl these are all the gst plug-ins, compilable without additional libs AG_GST_CHECK_PLUGIN(accurip) @@ -498,13 +475,10 @@ AG_GST_CHECK_PLUGIN(audiovisualizers) AG_GST_CHECK_PLUGIN(autoconvert) AG_GST_CHECK_PLUGIN(bayer) AG_GST_CHECK_PLUGIN(camerabin2) -AG_GST_CHECK_PLUGIN(cdxaparse) AG_GST_CHECK_PLUGIN(coloreffects) -AG_GST_CHECK_PLUGIN(dccp) AG_GST_CHECK_PLUGIN(debugutils) AG_GST_CHECK_PLUGIN(dvbsuboverlay) AG_GST_CHECK_PLUGIN(dvdspu) -AG_GST_CHECK_PLUGIN(faceoverlay) AG_GST_CHECK_PLUGIN(festival) AG_GST_CHECK_PLUGIN(fieldanalysis) AG_GST_CHECK_PLUGIN(freeverb) @@ -512,7 +486,6 @@ AG_GST_CHECK_PLUGIN(frei0r) AG_GST_CHECK_PLUGIN(gaudieffects) AG_GST_CHECK_PLUGIN(geometrictransform) AG_GST_CHECK_PLUGIN(gdp) -AG_GST_CHECK_PLUGIN(hdvparse) AG_GST_CHECK_PLUGIN(id3tag) AG_GST_CHECK_PLUGIN(inter) AG_GST_CHECK_PLUGIN(interlace) @@ -526,17 +499,13 @@ AG_GST_CHECK_PLUGIN(mpegdemux) AG_GST_CHECK_PLUGIN(mpegtsdemux) AG_GST_CHECK_PLUGIN(mpegtsmux) AG_GST_CHECK_PLUGIN(mpegpsmux) -AG_GST_CHECK_PLUGIN(mve) AG_GST_CHECK_PLUGIN(mxf) AG_GST_CHECK_PLUGIN(netsim) -AG_GST_CHECK_PLUGIN(nuvdemux) AG_GST_CHECK_PLUGIN(onvif) -AG_GST_CHECK_PLUGIN(patchdetect) AG_GST_CHECK_PLUGIN(pcapparse) AG_GST_CHECK_PLUGIN(pnm) AG_GST_CHECK_PLUGIN(rawparse) AG_GST_CHECK_PLUGIN(removesilence) -AG_GST_CHECK_PLUGIN(sdi) AG_GST_CHECK_PLUGIN(sdp) AG_GST_CHECK_PLUGIN(segmentclip) AG_GST_CHECK_PLUGIN(siren) @@ -545,7 +514,6 @@ AG_GST_CHECK_PLUGIN(speed) AG_GST_CHECK_PLUGIN(subenc) AG_GST_CHECK_PLUGIN(stereo) AG_GST_CHECK_PLUGIN(timecode) -AG_GST_CHECK_PLUGIN(tta) AG_GST_CHECK_PLUGIN(videofilters) AG_GST_CHECK_PLUGIN(videoparsers) AG_GST_CHECK_PLUGIN(videosignal) @@ -600,13 +568,6 @@ if test "x$HAVE_WINSOCK2_H" = "xyes"; then AC_SUBST(WINSOCK2_LIBS) fi -if test "x$HAVE_PTHREAD_H" = "xyes"; then - DCCP_LIBS="$DCCP_LIBS $PTHREAD_LIBS" - AC_SUBST(DCCP_LIBS) -else - AG_GST_DISABLE_PLUGIN(dccp) -fi - dnl *** opengl *** AC_ARG_ENABLE([opengl], [ --enable-opengl Enable Desktop OpenGL support @<:@default=auto@:>@], @@ -2098,24 +2059,6 @@ AG_GST_CHECK_FEATURE(VOAACENC, [vo-aacenc library], vo-aacenc, [ AG_GST_PKG_CHECK_MODULES(VOAACENC, vo-aacenc >= 0.1.0) ]) -dnl *** apexsink *** -translit(dnm, m, l) AM_CONDITIONAL(USE_APEXSINK, true) -AG_GST_CHECK_FEATURE(APEXSINK, [AirPort Express Wireless sink], apexsink, [ - PKG_CHECK_MODULES(APEXSINK, [ openssl >= 0.9.5 libcrypto ], [ - HAVE_APEXSINK="yes" - saved_LIBS="$LIBS" - LIBS="" - AC_SEARCH_LIBS(socket, [socket], [ ], [ APEXSINK="no" ]) - AC_SEARCH_LIBS(gethostbyname, [nsl], [ ], [ APEXSINK="no" ]) - APEXSINK_LIBS="$APEXSINK_LIBS $LIBS" - LIBS="$saved_LIBS" - AC_SUBST(APEXSINK_CFLAGS) - AC_SUBST(APEXSINK_LIBS) - ], [ - APEXSINK="no" - ]) -]) - dnl *** bs2b *** translit(dnm, m, l) AM_CONDITIONAL(USE_BS2B, true) AG_GST_CHECK_FEATURE(BS2B, [bs2b], bs2b, [ @@ -2525,19 +2468,6 @@ AG_GST_CHECK_FEATURE(TTML, [TTML plugin], ttml, [ fi ]) -dnl *** linsys *** -translit(dnm, m, l) AM_CONDITIONAL(USE_LINSYS, true) -AG_GST_CHECK_FEATURE(LINSYS, [Linear Systems SDI plugin], linsys, [ - case "$host" in - *-*linux*) - HAVE_LINSYS=yes - ;; - *) - HAVE_LINSYS=no - ;; - esac -]) - dnl *** modplug *** translit(dnm, m, l) AM_CONDITIONAL(USE_MODPLUG, true) AG_GST_CHECK_FEATURE(MODPLUG, modplug, modplug, [ @@ -2745,21 +2675,6 @@ AG_GST_CHECK_FEATURE(MUSEPACK, [musepackdec], musepack, [ ], [HAVE_MUSEPACK="no"])]) ]) -dnl *** nas *** -translit(dnm, m, l) AM_CONDITIONAL(USE_NAS, true) -AG_GST_CHECK_FEATURE(NAS, [nas plug-in], nassink, [ - HAVE_NAS="no" - if test "x$HAVE_X" = "xyes"; then - save_cppflags=$CFLAGS - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - AG_GST_CHECK_LIBHEADER(NAS, audio, AuOpenServer, $X_LIBS, audio/audiolib.h, - NAS_LIBS="$X_LIBS -laudio" NAS_CFLAGS="$X_CFLAGS") - CPPFLAGS="$save_cppflags" - fi - AC_SUBST(NAS_CFLAGS) - AC_SUBST(NAS_LIBS) -]) - dnl *** neon *** translit(dnm, m, l) AM_CONDITIONAL(USE_NEON, true) AG_GST_CHECK_FEATURE(NEON, [neon http client plugins], neonhttpsrc, [ @@ -2901,20 +2816,6 @@ AG_GST_CHECK_FEATURE(OPUS, [opus], opus, [ AC_SUBST(OPUS_LIBS) ]) -dnl *** pvr *** -translit(dnm, m, l) AM_CONDITIONAL(USE_PVR, true) -AG_GST_CHECK_FEATURE(PVR, [pvrvideosink], pvr, [ - PKG_CHECK_MODULES([PVR], [libtimemmgr], HAVE_PVR=yes, HAVE_PVR=no) - AC_SUBST(PVR_CFLAGS) - AC_SUBST(PVR_LIBS) -]) - - AC_ARG_WITH([pvr-external-headers], - AS_HELP_STRING([--with-pvr-external-headers],[Use system installed PVR2D headers]), - [AS_IF([test "x$with_pvr_external_headers" = "xno"], - [PVR_CFLAGS="$PVR_CFLAGS -I\$(srcdir)/pvr_includes"])], - [PVR_CFLAGS="$PVR_CFLAGS -I\$(srcdir)/pvr_includes"]) - dnl *** rsvg *** translit(dnm, m, l) AM_CONDITIONAL(USE_RSVG, true) AG_GST_CHECK_FEATURE(RSVG, [rsvg decoder], rsvg, [ @@ -3077,50 +2978,6 @@ AG_GST_CHECK_FEATURE(VULKAN, [Vulkan elements], vulkan, [ ], []) ]) -dnl *** libvisual *** -translit(dnm, m, l) AM_CONDITIONAL(USE_LIBVISUAL, true) -AG_GST_CHECK_FEATURE(LIBVISUAL, [libvisual visualization library], libvisual, [ - AG_GST_PKG_CHECK_MODULES(LIBVISUAL, libvisual-0.4 >= 0.4.0) - if test x$HAVE_LIBVISUAL = xyes; then - LIBVIS_PLUGINSDIR="`$PKG_CONFIG --variable=pluginsbasedir libvisual-0.4`" - fi - AC_MSG_NOTICE([libvisual pluginsdir: $LIBVIS_PLUGINSDIR]) - if test x$LIBVIS_PLUGINSDIR != x; then - AC_DEFINE_UNQUOTED(LIBVISUAL_PLUGINSBASEDIR, - "$LIBVIS_PLUGINSDIR", - [directory in which the detected libvisual's plugins are located]) - fi -]) - -dnl *** timidity *** -translit(dnm, m, l) AM_CONDITIONAL(USE_TIMIDITY, true) -AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [ - PKG_CHECK_MODULES(TIMIDITY, libtimidity, [ - HAVE_TIMIDITY="yes", - AC_MSG_CHECKING([for timidity.cfg]) - timidity_cfg="" - if test -r /etc/timidity.cfg; then - timidity_cfg=/etc/timidity.cfg - elif test -r /etc/timidity/timidity.cfg; then - timidity_cfg=/etc/timidity/timidity.cfg - elif test -r /usr/share/timidity/timidity.cfg; then - timidity_cfg=/usr/share/timidity/timidity.cfg - elif test -r /usr/local/share/timidity/timidity.cfg; then - timidity_cfg=/usr/local/share/timidity/timidity.cfg - fi - if test "x$timidity_cfg" != "x"; then - AC_MSG_RESULT($timidity_cfg) - AC_DEFINE_UNQUOTED(TIMIDITY_CFG, "$timidity_cfg", [Define location of timidity.cfg]) - else - AC_MSG_RESULT([not found]) - fi - ], [ - HAVE_TIMIDITY="no" - ]) - AC_SUBST(TIMIDITY_CFLAGS) - AC_SUBST(TIMIDITY_LIBS) -]) - dnl *** teletextdec *** translit(dnm, m, l) AM_CONDITIONAL(USE_TELETEXTDEC, true) AG_GST_CHECK_FEATURE(TELETEXTDEC, [Teletext decoder], teletextdec, [ @@ -3149,12 +3006,6 @@ AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [ AC_SUBST(WILDMIDI_LIBS) ]) -dnl *** SDL *** -translit(dnm, m, l) AM_CONDITIONAL(USE_SDL, true) -AG_GST_CHECK_FEATURE(SDL, [SDL plug-in], sdlvideosink sdlaudiosink, [ - AM_PATH_SDL(, HAVE_SDL=yes, HAVE_SDL=no) -]) - dnl **** Smooth Streaming **** translit(dnm, m, l) AM_CONDITIONAL(USE_SMOOTHSTREAMING, true) AG_GST_CHECK_FEATURE(SMOOTHSTREAMING, [Smooth Streaming plug-in], smoothstreaming, [ @@ -3247,36 +3098,6 @@ AG_GST_CHECK_FEATURE(GME, [gme decoder], gme, [ fi ]) -dnl *** XVID *** -translit(dnm, m, l) AM_CONDITIONAL(USE_XVID, true) -AG_GST_CHECK_FEATURE(XVID, [xvid plugins], xvid, [ - HAVE_XVID=no - AC_CHECK_HEADER(xvid.h, [ - OLD_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBM" - AC_CHECK_LIB(xvidcore, xvid_encore, [ - AC_CHECK_LIB(xvidcore, xvid_decore, [ - AC_CHECK_LIB(xvidcore, xvid_global, [ - AC_MSG_CHECKING([for up-to-date XviD API version]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ - #if XVID_API_MAJOR(XVID_API) != 4 - #error "Incompatible XviD API version" - #endif - #if XVID_API_MAJOR(XVID_API) == 4 && XVID_API_MINOR(XVID_API) < 3 - #error "Incompatible XviD API version" - #endif - ]])],[ AC_MSG_RESULT(yes) - XVID_LIBS="-lxvidcore $LIBM" - AC_SUBST(XVID_LIBS) - HAVE_XVID=yes - ],[AC_MSG_RESULT(no) ]) - ], ) - ], ) - ], ) - LIBS="$OLD_LIBS" - ], ) -]) - dnl *** dvb *** translit(dnm, m, l) AM_CONDITIONAL(USE_DVB, true) AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [ @@ -3295,16 +3116,6 @@ AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [ ], [HAVE_DVB="no"]) ]) -dnl *** wininet *** -translit(dnm, m, l) AM_CONDITIONAL(USE_WININET, true) -AG_GST_CHECK_FEATURE(WININET, [Windows internet library], wininet, [ - AC_MSG_CHECKING([Checking for windows internet support]) - AC_CHECK_HEADERS([windows.h wininet.h], - [HAVE_WININET="yes"], [HAVE_WININET="no"], - [AC_INCLUDES_DEFAULT -#include ]) -]) - dnl *** acm *** translit(dnm, m, l) AM_CONDITIONAL(USE_ACM, true) AG_GST_CHECK_FEATURE(ACM, [Windows ACM library], acm, [ @@ -3398,19 +3209,6 @@ AG_GST_CHECK_FEATURE(SPANDSP, [Spandsp], spandsp, [ AC_SUBST(SPANDSP_CFLAGS) AC_SUBST(SPANDSP_LIBS) -dnl *** sndio *** -translit(dnm, m, l) AM_CONDITIONAL(USE_SNDIO, true) -AG_GST_CHECK_FEATURE(SNDIO, [sndio audio], sndio, [ - AC_CHECK_HEADER(sndio.h, HAVE_SNDIO="yes", HAVE_SNDIO="no") - if test "x$HAVE_SNDIO" = "xyes"; then - AC_CHECK_LIB(sndio, sio_open, HAVE_SNDIO="yes", HAVE_SNDIO="no") - if test "x$HAVE_SNDIO" = "xyes"; then - SNDIO_LIBS=-lsndio - AC_SUBST(SNDIO_LIBS) - fi - fi -]) - dnl *** hls-crypto *** AC_ARG_WITH([hls-crypto], AS_HELP_STRING([--with-hls-crypto=auto|nettle|libgcrypt|openssl], [ @@ -3509,7 +3307,6 @@ dnl but we still need to set the conditionals AM_CONDITIONAL(USE_ASSRENDER, false) AM_CONDITIONAL(USE_VOAMRWBENC, false) AM_CONDITIONAL(USE_VOAACENC, false) -AM_CONDITIONAL(USE_APEXSINK, false) AM_CONDITIONAL(USE_BS2B, false) AM_CONDITIONAL(USE_BZ2, false) AM_CONDITIONAL(USE_CHROMAPRINT, false) @@ -3544,12 +3341,10 @@ AM_CONDITIONAL(USE_LADSPA, false) AM_CONDITIONAL(USE_LV2, false) AM_CONDITIONAL(USE_LIBDE265, false) AM_CONDITIONAL(USE_LIBMMS, false) -AM_CONDITIONAL(USE_LINSYS, false) AM_CONDITIONAL(USE_MODPLUG, false) AM_CONDITIONAL(USE_MPEG2ENC, false) AM_CONDITIONAL(USE_MPLEX, false) AM_CONDITIONAL(USE_MUSEPACK, false) -AM_CONDITIONAL(USE_NAS, false) AM_CONDITIONAL(USE_NEON, false) AM_CONDITIONAL(USE_OFA, false) AM_CONDITIONAL(USE_OPENAL, false) @@ -3558,12 +3353,8 @@ AM_CONDITIONAL(USE_OPENEXR, false) AM_CONDITIONAL(USE_OPENJPEG, false) AM_CONDITIONAL(USE_OPENNI2, false) AM_CONDITIONAL(USE_OPUS, false) -AM_CONDITIONAL(USE_PVR, false) AM_CONDITIONAL(USE_QT, false) -AM_CONDITIONAL(USE_LIBVISUAL, false) -AM_CONDITIONAL(USE_TIMIDITY, false) AM_CONDITIONAL(USE_WILDMIDI, false) -AM_CONDITIONAL(USE_SDL, false) AM_CONDITIONAL(USE_SMOOTHSTREAMING, false) AM_CONDITIONAL(USE_SNDFILE, false) AM_CONDITIONAL(USE_SOUNDTOUCH, false) @@ -3571,9 +3362,7 @@ AM_CONDITIONAL(USE_SPANDSP, false) AM_CONDITIONAL(USE_SPC, false) AM_CONDITIONAL(USE_SRTP, false) AM_CONDITIONAL(USE_GME, false) -AM_CONDITIONAL(USE_XVID, false) AM_CONDITIONAL(USE_DVB, false) -AM_CONDITIONAL(USE_WININET, false) AM_CONDITIONAL(USE_ACM, false) AM_CONDITIONAL(USE_VDPAU, false) AM_CONDITIONAL(USE_SBC, false) @@ -3582,7 +3371,6 @@ AM_CONDITIONAL(USE_ZBAR, false) AM_CONDITIONAL(USE_RSVG, false) AM_CONDITIONAL(USE_RTMP, false) AM_CONDITIONAL(USE_TELETEXTDEC, false) -AM_CONDITIONAL(USE_SNDIO, false) AM_CONDITIONAL(USE_UVCH264, false) AM_CONDITIONAL(USE_WEBP, false) AM_CONDITIONAL(USE_WEBRTCDSP, false) @@ -3690,13 +3478,10 @@ gst/audiovisualizers/Makefile gst/autoconvert/Makefile gst/bayer/Makefile gst/camerabin2/Makefile -gst/cdxaparse/Makefile gst/coloreffects/Makefile -gst/dccp/Makefile gst/debugutils/Makefile gst/dvbsuboverlay/Makefile gst/dvdspu/Makefile -gst/faceoverlay/Makefile gst/festival/Makefile gst/fieldanalysis/Makefile gst/freeverb/Makefile @@ -3704,7 +3489,6 @@ gst/frei0r/Makefile gst/gaudieffects/Makefile gst/geometrictransform/Makefile gst/gdp/Makefile -gst/hdvparse/Makefile gst/id3tag/Makefile gst/inter/Makefile gst/interlace/Makefile @@ -3719,17 +3503,13 @@ gst/mpegtsdemux/Makefile gst/mpegtsmux/Makefile gst/mpegtsmux/tsmux/Makefile gst/mpegpsmux/Makefile -gst/mve/Makefile gst/mxf/Makefile gst/netsim/Makefile -gst/nuvdemux/Makefile gst/onvif/Makefile -gst/patchdetect/Makefile gst/pcapparse/Makefile gst/pnm/Makefile gst/rawparse/Makefile gst/removesilence/Makefile -gst/sdi/Makefile gst/sdp/Makefile gst/segmentclip/Makefile gst/siren/Makefile @@ -3737,7 +3517,6 @@ gst/smooth/Makefile gst/speed/Makefile gst/subenc/Makefile gst/stereo/Makefile -gst/tta/Makefile gst/timecode/Makefile gst/videofilters/Makefile gst/videoparsers/Makefile @@ -3787,7 +3566,6 @@ sys/dshowvideosink/Makefile sys/dvb/Makefile sys/fbdev/Makefile sys/kms/Makefile -sys/linsys/Makefile sys/msdk/Makefile sys/nvenc/Makefile sys/opensles/Makefile @@ -3796,9 +3574,7 @@ sys/tinyalsa/Makefile sys/uvch264/Makefile sys/vcd/Makefile sys/vdpau/Makefile -sys/pvr2d/Makefile sys/wasapi/Makefile -sys/wininet/Makefile sys/winks/Makefile sys/winscreencap/Makefile tests/Makefile @@ -3835,7 +3611,6 @@ tests/icles/Makefile ext/voamrwbenc/Makefile ext/voaacenc/Makefile ext/assrender/Makefile -ext/apexsink/Makefile ext/bs2b/Makefile ext/bz2/Makefile ext/chromaprint/Makefile @@ -3861,13 +3636,11 @@ ext/ladspa/Makefile ext/lv2/Makefile ext/libde265/Makefile ext/libmms/Makefile -ext/libvisual/Makefile ext/Makefile ext/modplug/Makefile ext/mpeg2enc/Makefile ext/mplex/Makefile ext/musepack/Makefile -ext/nas/Makefile ext/neon/Makefile ext/ofa/Makefile ext/openal/Makefile @@ -3883,23 +3656,20 @@ ext/resindvd/Makefile ext/rtmp/Makefile ext/sbc/Makefile ext/schroedinger/Makefile -ext/sdl/Makefile ext/smoothstreaming/Makefile ext/sndfile/Makefile ext/soundtouch/Makefile ext/spandsp/Makefile -ext/sndio/Makefile ext/srtp/Makefile ext/teletextdec/Makefile ext/gme/Makefile ext/spc/Makefile -ext/timidity/Makefile +ext/wildmidi/Makefile ext/vulkan/Makefile ext/vulkan/xcb/Makefile ext/vulkan/wayland/Makefile ext/webp/Makefile ext/x265/Makefile -ext/xvid/Makefile ext/zbar/Makefile ext/dtls/Makefile ext/webrtcdsp/Makefile diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index 87dbd46f2..69e8f882f 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -103,10 +103,7 @@ EXTRA_HFILES = \ $(top_srcdir)/ext/rtmp/gstrtmpsink.h \ $(top_srcdir)/ext/spandsp/gstspanplc.h \ $(top_srcdir)/ext/spandsp/gstdtmfdetect.h \ - $(top_srcdir)/ext/sdl/sdlaudiosink.h \ - $(top_srcdir)/ext/sdl/sdlvideosink.h \ - $(top_srcdir)/ext/timidity/gsttimidity.h \ - $(top_srcdir)/ext/timidity/gstwildmidi.h \ + $(top_srcdir)/ext/wildmidi/gstwildmidi.h \ $(top_srcdir)/ext/voaacenc/gstvoaacenc.h \ $(top_srcdir)/ext/voamrwbenc/gstvoamrwbenc.h \ $(top_srcdir)/ext/webrtcdsp/gstwebrtcdsp.h \ @@ -121,10 +118,6 @@ EXTRA_HFILES = \ $(top_srcdir)/gst/audiovisualizers/gstwavescope.h \ $(top_srcdir)/gst/camerabin2/gstcamerabin2.h \ $(top_srcdir)/gst/coloreffects/gstcoloreffects.h \ - $(top_srcdir)/gst/dccp/gstdccpclientsink.h \ - $(top_srcdir)/gst/dccp/gstdccpclientsrc.h \ - $(top_srcdir)/gst/dccp/gstdccpserversink.h \ - $(top_srcdir)/gst/dccp/gstdccpserversrc.h \ $(top_srcdir)/gst/debugutils/fpsdisplaysink.h \ $(top_srcdir)/gst/dvdspu/gstdvdspu.h \ $(top_srcdir)/gst/festival/gstfestival.h \ @@ -156,7 +149,6 @@ EXTRA_HFILES = \ $(top_srcdir)/gst/mpegtsmux/mpegtsmux.h \ $(top_srcdir)/gst/mxf/mxfdemux.h \ $(top_srcdir)/gst/mxf/mxfmux.h \ - $(top_srcdir)/gst/nuvdemux/gstnuvdemux.h \ $(top_srcdir)/gst/pcapparse/gstpcapparse.h \ $(top_srcdir)/gst/rawparse/gstaudioparse.h \ $(top_srcdir)/gst/rawparse/gstvideoparse.h \ diff --git a/docs/plugins/gst-plugins-bad-plugins-sections.txt b/docs/plugins/gst-plugins-bad-plugins-sections.txt index 1e4a5cf63..8d420a32c 100644 --- a/docs/plugins/gst-plugins-bad-plugins-sections.txt +++ b/docs/plugins/gst-plugins-bad-plugins-sections.txt @@ -835,62 +835,6 @@ GST_TYPE_DC1394 gst_dc1394_get_type -
-element-dccpclientsink -dccpclientsink -GstDCCPClientSink - -GstDCCPClientSinkClass -GST_DCCP_CLIENT_SINK -GST_DCCP_CLIENT_SINK_CLASS -GST_IS_DCCP_CLIENT_SINK -GST_IS_DCCP_CLIENT_SINK_CLASS -GST_TYPE_DCCP_CLIENT_SINK -gst_dccp_client_sink_get_type -
- -
-element-dccpclientsrc -dccpclientsrc -GstDCCPClientSrc - -GstDCCPClientSrcClass -GST_DCCP_CLIENT_SRC -GST_DCCP_CLIENT_SRC_CLASS -GST_IS_DCCP_CLIENT_SRC -GST_IS_DCCP_CLIENT_SRC_CLASS -GST_TYPE_DCCP_CLIENT_SRC -gst_dccp_client_src_get_type -
- -
-element-dccpserversink -dccpserversink -GstDCCPServerSink - -GstDCCPServerSinkClass -GST_DCCP_SERVER_SINK -GST_DCCP_SERVER_SINK_CLASS -GST_IS_DCCP_SERVER_SINK -GST_IS_DCCP_SERVER_SINK_CLASS -GST_TYPE_DCCP_SERVER_SINK -gst_dccp_server_sink_get_type -
- -
-element-dccpserversrc -dccpserversrc -GstDCCPServerSrc - -GstDCCPServerSrcClass -GST_DCCP_SERVER_SRC -GST_DCCP_SERVER_SRC_CLASS -GST_IS_DCCP_SERVER_SRC -GST_IS_DCCP_SERVER_SRC_CLASS -GST_TYPE_DCCP_SERVER_SRC -gst_dccp_server_src_get_type -
-
element-debugspy debugspy @@ -2817,21 +2761,6 @@ GST_TYPE_NET_SIM gst_net_sim_get_type
-
-element-nuvdemux -nuvdemux -GstNuvDemux - -GstNuvDemuxClass -GstNuvDemuxState -GST_NUV_DEMUX -GST_NUV_DEMUX_CLASS -GST_IS_NUV_DEMUX -GST_IS_NUV_DEMUX_CLASS -GST_TYPE_NUV_DEMUX -gst_nuv_demux_get_type -
-
element-neonhttpsrc neonhttpsrc @@ -3296,37 +3225,6 @@ GST_TYPE_RTP_ONVIF_TIMESTAMP gst_rtp_onvif_timestamp_get_type
-
-element-sdlaudiosink -sdlaudiosink -GstSDLAudioSink - -GstSDLAudioSinkClass -GST_SDLAUDIOSINK -GST_SDLAUDIOSINK_CLASS -GST_IS_SDLAUDIOSINK -GST_IS_SDLAUDIOSINK_CLASS -GST_TYPE_SDLAUDIOSINK -gst_sdlaudio_sink_get_type - -gstsdl_semaphore -
- -
-element-sdlvideosink -sdlvideosink -GstSDLVideoSink - -GstSDLVideoSinkFlags -GstSDLVideoSinkClass -GST_SDLVIDEOSINK -GST_SDLVIDEOSINK_CLASS -GST_IS_SDLVIDEOSINK -GST_IS_SDLVIDEOSINK_CLASS -GST_TYPE_SDLVIDEOSINK -gst_sdlvideosink_get_type -
-
element-sdpdemux sdpdemux @@ -3841,20 +3739,6 @@ GST_TYPE_TONE_GENERATE_SRC gst_tone_generate_src_get_type
-
-element-timidity -timidity -GstTimidity - -GstTimidityClass -GST_TIMIDITY -GST_TIMIDITY_CLASS -GST_IS_TIMIDITY -GST_IS_TIMIDITY_CLASS -GST_TYPE_TIMIDITY -gst_timidity_get_type -
-
element-tunnel tunnel diff --git a/docs/plugins/gst-plugins-bad-plugins.signals b/docs/plugins/gst-plugins-bad-plugins.signals index 7fecee4f1..87145c2ec 100644 --- a/docs/plugins/gst-plugins-bad-plugins.signals +++ b/docs/plugins/gst-plugins-bad-plugins.signals @@ -32,38 +32,6 @@ gint64 arg2 gint64 arg3 - -GstDCCPClientSrc::connected -void -f -GstDCCPClientSrc *gstdccpclientsrc -gint arg1 - - - -GstDCCPServerSink::connected -void -f -GstDCCPServerSink *gstdccpserversink -gint arg1 - - - -GstDCCPClientSink::connected -void -f -GstDCCPClientSink *gstdccpclientsink -gint arg1 - - - -GstDCCPServerSrc::connected -void -f -GstDCCPServerSrc *gstdccpserversrc -gint arg1 - - GstCameraBin::img-done gboolean diff --git a/ext/Makefile.am b/ext/Makefile.am index fdce19efe..534b9ac7b 100644 --- a/ext/Makefile.am +++ b/ext/Makefile.am @@ -10,12 +10,6 @@ else VOAMRWBENC_DIR = endif -if USE_APEXSINK -APEXSINK_DIR = apexsink -else -APEXSINK_DIR = -endif - if USE_BS2B BS2B_DIR=bs2b else @@ -178,12 +172,6 @@ else LIBMMS_DIR= endif -if USE_LIBVISUAL -LIBVISUAL_DIR=libvisual -else -LIBVISUAL_DIR= -endif - if USE_MODPLUG MODPLUG_DIR=modplug else @@ -208,12 +196,6 @@ else MUSEPACK_DIR= endif -if USE_NAS -NAS_DIR=nas -else -NAS_DIR= -endif - if USE_NEON NEON_DIR=neon else @@ -274,18 +256,12 @@ else RSVG_DIR= endif -if USE_TIMIDITY -TIMIDITY_DIR=timidity -endif - if USE_WILDMIDI -TIMIDITY_DIR=timidity +WILDMIDI_DIR=wildmidi endif if !USE_WILDMIDI -if !USE_TIMIDITY -TIMIDITY_DIR= -endif +WILDMIDI_DIR= endif if USE_FLUIDSYNTH @@ -304,12 +280,6 @@ else SCHRO_DIR= endif -if USE_SDL -SDL_DIR=sdl -else -SDL_DIR= -endif - if USE_SMOOTHSTREAMING SMOOTHSTREAMING_DIR = smoothstreaming else @@ -328,12 +298,6 @@ else SNDFILE_DIR= endif -if USE_SNDIO -SNDIO_DIR = sndio -else -SNDIO_DIR = -endif - if USE_SOUNDTOUCH SOUNDTOUCH_DIR=soundtouch else @@ -370,12 +334,6 @@ else TELETEXTDEC_DIR= endif -if USE_XVID -XVID_DIR=xvid -else -XVID_DIR= -endif - if USE_ZBAR ZBAR_DIR=zbar else @@ -434,7 +392,6 @@ SUBDIRS=\ $(VOAACENC_DIR) \ $(ASSRENDER_DIR) \ $(VOAMRWBENC_DIR) \ - $(APEXSINK_DIR) \ $(AUDIOFILE_DIR) \ $(BS2B_DIR) \ $(BZ2_DIR) \ @@ -463,12 +420,10 @@ SUBDIRS=\ $(LV2_DIR) \ $(LIBDE265_DIR) \ $(LIBMMS_DIR) \ - $(LIBVISUAL_DIR) \ $(MODPLUG_DIR) \ $(MPEG2ENC_DIR) \ $(MPLEX_DIR) \ $(MUSEPACK_DIR) \ - $(NAS_DIR) \ $(NEON_DIR) \ $(OFA_DIR) \ $(OPENAL_DIR) \ @@ -481,19 +436,16 @@ SUBDIRS=\ $(RSVG_DIR) \ $(SBC_DIR) \ $(SCHRO_DIR) \ - $(SDL_DIR) \ $(SMOOTHSTREAMING_DIR) \ $(SMOOTHWAVE_DIR) \ $(SNDFILE_DIR) \ - $(SNDIO_DIR) \ $(SOUNDTOUCH_DIR) \ $(SPANDSP_DIR) \ $(GME_DIR) \ $(SPC_DIR) \ $(SRTP_DIR) \ $(TELETEXTDEC_DIR) \ - $(TIMIDITY_DIR) \ - $(XVID_DIR) \ + $(WILDMIDI_DIR) \ $(ZBAR_DIR) \ $(RTMP_DIR) \ $(HLS_DIR) \ @@ -506,7 +458,6 @@ SUBDIRS=\ DIST_SUBDIRS = \ assrender \ - apexsink \ bs2b \ bz2 \ chromaprint \ @@ -527,7 +478,6 @@ DIST_SUBDIRS = \ kate \ libde265 \ libmms \ - libvisual \ lv2 \ daala \ dts \ @@ -538,7 +488,6 @@ DIST_SUBDIRS = \ mpeg2enc \ mplex \ musepack \ - nas \ neon \ ofa \ openal \ @@ -552,20 +501,17 @@ DIST_SUBDIRS = \ resindvd \ sbc \ schroedinger \ - sdl \ smoothstreaming \ sndfile \ - sndio \ soundtouch \ spandsp \ spc \ srtp \ gme \ teletextdec \ - timidity \ + wildmidi \ voaacenc \ voamrwbenc \ - xvid \ zbar \ rtmp \ webp \ diff --git a/ext/apexsink/LGPL-3.0.txt b/ext/apexsink/LGPL-3.0.txt deleted file mode 100644 index fc8a5de7e..000000000 --- a/ext/apexsink/LGPL-3.0.txt +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/ext/apexsink/Makefile.am b/ext/apexsink/Makefile.am deleted file mode 100644 index f799c0794..000000000 --- a/ext/apexsink/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -plugin_LTLIBRARIES = libgstapexsink.la - -libgstapexsink_la_SOURCES = gstapexplugin.c gstapexraop.c gstapexsink.c -libgstapexsink_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \ - $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(APEXSINK_CFLAGS) -libgstapexsink_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \ - -lgstaudio-$(GST_API_VERSION) -lgstinterfaces-$(GST_API_VERSION) \ - $(GST_BASE_LIBS) $(GST_LIBS) $(APEXSINK_LIBS) -libgstapexsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -libgstapexsink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) - -noinst_HEADERS = gstapexraop.h gstapexsink.h diff --git a/ext/apexsink/gstapexplugin.c b/ext/apexsink/gstapexplugin.c deleted file mode 100644 index a6d64a86b..000000000 --- a/ext/apexsink/gstapexplugin.c +++ /dev/null @@ -1,44 +0,0 @@ -/* GStreamer AirPort Express Plugin - * - * Copyright (C) 2008 Jérémie Bernard [GRemi] - * - * gstapexpugin.c - * - * 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., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -static gboolean -plugin_init (GstPlugin * plugin) -{ - return gst_element_register (plugin, GST_APEX_SINK_NAME, GST_RANK_NONE, - GST_TYPE_APEX_SINK); -} - -/* plugin export resolution */ -GST_PLUGIN_DEFINE - (GST_VERSION_MAJOR, - GST_VERSION_MINOR, - apexsink, - "Apple AirPort Express Plugin", - plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/ext/apexsink/gstapexraop.c b/ext/apexsink/gstapexraop.c deleted file mode 100644 index af4f573c0..000000000 --- a/ext/apexsink/gstapexraop.c +++ /dev/null @@ -1,798 +0,0 @@ -/* GStreamer - Remote Audio Access Protocol (RAOP) as used in Apple iTunes to stream music to the Airport Express (ApEx) - - * - * RAOP is based on the Real Time Streaming Protocol (RTSP) but with an extra challenge-response RSA based authentication step. - * This interface accepts RAW PCM data and set it as AES encrypted ALAC while performing emission. - * - * Copyright (C) 2008 Jérémie Bernard [GRemi] - * - * gstapexraop.c - * - * 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., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#include "gstapexraop.h" - -/* private constants */ -#define GST_APEX_RAOP_VOLUME_MIN -144 -#define GST_APEX_RAOP_VOLUME_MAX 0 - -#define GST_APEX_RAOP_HDR_DEFAULT_LENGTH 1024 -#define GST_APEX_RAOP_SDP_DEFAULT_LENGTH 2048 - -const static gchar GST_APEX_RAOP_RSA_PUBLIC_MOD[] = - "59dE8qLieItsH1WgjrcFRKj6eUWqi+bGLOX1HL3U3GhC/j0Qg90u3sG/1CUtwC" - "5vOYvfDmFI6oSFXi5ELabWJmT2dKHzBJKa3k9ok+8t9ucRqMd6DZHJ2YCCLlDR" - "KSKv6kDqnw4UwPdpOMXziC/AMj3Z/lUVX1G7WSHCAWKf1zNS1eLvqr+boEjXuB" - "OitnZ/bDzPHrTOZz0Dew0uowxf/+sG+NCK3eQJVxqcaJ/vEHKIVd2M+5qL71yJ" - "Q+87X6oV3eaYvt3zWZYD6z5vYTcrtij2VZ9Zmni/UAaHqn9JdsBWLUEpVviYnh" - "imNVvYFZeCXg/IdTQ+x4IRdiXNv5hEew=="; - -const static gchar GST_APEX_RAOP_RSA_PUBLIC_EXP[] = "AQAB"; - -const static gchar GST_APEX_RAOP_USER_AGENT[] = - "iTunes/4.6 (Macintosh; U; PPC Mac OS X 10.3)"; - -const static guchar GST_APEX_RAOP_FRAME_HEADER[] = { // Used by gen. 1 - 0x24, 0x00, 0x00, 0x00, - 0xF0, 0xFF, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 -}; - -const static int GST_APEX_RAOP_FRAME_HEADER_SIZE = 16; // Used by gen. 1 -const static int GST_APEX_RTP_FRAME_HEADER_SIZE = 12; // Used by gen. 2 - -const static int GST_APEX_RAOP_ALAC_HEADER_SIZE = 3; - -/* string extra utility */ -static gint -g_strdel (gchar * str, gchar rc) -{ - int i = 0, j = 0, len, num = 0; - len = strlen (str); - while (i < len) { - if (str[i] == rc) { - for (j = i; j < len; j++) - str[j] = str[j + 1]; - len--; - num++; - } else { - i++; - } - } - return num; -} - -/* socket utilities */ -static int -gst_apexraop_send (int desc, void *data, size_t len) -{ - int total = 0, bytesleft = len, n = 0; - - while (total < len) { - n = send (desc, ((const char *) data) + total, bytesleft, 0); - if (n == -1) - break; - total += n; - bytesleft -= n; - } - - return n == -1 ? -1 : total; -} - -static int -gst_apexraop_recv (int desc, void *data, size_t len) -{ - memset (data, 0, len); - return recv (desc, data, len, 0); -} - -/* public opaque handle resolution */ -typedef struct -{ - guchar aes_ky[AES_BLOCK_SIZE]; /* AES random key */ - guchar aes_iv[AES_BLOCK_SIZE]; /* AES random initial vector */ - - guchar url_abspath[16]; /* header url random absolute path addon, ANNOUNCE id */ - gint cseq; /* header rtsp inc cseq */ - guchar cid[24]; /* header client instance id */ - gchar *session; /* header raop negotiated session id, once SETUP performed */ - gchar *ua; /* header user agent */ - - GstApExJackType jack_type; /* APEX connected jack type, once ANNOUNCE performed */ - GstApExJackStatus jack_status; /* APEX connected jack status, once ANNOUNCE performed */ - - GstApExGeneration generation; /* Different devices accept different audio streams */ - GstApExTransportProtocol transport_protocol; /* For media stream, not RAOP/RTSP */ - - gchar *host; /* APEX target ip */ - guint ctrl_port; /* APEX target control port */ - guint data_port; /* APEX negotiated data port, once SETUP performed */ - - int ctrl_sd; /* control socket */ - struct sockaddr_in ctrl_sd_in; - - int data_sd; /* data socket */ - struct sockaddr_in data_sd_in; - - short rtp_seq_num; /* RTP sequence number, used by gen. 2 */ - int rtp_timestamp; /* RTP timestamp, used by gen. 2 */ -} -_GstApExRAOP; - -/* raop apex struct allocation */ -GstApExRAOP * -gst_apexraop_new (const gchar * host, - const guint16 port, - const GstApExGeneration generation, - const GstApExTransportProtocol transport_protocol) -{ - _GstApExRAOP *apexraop; - - apexraop = (_GstApExRAOP *) g_malloc0 (sizeof (_GstApExRAOP)); - - apexraop->host = g_strdup (host); - apexraop->ctrl_port = port; - apexraop->ua = g_strdup (GST_APEX_RAOP_USER_AGENT); - apexraop->jack_type = GST_APEX_JACK_TYPE_UNDEFINED; - apexraop->jack_status = GST_APEX_JACK_STATUS_DISCONNECTED; - apexraop->generation = generation; - apexraop->transport_protocol = transport_protocol; - apexraop->rtp_seq_num = 0; - apexraop->rtp_timestamp = 0; - - return (GstApExRAOP *) apexraop; -} - -/* raop apex struct freeing */ -void -gst_apexraop_free (GstApExRAOP * con) -{ - _GstApExRAOP *conn; - conn = (_GstApExRAOP *) con; - - g_free (conn->host); - g_free (conn->session); - g_free (conn->ua); - g_free (conn); -} - -/* host affectation */ -void -gst_apexraop_set_host (GstApExRAOP * con, const gchar * host) -{ - _GstApExRAOP *conn; - conn = (_GstApExRAOP *) con; - - g_free (conn->host); - conn->host = g_strdup (host); -} - -/* host reader */ -gchar * -gst_apexraop_get_host (GstApExRAOP * con) -{ - _GstApExRAOP *conn; - conn = (_GstApExRAOP *) con; - - return g_strdup (conn->host); -} - -/* control port affectation */ -void -gst_apexraop_set_port (GstApExRAOP * con, const guint16 port) -{ - _GstApExRAOP *conn; - conn = (_GstApExRAOP *) con; - - conn->ctrl_port = port; -} - -/* control port reader */ -guint16 -gst_apexraop_get_port (GstApExRAOP * con) -{ - _GstApExRAOP *conn; - conn = (_GstApExRAOP *) con; - - return conn->ctrl_port; -} - -/* user agent affectation */ -void -gst_apexraop_set_useragent (GstApExRAOP * con, const gchar * useragent) -{ - _GstApExRAOP *conn; - conn = (_GstApExRAOP *) con; - - g_free (conn->ua); - conn->ua = g_strdup (useragent); -} - -/* user agent reader */ -gchar * -gst_apexraop_get_useragent (GstApExRAOP * con) -{ - _GstApExRAOP *conn; - conn = (_GstApExRAOP *) con; - - return g_strdup (conn->ua); -} - -/* raop apex connection sequence */ -GstRTSPStatusCode -gst_apexraop_connect (GstApExRAOP * con) -{ - gchar *ac, *ky, *iv, *s, inaddr[INET_ADDRSTRLEN], - creq[GST_APEX_RAOP_SDP_DEFAULT_LENGTH], - hreq[GST_APEX_RAOP_HDR_DEFAULT_LENGTH], *req; - RSA *rsa; - guchar *mod, *exp, rsakey[512]; - union gst_randbytes - { - struct asvals - { - guint32 url_key; - guint64 conn_id; - guchar challenge[16]; - } v; - guchar buf[4 + 8 + 16]; - } randbuf; - gsize size; - struct sockaddr_in ioaddr; - socklen_t iolen; - GstRTSPStatusCode res; - _GstApExRAOP *conn; - - conn = (_GstApExRAOP *) con; - - if ((conn->ctrl_sd = socket (AF_INET, SOCK_STREAM, 0)) < 0) - return GST_RTSP_STS_DESTINATION_UNREACHABLE; - - conn->ctrl_sd_in.sin_family = AF_INET; - conn->ctrl_sd_in.sin_port = htons (conn->ctrl_port); - - if (!inet_aton (conn->host, &conn->ctrl_sd_in.sin_addr)) { - struct hostent *hp = (struct hostent *) gethostbyname (conn->host); - if (hp == NULL) - return GST_RTSP_STS_DESTINATION_UNREACHABLE; - memcpy (&conn->ctrl_sd_in.sin_addr, hp->h_addr, hp->h_length); - } - - if (connect (conn->ctrl_sd, (struct sockaddr *) &conn->ctrl_sd_in, - sizeof (conn->ctrl_sd_in)) < 0) - return GST_RTSP_STS_DESTINATION_UNREACHABLE; - - RAND_bytes (randbuf.buf, sizeof (randbuf)); - sprintf ((gchar *) conn->url_abspath, "%u", randbuf.v.url_key); - sprintf ((char *) conn->cid, "%16" G_GINT64_MODIFIER "x", randbuf.v.conn_id); - - RAND_bytes (conn->aes_ky, AES_BLOCK_SIZE); - RAND_bytes (conn->aes_iv, AES_BLOCK_SIZE); - - rsa = RSA_new (); - mod = g_base64_decode (GST_APEX_RAOP_RSA_PUBLIC_MOD, &size); - rsa->n = BN_bin2bn (mod, size, NULL); - exp = g_base64_decode (GST_APEX_RAOP_RSA_PUBLIC_EXP, &size); - rsa->e = BN_bin2bn (exp, size, NULL); - size = - RSA_public_encrypt (AES_BLOCK_SIZE, conn->aes_ky, rsakey, rsa, - RSA_PKCS1_OAEP_PADDING); - - ky = g_base64_encode (rsakey, size); - iv = g_base64_encode (conn->aes_iv, AES_BLOCK_SIZE); - g_strdel (ky, '='); - g_strdel (iv, '='); - - iolen = sizeof (struct sockaddr); - getsockname (conn->ctrl_sd, (struct sockaddr *) &ioaddr, &iolen); - inet_ntop (AF_INET, &(ioaddr.sin_addr), inaddr, INET_ADDRSTRLEN); - - ac = g_base64_encode (randbuf.v.challenge, 16); - g_strdel (ac, '='); - - sprintf (creq, - "v=0\r\n" - "o=iTunes %s 0 IN IP4 %s\r\n" - "s=iTunes\r\n" - "c=IN IP4 %s\r\n" - "t=0 0\r\n" - "m=audio 0 RTP/AVP 96\r\n" - "a=rtpmap:96 AppleLossless\r\n" - "a=fmtp:96 %d 0 %d 40 10 14 %d 255 0 0 %d\r\n" - "a=rsaaeskey:%s\r\n" - "a=aesiv:%s\r\n", - conn->url_abspath, - inaddr, - conn->host, - conn->generation == GST_APEX_GENERATION_ONE - ? GST_APEX_RAOP_V1_SAMPLES_PER_FRAME - : GST_APEX_RAOP_V2_SAMPLES_PER_FRAME, - GST_APEX_RAOP_BYTES_PER_CHANNEL * 8, - GST_APEX_RAOP_CHANNELS, GST_APEX_RAOP_BITRATE, ky, iv); - - sprintf (hreq, - "ANNOUNCE rtsp://%s/%s RTSP/1.0\r\n" - "CSeq: %d\r\n" - "Client-Instance: %s\r\n" - "User-Agent: %s\r\n" - "Content-Type: application/sdp\r\n" - "Content-Length: %u\r\n" - "Apple-Challenge: %s\r\n", - conn->host, - conn->url_abspath, ++conn->cseq, conn->cid, conn->ua, - (guint) strlen (creq), ac); - - RSA_free (rsa); - g_free (ky); - g_free (iv); - g_free (ac); - g_free (mod); - g_free (exp); - - req = g_strconcat (hreq, "\r\n", creq, NULL); - - if (gst_apexraop_send (conn->ctrl_sd, req, strlen (req)) <= 0) { - g_free (req); - return GST_RTSP_STS_GONE; - } - - g_free (req); - - if (gst_apexraop_recv (conn->ctrl_sd, hreq, - GST_APEX_RAOP_HDR_DEFAULT_LENGTH) <= 0) - return GST_RTSP_STS_GONE; - - { - int tmp; - sscanf (hreq, "%*s %d", &tmp); - res = (GstRTSPStatusCode) tmp; - } - - if (res != GST_RTSP_STS_OK) - return res; - - s = g_strrstr (hreq, "Audio-Jack-Status"); - - if (s != NULL) { - gchar status[128]; - sscanf (s, "%*s %s", status); - - if (strcmp (status, "connected;") == 0) - conn->jack_status = GST_APEX_JACK_STATUS_CONNECTED; - else if (strcmp (status, "disconnected;") == 0) - conn->jack_status = GST_APEX_JACK_STATUS_DISCONNECTED; - else - conn->jack_status = GST_APEX_JACK_STATUS_UNDEFINED; - - s = g_strrstr (s, "type="); - - if (s != NULL) { - strtok (s, "="); - s = strtok (NULL, "\n"); - - if (strcmp (s, "analog")) - conn->jack_type = GST_APEX_JACK_TYPE_ANALOG; - else if (strcmp (s, "digital")) - conn->jack_type = GST_APEX_JACK_TYPE_DIGITAL; - else - conn->jack_type = GST_APEX_JACK_TYPE_UNDEFINED; - } - } - - sprintf (hreq, - "SETUP rtsp://%s/%s RTSP/1.0\r\n" - "CSeq: %d\r\n" - "Client-Instance: %s\r\n" - "User-Agent: %s\r\n" - "Transport: RTP/AVP/TCP;unicast;interleaved=0-1;mode=record\r\n" - "\r\n", conn->host, conn->url_abspath, ++conn->cseq, conn->cid, conn->ua); - - if (gst_apexraop_send (conn->ctrl_sd, hreq, strlen (hreq)) <= 0) - return GST_RTSP_STS_GONE; - - if (gst_apexraop_recv (conn->ctrl_sd, hreq, - GST_APEX_RAOP_HDR_DEFAULT_LENGTH) <= 0) - return GST_RTSP_STS_GONE; - - { - int tmp; - sscanf (hreq, "%*s %d", &tmp); - res = (GstRTSPStatusCode) tmp; - } - - if (res != GST_RTSP_STS_OK) - return res; - - s = g_strrstr (hreq, "Session"); - - if (s != NULL) { - gchar session[128]; - sscanf (s, "%*s %s", session); - conn->session = g_strdup (session); - } else - return GST_RTSP_STS_PRECONDITION_FAILED; - - s = g_strrstr (hreq, "server_port"); - if (s != NULL) { - sscanf (s, "server_port=%d", &conn->data_port); - } else - return GST_RTSP_STS_PRECONDITION_FAILED; - - sprintf (hreq, - "RECORD rtsp://%s/%s RTSP/1.0\r\n" - "CSeq: %d\r\n" - "Client-Instance: %s\r\n" - "User-Agent: %s\r\n" - "Session: %s\r\n" - "Range: npt=0-\r\n" - "RTP-Info: seq=0;rtptime=0\r\n" - "\r\n", - conn->host, - conn->url_abspath, ++conn->cseq, conn->cid, conn->ua, conn->session); - - if (gst_apexraop_send (conn->ctrl_sd, hreq, strlen (hreq)) <= 0) - return GST_RTSP_STS_GONE; - - if (gst_apexraop_recv (conn->ctrl_sd, hreq, - GST_APEX_RAOP_HDR_DEFAULT_LENGTH) <= 0) - return GST_RTSP_STS_GONE; - - { - int tmp; - sscanf (hreq, "%*s %d", &tmp); - res = (GstRTSPStatusCode) tmp; - } - - if (res != GST_RTSP_STS_OK) - return res; - - if (conn->transport_protocol == GST_APEX_TCP) { - if ((conn->data_sd = socket (AF_INET, SOCK_STREAM, 0)) < 0) - return GST_RTSP_STS_DESTINATION_UNREACHABLE; - } else if (conn->transport_protocol == GST_APEX_UDP) { - if ((conn->data_sd = socket (AF_INET, SOCK_DGRAM, 0)) < 0) - return GST_RTSP_STS_DESTINATION_UNREACHABLE; - } else - return GST_RTSP_STS_METHOD_NOT_ALLOWED; - - conn->data_sd_in.sin_family = AF_INET; - conn->data_sd_in.sin_port = htons (conn->data_port); - - memcpy (&conn->data_sd_in.sin_addr, &conn->ctrl_sd_in.sin_addr, - sizeof (conn->ctrl_sd_in.sin_addr)); - - if (connect (conn->data_sd, (struct sockaddr *) &conn->data_sd_in, - sizeof (conn->data_sd_in)) < 0) - return GST_RTSP_STS_DESTINATION_UNREACHABLE; - - return res; -} - -/* raop apex jack type access */ -GstApExJackType -gst_apexraop_get_jacktype (GstApExRAOP * con) -{ - _GstApExRAOP *conn; - - conn = (_GstApExRAOP *) con; - - if (!conn) - return GST_APEX_JACK_TYPE_UNDEFINED; - - return conn->jack_type; -} - -/* raop apex jack status access */ -GstApExJackStatus -gst_apexraop_get_jackstatus (GstApExRAOP * con) -{ - _GstApExRAOP *conn; - - conn = (_GstApExRAOP *) con; - - if (!conn) - return GST_APEX_JACK_STATUS_UNDEFINED; - - return conn->jack_status; -} - -/* raop apex generation access */ -GstApExGeneration -gst_apexraop_get_generation (GstApExRAOP * con) -{ - _GstApExRAOP *conn; - - conn = (_GstApExRAOP *) con; - - if (!conn) - return GST_APEX_GENERATION_ONE; - - return conn->generation; -} - -/* raop apex transport protocol access */ -GstApExTransportProtocol -gst_apexraop_get_transport_protocol (GstApExRAOP * con) -{ - _GstApExRAOP *conn; - - conn = (_GstApExRAOP *) con; - - if (!conn) - return GST_APEX_TCP; - - return conn->transport_protocol; -} - -/* raop apex sockets close */ -void -gst_apexraop_close (GstApExRAOP * con) -{ - gchar hreq[GST_APEX_RAOP_HDR_DEFAULT_LENGTH]; - _GstApExRAOP *conn; - - conn = (_GstApExRAOP *) con; - - sprintf (hreq, - "TEARDOWN rtsp://%s/%s RTSP/1.0\r\n" - "CSeq: %d\r\n" - "Client-Instance: %s\r\n" - "User-Agent: %s\r\n" - "Session: %s\r\n" - "\r\n", - conn->host, - conn->url_abspath, ++conn->cseq, conn->cid, conn->ua, conn->session); - - gst_apexraop_send (conn->ctrl_sd, hreq, strlen (hreq)); - gst_apexraop_recv (conn->ctrl_sd, hreq, GST_APEX_RAOP_HDR_DEFAULT_LENGTH); - - if (conn->ctrl_sd != 0) - close (conn->ctrl_sd); - if (conn->data_sd != 0) - close (conn->data_sd); -} - -/* raop apex volume set */ -GstRTSPStatusCode -gst_apexraop_set_volume (GstApExRAOP * con, const guint volume) -{ - gint v; - gchar creq[GST_APEX_RAOP_SDP_DEFAULT_LENGTH], - hreq[GST_APEX_RAOP_HDR_DEFAULT_LENGTH], *req, vol[128]; - GstRTSPStatusCode res; - _GstApExRAOP *conn; - - conn = (_GstApExRAOP *) con; - - v = GST_APEX_RAOP_VOLUME_MIN + (GST_APEX_RAOP_VOLUME_MAX - - GST_APEX_RAOP_VOLUME_MIN) * volume / 100.; - sprintf (vol, "volume: %d.000000\r\n", v); - - sprintf (creq, "%s\r\n", vol); - - sprintf (hreq, - "SET_PARAMETER rtsp://%s/%s RTSP/1.0\r\n" - "CSeq: %d\r\n" - "Client-Instance: %s\r\n" - "User-Agent: %s\r\n" - "Session: %s\r\n" - "Content-Type: text/parameters\r\n" - "Content-Length: %u\r\n", - conn->host, - conn->url_abspath, - ++conn->cseq, conn->cid, conn->ua, conn->session, (guint) strlen (creq) - ); - - req = g_strconcat (hreq, "\r\n", creq, NULL); - - if (gst_apexraop_send (conn->ctrl_sd, req, strlen (req)) <= 0) { - g_free (req); - return GST_RTSP_STS_GONE; - } - - g_free (req); - - if (gst_apexraop_recv (conn->ctrl_sd, hreq, - GST_APEX_RAOP_HDR_DEFAULT_LENGTH) <= 0) - return GST_RTSP_STS_GONE; - - { - int tmp; - sscanf (hreq, "%*s %d", &tmp); - res = (GstRTSPStatusCode) tmp; - } - - return res; -} - -/* raop apex raw data alac encapsulation, encryption and emission, http://wiki.multimedia.cx/index.php?title=Apple_Lossless_Audio_Coding */ -static void inline -gst_apexraop_write_bits (guchar * buffer, int data, int numbits, - int *bit_offset, int *byte_offset) -{ - const static guchar masks[] = - { 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF }; - - if (((*bit_offset) != 0) && (((*bit_offset) + numbits) > 8)) { - gint numwritebits; - guchar bitstowrite; - - numwritebits = 8 - (*bit_offset); - bitstowrite = - (guchar) ((data >> (numbits - numwritebits)) << (8 - (*bit_offset) - - numwritebits)); - buffer[(*byte_offset)] |= bitstowrite; - numbits -= numwritebits; - (*bit_offset) = 0; - (*byte_offset)++; - } - - while (numbits >= 8) { - guchar bitstowrite; - - bitstowrite = (guchar) ((data >> (numbits - 8)) & 0xFF); - buffer[(*byte_offset)] |= bitstowrite; - numbits -= 8; - (*bit_offset) = 0; - (*byte_offset)++; - } - - if (numbits > 0) { - guchar bitstowrite; - bitstowrite = - (guchar) ((data & masks[numbits]) << (8 - (*bit_offset) - numbits)); - buffer[(*byte_offset)] |= bitstowrite; - (*bit_offset) += numbits; - if ((*bit_offset) == 8) { - (*byte_offset)++; - (*bit_offset) = 0; - } - } -} - -guint -gst_apexraop_write (GstApExRAOP * con, gpointer rawdata, guint length) -{ - guchar *buffer, *frame_data; - gushort len; - gint bit_offset, byte_offset, i, out_len, res; - EVP_CIPHER_CTX aes_ctx; - _GstApExRAOP *conn = (_GstApExRAOP *) con; - const int frame_header_size = conn->generation == GST_APEX_GENERATION_ONE - ? GST_APEX_RAOP_FRAME_HEADER_SIZE : GST_APEX_RTP_FRAME_HEADER_SIZE; - - buffer = - (guchar *) g_malloc0 (frame_header_size + - GST_APEX_RAOP_ALAC_HEADER_SIZE + length); - - if (conn->generation == GST_APEX_GENERATION_ONE) { - g_assert (frame_header_size == GST_APEX_RAOP_FRAME_HEADER_SIZE); - memcpy (buffer, GST_APEX_RAOP_FRAME_HEADER, frame_header_size); - - len = length + frame_header_size + GST_APEX_RAOP_ALAC_HEADER_SIZE - 4; - - buffer[2] = len >> 8; - buffer[3] = len & 0xff; - } else { - /* Gen. 2 uses RTP-like header (RFC 3550). */ - short network_seq_num; - int network_timestamp, unknown_const; - static gboolean first = TRUE; - - buffer[0] = 0x80; - if (first) { - buffer[1] = 0xe0; - first = FALSE; - } else - buffer[1] = 0x60; - - network_seq_num = htons (conn->rtp_seq_num++); - memcpy (buffer + 2, &network_seq_num, 2); - - network_timestamp = htons (conn->rtp_timestamp); - memcpy (buffer + 4, &network_timestamp, 4); - conn->rtp_timestamp += GST_APEX_RAOP_V2_SAMPLES_PER_FRAME; - - unknown_const = 0xdeadbeef; - memcpy (buffer + 8, &unknown_const, 4); - } - - bit_offset = 0; - byte_offset = 0; - frame_data = buffer + frame_header_size; - - gst_apexraop_write_bits (frame_data, 1, 3, &bit_offset, &byte_offset); /* channels, 0 mono, 1 stereo */ - gst_apexraop_write_bits (frame_data, 0, 4, &bit_offset, &byte_offset); /* unknown */ - gst_apexraop_write_bits (frame_data, 0, 8, &bit_offset, &byte_offset); /* unknown (12 bits) */ - gst_apexraop_write_bits (frame_data, 0, 4, &bit_offset, &byte_offset); - gst_apexraop_write_bits (frame_data, 0, 1, &bit_offset, &byte_offset); /* has size flag */ - gst_apexraop_write_bits (frame_data, 0, 2, &bit_offset, &byte_offset); /* unknown */ - gst_apexraop_write_bits (frame_data, 1, 1, &bit_offset, &byte_offset); /* no compression flag */ - - for (i = 0; i < length; i += 2) { - gst_apexraop_write_bits (frame_data, ((guchar *) rawdata)[i + 1], 8, - &bit_offset, &byte_offset); - gst_apexraop_write_bits (frame_data, ((guchar *) rawdata)[i], 8, - &bit_offset, &byte_offset); - } - - EVP_CIPHER_CTX_init (&aes_ctx); - EVP_CipherInit_ex (&aes_ctx, EVP_aes_128_cbc (), NULL, conn->aes_ky, - conn->aes_iv, AES_ENCRYPT); - EVP_CipherUpdate (&aes_ctx, frame_data, &out_len, frame_data, /*( */ - GST_APEX_RAOP_ALAC_HEADER_SIZE + - length /*) / AES_BLOCK_SIZE * AES_BLOCK_SIZE */ ); - EVP_CIPHER_CTX_cleanup (&aes_ctx); - - res = - gst_apexraop_send (conn->data_sd, buffer, - frame_header_size + GST_APEX_RAOP_ALAC_HEADER_SIZE + length); - - g_free (buffer); - - return (guint) ((res >= - (frame_header_size + - GST_APEX_RAOP_ALAC_HEADER_SIZE)) ? (res - - frame_header_size - GST_APEX_RAOP_ALAC_HEADER_SIZE) : 0); -} - -/* raop apex buffer flush */ -GstRTSPStatusCode -gst_apexraop_flush (GstApExRAOP * con) -{ - gchar hreq[GST_APEX_RAOP_HDR_DEFAULT_LENGTH]; - GstRTSPStatusCode res; - _GstApExRAOP *conn; - - conn = (_GstApExRAOP *) con; - - sprintf (hreq, - "FLUSH rtsp://%s/%s RTSP/1.0\r\n" - "CSeq: %d\r\n" - "Client-Instance: %s\r\n" - "User-Agent: %s\r\n" - "Session: %s\r\n" - "RTP-Info: seq=%d;rtptime=%d\r\n" - "\r\n", - conn->host, - conn->url_abspath, - ++conn->cseq, - conn->cid, - conn->ua, conn->session, conn->rtp_seq_num, conn->rtp_timestamp); - - if (gst_apexraop_send (conn->ctrl_sd, hreq, strlen (hreq)) <= 0) - return GST_RTSP_STS_GONE; - - if (gst_apexraop_recv (conn->ctrl_sd, hreq, - GST_APEX_RAOP_HDR_DEFAULT_LENGTH) <= 0) - return GST_RTSP_STS_GONE; - - { - int tmp; - sscanf (hreq, "%*s %d", &tmp); - res = (GstRTSPStatusCode) tmp; - } - - return res; -} diff --git a/ext/apexsink/gstapexraop.h b/ext/apexsink/gstapexraop.h deleted file mode 100644 index a4f947e4f..000000000 --- a/ext/apexsink/gstapexraop.h +++ /dev/null @@ -1,148 +0,0 @@ -/* GStreamer - Remote Audio Access Protocol (RAOP) as used in Apple iTunes to stream music to the Airport Express (ApEx) - - * - * RAOP is based on the Real Time Streaming Protocol (RTSP) but with an extra challenge-response RSA based authentication step. - * This interface accepts RAW PCM data and set it as AES encrypted ALAC while performing emission. - * - * Copyright (C) 2008 Jérémie Bernard [GRemi] - * - * gstapexraop.h - * - * 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., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifndef __GST_APEXRAOP_H__ -#define __GST_APEXRAOP_H__ - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include - -G_BEGIN_DECLS - -/* raop fixed parameters */ -#define GST_APEX_RAOP_BITRATE 44100 -#define GST_APEX_RAOP_V1_SAMPLES_PER_FRAME 4096 -#define GST_APEX_RAOP_V2_SAMPLES_PER_FRAME 352 -#define GST_APEX_RAOP_BYTES_PER_CHANNEL 2 -#define GST_APEX_RAOP_CHANNELS 2 -#define GST_APEX_RAOP_BYTES_PER_SAMPLE (GST_APEX_RAOP_CHANNELS * GST_APEX_RAOP_BYTES_PER_CHANNEL) - -/* gst associated caps fields specification */ -#define GST_APEX_RAOP_INPUT_TYPE "audio/x-raw-int" -#define GST_APEX_RAOP_INPUT_WIDTH "16" -#define GST_APEX_RAOP_INPUT_DEPTH GST_APEX_RAOP_INPUT_WIDTH -#define GST_APEX_RAOP_INPUT_ENDIAN "LITTLE_ENDIAN" -#define GST_APEX_RAOP_INPUT_CHANNELS "2" -#define GST_APEX_RAOP_INPUT_BIT_RATE "44100" -#define GST_APEX_RAOP_INPUT_SIGNED "TRUE" - -typedef enum -{ - GST_APEX_JACK_TYPE_UNDEFINED = 0, - GST_APEX_JACK_TYPE_ANALOG, - GST_APEX_JACK_TYPE_DIGITAL, -} -GstApExJackType; - -typedef enum -{ - GST_APEX_JACK_STATUS_UNDEFINED = 0, - GST_APEX_JACK_STATUS_DISCONNECTED, - GST_APEX_JACK_STATUS_CONNECTED, -} -GstApExJackStatus; - -typedef enum -{ - GST_APEX_GENERATION_ONE = 1, - GST_APEX_GENERATION_TWO, -} -GstApExGeneration; - -typedef enum -{ - GST_APEX_TCP = 0, - GST_APEX_UDP, -} -GstApExTransportProtocol; - -/* raop context handle */ -typedef struct -{ -} GstApExRAOP; - -/* host might be null and port might be 0 while instanciating */ -GstApExRAOP *gst_apexraop_new (const gchar * host, - const guint16 port, - const GstApExGeneration generation, - const GstApExTransportProtocol transport_protocol); -void gst_apexraop_free (GstApExRAOP * conn); - -/* must not be connected yet while setting the host target */ -void gst_apexraop_set_host (GstApExRAOP * conn, const gchar * host); -gchar *gst_apexraop_get_host (GstApExRAOP * conn); - -/* must not be connected yet while setting the port target */ -void gst_apexraop_set_port (GstApExRAOP * conn, const guint16 port); -guint16 gst_apexraop_get_port (GstApExRAOP * conn); - -/* optional affectation, default iTunes user agent internaly used */ -void gst_apexraop_set_useragent (GstApExRAOP * conn, const gchar * useragent); -gchar *gst_apexraop_get_useragent (GstApExRAOP * conn); - -/* once allocation and configuration performed, manages the raop ANNOUNCE, SETUP and RECORD sequences, - * open both ctrl and data channels */ -GstRTSPStatusCode gst_apexraop_connect (GstApExRAOP * conn); - -/* close the currently used session, manages raop TEARDOWN sequence and closes the used sockets */ -void gst_apexraop_close (GstApExRAOP * conn); - -/* once connected, set the apex target volume, manages SET_PARAMETER sequence */ -GstRTSPStatusCode gst_apexraop_set_volume (GstApExRAOP * conn, - const guint volume); - -/* write raw samples typed as defined by the fixed raop parameters, flush the apex buffer */ -guint gst_apexraop_write (GstApExRAOP * conn, gpointer rawdata, guint length); -GstRTSPStatusCode gst_apexraop_flush (GstApExRAOP * conn); - -/* retrieve the connected apex jack type and status */ -GstApExJackType gst_apexraop_get_jacktype (GstApExRAOP * conn); -GstApExJackStatus gst_apexraop_get_jackstatus (GstApExRAOP * conn); - -/* retrieve the generation */ -GstApExGeneration gst_apexraop_get_generation (GstApExRAOP * conn); - -/* retrieve the transport protocol */ -GstApExTransportProtocol gst_apexraop_get_transport_protocol (GstApExRAOP * conn); - -G_END_DECLS - -#endif - diff --git a/ext/apexsink/gstapexsink.c b/ext/apexsink/gstapexsink.c deleted file mode 100644 index df5c5f256..000000000 --- a/ext/apexsink/gstapexsink.c +++ /dev/null @@ -1,665 +0,0 @@ -/* GStreamer - AirPort Express Audio Sink - - * - * Remote Audio Access Protocol (RAOP) as used in Apple iTunes to stream music to the Airport Express (ApEx) - - * RAOP is based on the Real Time Streaming Protocol (RTSP) but with an extra challenge-response RSA based authentication step. - * - * RAW PCM input only as defined by the following GST_STATIC_PAD_TEMPLATE - * - * Copyright (C) 2008 Jérémie Bernard [GRemi] - * - * gstapexsink.c - * - * 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., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#include "gstapexsink.h" - -GST_DEBUG_CATEGORY_STATIC (apexsink_debug); -#define GST_CAT_DEFAULT apexsink_debug - -static GstStaticPadTemplate gst_apexsink_sink_factory = GST_STATIC_PAD_TEMPLATE - ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS - (GST_APEX_RAOP_INPUT_TYPE "," - "width = (int) " GST_APEX_RAOP_INPUT_WIDTH "," - "depth = (int) " GST_APEX_RAOP_INPUT_DEPTH "," - "endianness = (int) " GST_APEX_RAOP_INPUT_ENDIAN "," - "channels = (int) " GST_APEX_RAOP_INPUT_CHANNELS "," - "rate = (int) " GST_APEX_RAOP_INPUT_BIT_RATE "," - "signed = (boolean) " GST_APEX_RAOP_INPUT_SIGNED) - ); - - -enum -{ - APEX_PROP_HOST = 1, - APEX_PROP_PORT, - APEX_PROP_VOLUME, - APEX_PROP_JACK_TYPE, - APEX_PROP_JACK_STATUS, - APEX_PROP_GENERATION, - APEX_PROP_TRANSPORT_PROTOCOL, -}; - -#define DEFAULT_APEX_HOST "" -#define DEFAULT_APEX_PORT 5000 -#define DEFAULT_APEX_VOLUME 1.0 -#define DEFAULT_APEX_JACK_TYPE GST_APEX_JACK_TYPE_UNDEFINED -#define DEFAULT_APEX_JACK_STATUS GST_APEX_JACK_STATUS_UNDEFINED -#define DEFAULT_APEX_GENERATION GST_APEX_GENERATION_ONE -#define DEFAULT_APEX_TRANSPORT_PROTOCOL GST_APEX_TCP - -/* genum apex jack resolution */ -GType -gst_apexsink_jackstatus_get_type (void) -{ - static GType jackstatus_type = 0; - static const GEnumValue jackstatus[] = { - {GST_APEX_JACK_STATUS_UNDEFINED, "GST_APEX_JACK_STATUS_UNDEFINED", - "Jack status undefined"}, - {GST_APEX_JACK_STATUS_DISCONNECTED, "GST_APEX_JACK_STATUS_DISCONNECTED", - "Jack disconnected"}, - {GST_APEX_JACK_STATUS_CONNECTED, "GST_APEX_JACK_STATUS_CONNECTED", - "Jack connected"}, - {0, NULL, NULL}, - }; - - if (!jackstatus_type) { - jackstatus_type = g_enum_register_static ("GstApExJackStatus", jackstatus); - } - - return jackstatus_type; -} - -GType -gst_apexsink_jacktype_get_type (void) -{ - static GType jacktype_type = 0; - static const GEnumValue jacktype[] = { - {GST_APEX_JACK_TYPE_UNDEFINED, "GST_APEX_JACK_TYPE_UNDEFINED", - "Undefined jack type"}, - {GST_APEX_JACK_TYPE_ANALOG, "GST_APEX_JACK_TYPE_ANALOG", "Analog jack"}, - {GST_APEX_JACK_TYPE_DIGITAL, "GST_APEX_JACK_TYPE_DIGITAL", "Digital jack"}, - {0, NULL, NULL}, - }; - - if (!jacktype_type) { - jacktype_type = g_enum_register_static ("GstApExJackType", jacktype); - } - - return jacktype_type; -} - -GType -gst_apexsink_generation_get_type (void) -{ - static GType generation_type = 0; - static const GEnumValue generation[] = { - {GST_APEX_GENERATION_ONE, "generation-one", - "First generation (e.g., original AirPort Express)"}, - {GST_APEX_GENERATION_TWO, "generation-two", - "Second generation (e.g., Apple TV v2)"}, - {0, NULL, NULL}, - }; - - if (!generation_type) { - generation_type = g_enum_register_static ("GstApExGeneration", generation); - } - - return generation_type; -} - -GType -gst_apexsink_transport_protocol_get_type (void) -{ - static GType transport_protocol_type = 0; - static const GEnumValue transport_protocol[] = { - {GST_APEX_TCP, "tcp", "TCP"}, - {GST_APEX_UDP, "udp", "UDP"}, - {0, NULL, NULL}, - }; - - if (!transport_protocol_type) { - transport_protocol_type = - g_enum_register_static ("GstApExTransportProtocol", transport_protocol); - } - - return transport_protocol_type; -} - - -static void gst_apexsink_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec); -static void gst_apexsink_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec); -static void gst_apexsink_finalise (GObject * object); - -static gboolean gst_apexsink_open (GstAudioSink * asink); -static gboolean gst_apexsink_prepare (GstAudioSink * asink, - GstRingBufferSpec * spec); -static guint gst_apexsink_write (GstAudioSink * asink, gpointer data, - guint length); -static gboolean gst_apexsink_unprepare (GstAudioSink * asink); -static guint gst_apexsink_delay (GstAudioSink * asink); -static void gst_apexsink_reset (GstAudioSink * asink); -static gboolean gst_apexsink_close (GstAudioSink * asink); -static GstStateChangeReturn gst_apexsink_change_state (GstElement * element, - GstStateChange transition); - -/* mixer interface standard api */ -static void gst_apexsink_interfaces_init (GType type); -static void gst_apexsink_implements_interface_init (GstImplementsInterfaceClass - * iface); -static void gst_apexsink_mixer_interface_init (GstMixerInterface * iface); - -static gboolean gst_apexsink_interface_supported (GstImplementsInterface * - iface, GType iface_type); -static const GList *gst_apexsink_mixer_list_tracks (GstMixer * mixer); -static void gst_apexsink_mixer_set_volume (GstMixer * mixer, - GstMixerTrack * track, gint * volumes); -static void gst_apexsink_mixer_get_volume (GstMixer * mixer, - GstMixerTrack * track, gint * volumes); - -GST_BOILERPLATE_FULL (GstApExSink, gst_apexsink, GstAudioSink, - GST_TYPE_AUDIO_SINK, gst_apexsink_interfaces_init); - -/* apex sink interface(s) stuff */ -static void -gst_apexsink_interfaces_init (GType type) -{ - static const GInterfaceInfo implements_interface_info = - { (GInterfaceInitFunc) gst_apexsink_implements_interface_init, NULL, - NULL - }; - static const GInterfaceInfo mixer_interface_info = - { (GInterfaceInitFunc) gst_apexsink_mixer_interface_init, NULL, NULL }; - - g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE, - &implements_interface_info); - g_type_add_interface_static (type, GST_TYPE_MIXER, &mixer_interface_info); -} - -static void -gst_apexsink_implements_interface_init (GstImplementsInterfaceClass * iface) -{ - iface->supported = gst_apexsink_interface_supported; -} - -static void -gst_apexsink_mixer_interface_init (GstMixerInterface * iface) -{ - GST_MIXER_TYPE (iface) = GST_MIXER_SOFTWARE; - - iface->list_tracks = gst_apexsink_mixer_list_tracks; - iface->set_volume = gst_apexsink_mixer_set_volume; - iface->get_volume = gst_apexsink_mixer_get_volume; -} - -static gboolean -gst_apexsink_interface_supported (GstImplementsInterface * iface, - GType iface_type) -{ - g_return_val_if_fail (iface_type == GST_TYPE_MIXER, FALSE); - - return TRUE; -} - -static const GList * -gst_apexsink_mixer_list_tracks (GstMixer * mixer) -{ - GstApExSink *apexsink = GST_APEX_SINK (mixer); - - return apexsink->tracks; -} - -static void -gst_apexsink_mixer_set_volume (GstMixer * mixer, GstMixerTrack * track, - gint * volumes) -{ - GstApExSink *apexsink = GST_APEX_SINK (mixer); - - apexsink->volume = volumes[0]; - - if (apexsink->gst_apexraop != NULL) - gst_apexraop_set_volume (apexsink->gst_apexraop, apexsink->volume); -} - -static void -gst_apexsink_mixer_get_volume (GstMixer * mixer, GstMixerTrack * track, - gint * volumes) -{ - GstApExSink *apexsink = GST_APEX_SINK (mixer); - - volumes[0] = apexsink->volume; -} - -/* sink base init */ -static void -gst_apexsink_base_init (gpointer g_class) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - - gst_element_class_set_static_metadata (element_class, - "Apple AirPort Express Audio Sink", "Sink/Audio/Wireless", - "Output stream to an AirPort Express", - "Jérémie Bernard [GRemi] "); - gst_element_class_add_static_pad_template (element_class, - &gst_apexsink_sink_factory); -} - -/* sink class init */ -static void -gst_apexsink_class_init (GstApExSinkClass * klass) -{ - GST_DEBUG_CATEGORY_INIT (apexsink_debug, GST_APEX_SINK_NAME, 0, - "AirPort Express sink"); - - parent_class = g_type_class_peek_parent (klass); - - ((GObjectClass *) klass)->get_property = - GST_DEBUG_FUNCPTR (gst_apexsink_get_property); - ((GObjectClass *) klass)->set_property = - GST_DEBUG_FUNCPTR (gst_apexsink_set_property); - ((GObjectClass *) klass)->finalize = - GST_DEBUG_FUNCPTR (gst_apexsink_finalise); - - ((GstAudioSinkClass *) klass)->open = GST_DEBUG_FUNCPTR (gst_apexsink_open); - ((GstAudioSinkClass *) klass)->prepare = - GST_DEBUG_FUNCPTR (gst_apexsink_prepare); - ((GstAudioSinkClass *) klass)->write = GST_DEBUG_FUNCPTR (gst_apexsink_write); - ((GstAudioSinkClass *) klass)->unprepare = - GST_DEBUG_FUNCPTR (gst_apexsink_unprepare); - ((GstAudioSinkClass *) klass)->delay = GST_DEBUG_FUNCPTR (gst_apexsink_delay); - ((GstAudioSinkClass *) klass)->reset = GST_DEBUG_FUNCPTR (gst_apexsink_reset); - ((GstAudioSinkClass *) klass)->close = GST_DEBUG_FUNCPTR (gst_apexsink_close); - - ((GstElementClass *) klass)->change_state = - GST_DEBUG_FUNCPTR (gst_apexsink_change_state); - - g_object_class_install_property ((GObjectClass *) klass, APEX_PROP_HOST, - g_param_spec_string ("host", "Host", "AirPort Express target host", - DEFAULT_APEX_HOST, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property ((GObjectClass *) klass, APEX_PROP_PORT, - g_param_spec_uint ("port", "Port", "AirPort Express target port", 0, - 32000, DEFAULT_APEX_PORT, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /* we need to expose the volume as a double for playbin. Internally we keep - * it as an int between 0 and 100, where 75 corresponds to 1.0. - * FIXME we should store the volume as a double. */ - g_object_class_install_property ((GObjectClass *) klass, APEX_PROP_VOLUME, - g_param_spec_double ("volume", "Volume", "AirPort Express target volume", - 0.0, 10.0, DEFAULT_APEX_VOLUME, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property ((GObjectClass *) klass, APEX_PROP_JACK_TYPE, - g_param_spec_enum ("jack-type", "Jack Type", - "AirPort Express connected jack type", GST_APEX_SINK_JACKTYPE_TYPE, - DEFAULT_APEX_JACK_TYPE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property ((GObjectClass *) klass, - APEX_PROP_JACK_STATUS, g_param_spec_enum ("jack-status", "Jack Status", - "AirPort Express jack connection status", - GST_APEX_SINK_JACKSTATUS_TYPE, DEFAULT_APEX_JACK_STATUS, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property ((GObjectClass *) klass, - APEX_PROP_GENERATION, g_param_spec_enum ("generation", "Generation", - "AirPort device generation", - GST_APEX_SINK_GENERATION_TYPE, DEFAULT_APEX_GENERATION, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property ((GObjectClass *) klass, - APEX_PROP_TRANSPORT_PROTOCOL, g_param_spec_enum ("transport-protocol", - "Transport Protocol", "AirPort transport protocol", - GST_APEX_SINK_TRANSPORT_PROTOCOL_TYPE, - DEFAULT_APEX_TRANSPORT_PROTOCOL, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); -} - -/* sink plugin instance init */ -static void -gst_apexsink_init (GstApExSink * apexsink, GstApExSinkClass * g_class) -{ - GstMixerTrack *track = NULL; - - track = g_object_new (GST_TYPE_MIXER_TRACK, NULL); - track->label = g_strdup ("Airport Express"); - track->num_channels = GST_APEX_RAOP_CHANNELS; - track->min_volume = 0; - track->max_volume = 100; - track->flags = GST_MIXER_TRACK_OUTPUT; - - apexsink->host = g_strdup (DEFAULT_APEX_HOST); - apexsink->port = DEFAULT_APEX_PORT; - apexsink->volume = CLAMP (DEFAULT_APEX_VOLUME * 75, 0, 100); - apexsink->gst_apexraop = NULL; - apexsink->tracks = g_list_append (apexsink->tracks, track); - apexsink->clock = gst_system_clock_obtain (); - apexsink->clock_id = NULL; - - GST_INFO_OBJECT (apexsink, - "ApEx sink default initialization, target=\"%s\", port=\"%d\", volume=\"%d%%\"", - apexsink->host, apexsink->port, apexsink->volume); -} - -/* apex sink set property */ -static void -gst_apexsink_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstApExSink *sink = GST_APEX_SINK (object); - - switch (prop_id) { - case APEX_PROP_HOST: - if (sink->gst_apexraop == NULL) { - g_free (sink->host); - sink->host = g_value_dup_string (value); - - GST_INFO_OBJECT (sink, "ApEx sink target set to \"%s\"", sink->host); - } else { - G_OBJECT_WARN_INVALID_PSPEC (object, "host", prop_id, pspec); - } - break; - case APEX_PROP_PORT: - if (sink->gst_apexraop == NULL) { - sink->port = g_value_get_uint (value); - - GST_INFO_OBJECT (sink, "ApEx port set to \"%d\"", sink->port); - } else { - G_OBJECT_WARN_INVALID_PSPEC (object, "port", prop_id, pspec); - } - break; - case APEX_PROP_VOLUME: - { - gdouble volume; - - volume = g_value_get_double (value); - volume *= 75.0; - - sink->volume = CLAMP (volume, 0, 100); - - if (sink->gst_apexraop != NULL) - gst_apexraop_set_volume (sink->gst_apexraop, sink->volume); - - GST_INFO_OBJECT (sink, "ApEx volume set to \"%d%%\"", sink->volume); - break; - } - case APEX_PROP_GENERATION: - if (sink->gst_apexraop == NULL) { - sink->generation = g_value_get_enum (value); - - GST_INFO_OBJECT (sink, "ApEx generation set to \"%d\"", - sink->generation); - } else { - GST_WARNING_OBJECT (sink, - "SET-PROPERTY : generation property may not be set when apexsink opened !"); - } - break; - case APEX_PROP_TRANSPORT_PROTOCOL: - if (sink->gst_apexraop == NULL) { - sink->transport_protocol = g_value_get_enum (value); - - GST_INFO_OBJECT (sink, "ApEx transport protocol set to \"%d\"", - sink->transport_protocol); - } else { - GST_WARNING_OBJECT (sink, - "SET-PROPERTY : transport protocol property may not be set when apexsink opened !"); - } - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -/* apex sink get property */ -static void -gst_apexsink_get_property (GObject * object, guint prop_id, GValue * value, - GParamSpec * pspec) -{ - GstApExSink *sink = GST_APEX_SINK (object); - - switch (prop_id) { - case APEX_PROP_HOST: - g_value_set_string (value, sink->host); - break; - case APEX_PROP_PORT: - g_value_set_uint (value, sink->port); - break; - case APEX_PROP_VOLUME: - g_value_set_double (value, ((gdouble) sink->volume) / 75.0); - break; - case APEX_PROP_JACK_TYPE: - g_value_set_enum (value, gst_apexraop_get_jacktype (sink->gst_apexraop)); - break; - case APEX_PROP_JACK_STATUS: - g_value_set_enum (value, - gst_apexraop_get_jackstatus (sink->gst_apexraop)); - break; - case APEX_PROP_GENERATION: - g_value_set_enum (value, - gst_apexraop_get_generation (sink->gst_apexraop)); - break; - case APEX_PROP_TRANSPORT_PROTOCOL: - g_value_set_enum (value, - gst_apexraop_get_transport_protocol (sink->gst_apexraop)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -/* apex sink finalize */ -static void -gst_apexsink_finalise (GObject * object) -{ - GstApExSink *sink = GST_APEX_SINK (object); - - if (sink->tracks) { - g_list_foreach (sink->tracks, (GFunc) g_object_unref, NULL); - g_list_free (sink->tracks); - sink->tracks = NULL; - } - - gst_object_unref (sink->clock); - - g_free (sink->host); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -/* sink open : open the device */ -static gboolean -gst_apexsink_open (GstAudioSink * asink) -{ - int res; - GstApExSink *apexsink = (GstApExSink *) asink; - - apexsink->gst_apexraop = gst_apexraop_new (apexsink->host, - apexsink->port, apexsink->generation, apexsink->transport_protocol); - - if ((res = gst_apexraop_connect (apexsink->gst_apexraop)) != GST_RTSP_STS_OK) { - GST_ERROR_OBJECT (apexsink, - "%s : network or RAOP failure, connection refused or timeout, RTSP code=%d", - apexsink->host, res); - return FALSE; - } - - GST_INFO_OBJECT (apexsink, - "OPEN : ApEx sink successfully connected to \"%s:%d\", ANNOUNCE, SETUP and RECORD requests performed", - apexsink->host, apexsink->port); - - switch (gst_apexraop_get_jackstatus (apexsink->gst_apexraop)) { - case GST_APEX_JACK_STATUS_CONNECTED: - GST_INFO_OBJECT (apexsink, "OPEN : ApEx jack is connected"); - break; - case GST_APEX_JACK_STATUS_DISCONNECTED: - GST_WARNING_OBJECT (apexsink, "OPEN : ApEx jack is disconnected !"); - break; - default: - GST_WARNING_OBJECT (apexsink, "OPEN : ApEx jack status is undefined !"); - break; - } - - switch (gst_apexraop_get_jacktype (apexsink->gst_apexraop)) { - case GST_APEX_JACK_TYPE_ANALOG: - GST_INFO_OBJECT (apexsink, "OPEN : ApEx jack type is analog"); - break; - case GST_APEX_JACK_TYPE_DIGITAL: - GST_INFO_OBJECT (apexsink, "OPEN : ApEx jack type is digital"); - break; - default: - GST_WARNING_OBJECT (apexsink, "OPEN : ApEx jack type is undefined !"); - break; - } - - if ((res = - gst_apexraop_set_volume (apexsink->gst_apexraop, - apexsink->volume)) != GST_RTSP_STS_OK) { - GST_WARNING_OBJECT (apexsink, - "%s : could not set initial volume to \"%d%%\", RTSP code=%d", - apexsink->host, apexsink->volume, res); - } else { - GST_INFO_OBJECT (apexsink, - "OPEN : ApEx sink successfully set volume to \"%d%%\"", - apexsink->volume); - } - - return TRUE; -} - -/* prepare sink : configure the device with the specified format */ -static gboolean -gst_apexsink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec) -{ - GstApExSink *apexsink = (GstApExSink *) asink; - GstApExGeneration gen = gst_apexraop_get_generation (apexsink->gst_apexraop); - - apexsink->latency_time = spec->latency_time; - - spec->segsize = gen == GST_APEX_GENERATION_ONE - ? GST_APEX_RAOP_V1_SAMPLES_PER_FRAME * GST_APEX_RAOP_BYTES_PER_SAMPLE - : GST_APEX_RAOP_V2_SAMPLES_PER_FRAME * GST_APEX_RAOP_BYTES_PER_SAMPLE; - spec->segtotal = 2; - - memset (spec->silence_sample, 0, sizeof (spec->silence_sample)); - - GST_INFO_OBJECT (apexsink, - "PREPARE : ApEx sink ready to stream at %dHz, %d bytes per sample, %d channels, %d bytes segments (%dkB/s)", - spec->rate, spec->bytes_per_sample, spec->channels, spec->segsize, - spec->rate * spec->bytes_per_sample / 1000); - - return TRUE; -} - -/* sink write : write samples to the device */ -static guint -gst_apexsink_write (GstAudioSink * asink, gpointer data, guint length) -{ - guint written; - GstApExSink *apexsink = (GstApExSink *) asink; - - if ((written = - gst_apexraop_write (apexsink->gst_apexraop, data, - length)) != length) { - GST_INFO_OBJECT (apexsink, - "WRITE : %d of %d bytes sent, skipping frame samples...", written, - length); - } else { - GST_INFO_OBJECT (apexsink, "WRITE : %d bytes sent", length); - /* NOTE, previous calculation subtracted apexsink->latency_time from this; - * however, the value below is less than apexsink->latency_time for generation 2. - * In this case, the number went negative (actualy wrapped around into a big number). - */ - apexsink->clock_id = gst_clock_new_single_shot_id (apexsink->clock, - (GstClockTime) (gst_clock_get_time (apexsink->clock) + - ((length * 1000000000.) - / (GST_APEX_RAOP_BITRATE * GST_APEX_RAOP_BYTES_PER_SAMPLE)))); - gst_clock_id_wait (apexsink->clock_id, NULL); - gst_clock_id_unref (apexsink->clock_id); - apexsink->clock_id = NULL; - } - - return length; -} - -/* unprepare sink : undo operations done by prepare */ -static gboolean -gst_apexsink_unprepare (GstAudioSink * asink) -{ - GST_INFO_OBJECT (asink, "UNPREPARE"); - - return TRUE; -} - -/* delay sink : get the estimated number of samples written but not played yet by the device */ -static guint -gst_apexsink_delay (GstAudioSink * asink) -{ - GST_LOG_OBJECT (asink, "DELAY"); - - return 0; -} - -/* reset sink : unblock writes and flush the device */ -static void -gst_apexsink_reset (GstAudioSink * asink) -{ - int res; - GstApExSink *apexsink = (GstApExSink *) asink; - - GST_INFO_OBJECT (apexsink, "RESET : flushing buffer..."); - - if ((res = gst_apexraop_flush (apexsink->gst_apexraop)) == GST_RTSP_STS_OK) { - GST_INFO_OBJECT (apexsink, "RESET : ApEx buffer flush success"); - } else { - GST_WARNING_OBJECT (apexsink, - "RESET : could not flush ApEx buffer, RTSP code=%d", res); - } -} - -/* sink close : close the device */ -static gboolean -gst_apexsink_close (GstAudioSink * asink) -{ - GstApExSink *apexsink = (GstApExSink *) asink; - - gst_apexraop_close (apexsink->gst_apexraop); - gst_apexraop_free (apexsink->gst_apexraop); - - GST_INFO_OBJECT (apexsink, "CLOSE : ApEx sink closed connection"); - - return TRUE; -} - -static GstStateChangeReturn -gst_apexsink_change_state (GstElement * element, GstStateChange transition) -{ - GstApExSink *apexsink = (GstApExSink *) element; - - if (apexsink->clock_id && transition == GST_STATE_CHANGE_PAUSED_TO_READY) { - gst_clock_id_unschedule (apexsink->clock_id); - gst_clock_id_unref (apexsink->clock_id); - apexsink->clock_id = NULL; - } - return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); -} diff --git a/ext/apexsink/gstapexsink.h b/ext/apexsink/gstapexsink.h deleted file mode 100644 index 711cd3725..000000000 --- a/ext/apexsink/gstapexsink.h +++ /dev/null @@ -1,98 +0,0 @@ -/* GStreamer - AirPort Express (ApEx) Audio Sink - - * - * Remote Audio Access Protocol (RAOP) as used in Apple iTunes to stream music to the Airport Express (ApEx) - - * RAOP is based on the Real Time Streaming Protocol (RTSP) but with an extra challenge-response RSA based authentication step. - * - * RAW PCM input only as defined by the following GST_STATIC_PAD_TEMPLATE regarding the expected gstapexraop input format. - * - * Copyright (C) 2008 Jérémie Bernard [GRemi] - * - * gstapexsink.h - * - * 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., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifndef __GST_APEXSINK_H__ -#define __GST_APEXSINK_H__ - -#include "gstapexraop.h" - -#include -#include - -G_BEGIN_DECLS - -/* standard gstreamer macros */ -#define GST_TYPE_APEX_SINK (gst_apexsink_get_type()) -#define GST_APEX_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_APEX_SINK,GstApExSink)) -#define GST_APEX_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_APEX_SINK,GstApExSinkClass)) -#define GST_IS_APEX_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_APEX_SINK)) -#define GST_IS_APEX_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_APEX_SINK)) -#define GST_APEX_SINK_CAST(obj) ((GstApExSink*)(obj)) -#define GST_APEX_SINK_NAME "apexsink" -#define GST_APEX_SINK_JACKTYPE_TYPE (gst_apexsink_jacktype_get_type()) -#define GST_APEX_SINK_JACKSTATUS_TYPE (gst_apexsink_jackstatus_get_type()) -#define GST_APEX_SINK_GENERATION_TYPE (gst_apexsink_generation_get_type()) -#define GST_APEX_SINK_TRANSPORT_PROTOCOL_TYPE (gst_apexsink_transport_protocol_get_type()) -/* ApEx classes declaration */ -typedef struct _GstApExSink GstApExSink; -typedef struct _GstApExSinkClass GstApExSinkClass; - -struct _GstApExSink -{ - /* base definition */ - GstAudioSink sink; - - /* public read/write sink properties */ - gchar *host; - guint port; - guint volume; - GstApExGeneration generation; - GstApExTransportProtocol transport_protocol; - - /* private attributes : - * latency time local copy - * tracks list of the mixer interface - * clock for sleeping - * clock ID for sleeping / canceling sleep - */ - guint64 latency_time; - GList *tracks; - GstClock *clock; - GstClockID clock_id; - - /* private apex client */ - GstApExRAOP *gst_apexraop; -}; - -struct _GstApExSinkClass -{ - GstAudioSinkClass parent_class; -}; - -/* genums */ -GType gst_apexsink_jackstatus_get_type (void); -GType gst_apexsink_jacktype_get_type (void); -GType gst_apexsink_generation_get_type (void); -GType gst_apexsink_transport_protocol_get_type (void); - -/* audio sink standard api */ -GType gst_apexsink_get_type (void); - -G_END_DECLS - -#endif diff --git a/ext/libvisual/Makefile.am b/ext/libvisual/Makefile.am deleted file mode 100644 index 1eba9af2f..000000000 --- a/ext/libvisual/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -plugin_LTLIBRARIES = libgstlibvisualgl.la - -libgstlibvisualgl_la_SOURCES = visual-gl.c - -libgstlibvisualgl_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(LIBVISUAL_CFLAGS) \ - -I$(top_srcdir)/gst-libs \ - -I$(top_srcdir)/gst-libs/gst/gl - -libgstlibvisualgl_la_LIBADD = \ - $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \ - $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) $(LIBVISUAL_LIBS) - -libgstlibvisualgl_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -libgstlibvisualgl_la_LIBTOOLFLAGS = --tag=disable-static - diff --git a/ext/libvisual/visual-gl.c b/ext/libvisual/visual-gl.c deleted file mode 100644 index c796d4b47..000000000 --- a/ext/libvisual/visual-gl.c +++ /dev/null @@ -1,1248 +0,0 @@ -/* GStreamer - * Copyright (C) 2004 Benjamin Otte - * Copyright (C) 2009 Jonathan Matthew - * Copyright (C) 2011 Julien Isorce - * - * 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., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -/** - * SECTION:element-libvisualgl - * - * Wrapper for libvisual plugins that use OpenGL - * - * - * Examples - * |[ - * gst-launch-1.0 -v audiotestsrc ! libvisual_gl_lv_flower ! glimagesink - * ]| - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -#include - -#define GST_TYPE_VISUAL_GL (gst_visual_gl_get_type()) -#define GST_IS_VISUAL_GL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VISUAL_GL)) -#define GST_VISUAL_GL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VISUAL_GL,GstVisualGL)) -#define GST_IS_VISUAL_GL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VISUAL_GL)) -#define GST_VISUAL_GL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VISUAL_GL,GstVisualGLClass)) -#define GST_VISUAL_GL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VISUAL_GL, GstVisualGLClass)) - -typedef struct _GstVisualGL GstVisualGL; -typedef struct _GstVisualGLClass GstVisualGLClass; - -/* XXX use same category as libvisual plugin in -base? */ -GST_DEBUG_CATEGORY_STATIC (libvisual_debug); -#define GST_CAT_DEFAULT (libvisual_debug) - -/* amounf of samples before we can feed libvisual */ -#define VISUAL_SAMPLES 512 - -#define DEFAULT_WIDTH 320 -#define DEFAULT_HEIGHT 240 -#define DEFAULT_FPS_N 25 -#define DEFAULT_FPS_D 1 - -struct _GstVisualGL -{ - GstElement element; - - /* pads */ - GstPad *sinkpad; - GstPad *srcpad; - GstSegment segment; - - /* GL stuff */ - GstGLDisplay *display; - GLuint fbo; - GLuint depthbuffer; - GLuint midtexture; - GLdouble actor_projection_matrix[16]; - GLdouble actor_modelview_matrix[16]; - GLboolean is_enabled_gl_depth_test; - GLint gl_depth_func; - GLboolean is_enabled_gl_blend; - GLint gl_blend_src_alpha; - - /* libvisual stuff */ - VisAudio *audio; - VisVideo *video; - VisActor *actor; - int actor_setup_result; - - /* audio/video state */ - gint channels; - gint rate; /* Input samplerate */ - gint bps; - VisAudioSampleRateType libvisual_rate; - - /* framerate numerator & denominator */ - gint fps_n; - gint fps_d; - gint width; - gint height; - GstClockTime duration; - guint outsize; - - /* samples per frame based on caps */ - guint spf; - - /* state stuff */ - GstAdapter *adapter; - guint count; - - /* QoS stuff *//* with LOCK */ - gdouble proportion; - GstClockTime earliest_time; -}; - -struct _GstVisualGLClass -{ - GstElementClass parent_class; - - VisPluginRef *plugin; -}; - -GType gst_visual_gl_get_type (void); - - -static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_GL_VIDEO_CAPS) - ); - -static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-raw-int, " - "width = (int) 16, " - "depth = (int) 16, " - "endianness = (int) BYTE_ORDER, " - "signed = (boolean) TRUE, " "channels = (int) { 1, 2 }, " - "rate = (int) { 8000, 11250, 22500, 32000, 44100, 48000, 96000 }") - ); - - -static void gst_visual_gl_class_init (gpointer g_class, gpointer class_data); -static void gst_visual_gl_init (GstVisualGL * visual); -static void gst_visual_gl_dispose (GObject * object); - -static GstStateChangeReturn gst_visual_gl_change_state (GstElement * element, - GstStateChange transition); -static GstFlowReturn gst_visual_gl_chain (GstPad * pad, GstBuffer * buffer); -static gboolean gst_visual_gl_sink_event (GstPad * pad, GstEvent * event); -static gboolean gst_visual_gl_src_event (GstPad * pad, GstEvent * event); - -static gboolean gst_visual_gl_src_query (GstPad * pad, GstQuery * query); - -static gboolean gst_visual_gl_sink_setcaps (GstPad * pad, GstCaps * caps); -static gboolean gst_visual_gl_src_setcaps (GstPad * pad, GstCaps * caps); -static GstCaps *gst_visual_gl_getcaps (GstPad * pad); -static void libvisual_log_handler (const char *message, const char *funcname, - void *priv); - -static GstElementClass *parent_class = NULL; - -GType -gst_visual_gl_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GTypeInfo info = { - sizeof (GstVisualGLClass), - NULL, - NULL, - gst_visual_gl_class_init, - NULL, - NULL, - sizeof (GstVisualGL), - 0, - (GInstanceInitFunc) gst_visual_gl_init, - }; - - type = g_type_register_static (GST_TYPE_ELEMENT, "GstVisualGL", &info, 0); - } - return type; -} - -static void -libvisual_log_handler (const char *message, const char *funcname, void *priv) -{ - GST_CAT_LEVEL_LOG (libvisual_debug, (GstDebugLevel) (priv), NULL, "%s - %s", - funcname, message); -} - -static void -gst_visual_gl_class_init (gpointer g_class, gpointer class_data) -{ - GstVisualGLClass *klass = GST_VISUAL_GL_CLASS (g_class); - GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - GObjectClass *object = G_OBJECT_CLASS (g_class); - - klass->plugin = class_data; - - element_class->change_state = gst_visual_gl_change_state; - - if (class_data == NULL) { - parent_class = g_type_class_peek_parent (g_class); - } else { - char *longname = g_strdup_printf ("libvisual %s plugin v.%s", - klass->plugin->info->name, klass->plugin->info->version); - - /* FIXME: improve to only register what plugin supports? */ - gst_element_class_add_static_pad_template (element_class, &src_template); - gst_element_class_add_static_pad_template (element_class, &sink_template); - - gst_element_class_set_metadata (element_class, - longname, "Visualization", klass->plugin->info->about, - "Benjamin Otte "); - - g_free (longname); - } - - object->dispose = gst_visual_gl_dispose; -} - -static void -gst_visual_gl_init (GstVisualGL * visual) -{ - /* create the sink and src pads */ - visual->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink"); - gst_pad_set_setcaps_function (visual->sinkpad, gst_visual_gl_sink_setcaps); - gst_pad_set_chain_function (visual->sinkpad, gst_visual_gl_chain); - gst_pad_set_event_function (visual->sinkpad, gst_visual_gl_sink_event); - gst_element_add_pad (GST_ELEMENT (visual), visual->sinkpad); - - visual->srcpad = gst_pad_new_from_static_template (&src_template, "src"); - gst_pad_set_setcaps_function (visual->srcpad, gst_visual_gl_src_setcaps); - gst_pad_set_getcaps_function (visual->srcpad, gst_visual_gl_getcaps); - gst_pad_set_event_function (visual->srcpad, gst_visual_gl_src_event); - gst_pad_set_query_function (visual->srcpad, gst_visual_gl_src_query); - gst_element_add_pad (GST_ELEMENT (visual), visual->srcpad); - - visual->adapter = gst_adapter_new (); - - visual->actor = NULL; - - visual->display = NULL; - visual->fbo = 0; - visual->depthbuffer = 0; - visual->midtexture = 0; - - visual->is_enabled_gl_depth_test = GL_FALSE; - visual->gl_depth_func = GL_LESS; - visual->is_enabled_gl_blend = GL_FALSE; - visual->gl_blend_src_alpha = GL_ONE; -} - -static void -gst_visual_gl_clear_actors (GstVisualGL * visual) -{ - if (visual->actor) { - visual_object_unref (VISUAL_OBJECT (visual->actor)); - visual->actor = NULL; - } - if (visual->video) { - visual_object_unref (VISUAL_OBJECT (visual->video)); - visual->video = NULL; - } - if (visual->audio) { - visual_object_unref (VISUAL_OBJECT (visual->audio)); - visual->audio = NULL; - } -} - -static void -gst_visual_gl_dispose (GObject * object) -{ - GstVisualGL *visual = GST_VISUAL_GL (object); - - if (visual->adapter) { - gst_object_unref (visual->adapter); - visual->adapter = NULL; - } - - GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); -} - -static void -gst_visual_gl_reset (GstVisualGL * visual) -{ - gst_adapter_clear (visual->adapter); - gst_segment_init (&visual->segment, GST_FORMAT_UNDEFINED); - - GST_OBJECT_LOCK (visual); - visual->proportion = 1.0; - visual->earliest_time = -1; - GST_OBJECT_UNLOCK (visual); -} - -static GstCaps * -gst_visual_gl_getcaps (GstPad * pad) -{ - GstCaps *ret; - GstVisualGL *visual = GST_VISUAL_GL (gst_pad_get_parent (pad)); - int depths; - - if (!visual->actor) { - ret = gst_caps_copy (gst_pad_get_pad_template_caps (visual->srcpad)); - goto beach; - } - - ret = gst_caps_new_empty (); - depths = visual_actor_get_supported_depth (visual->actor); - if (depths < 0) { - /* FIXME: set an error */ - goto beach; - } - if ((depths & VISUAL_VIDEO_DEPTH_GL) == 0) { - /* We don't handle non-GL plugins */ - goto beach; - } - - GST_DEBUG_OBJECT (visual, "libvisual-gl plugin supports depths %u (0x%04x)", - depths, depths); - /* only do GL output */ - gst_caps_append (ret, gst_caps_from_string (GST_GL_VIDEO_CAPS)); - -beach: - - GST_DEBUG_OBJECT (visual, "returning caps %" GST_PTR_FORMAT, ret); - gst_object_unref (visual); - return ret; -} - -static gboolean -gst_visual_gl_src_setcaps (GstPad * pad, GstCaps * caps) -{ - GstVisualGL *visual = GST_VISUAL_GL (gst_pad_get_parent (pad)); - GstStructure *structure; - - structure = gst_caps_get_structure (caps, 0); - - GST_DEBUG_OBJECT (visual, "src pad got caps %" GST_PTR_FORMAT, caps); - - if (!gst_structure_get_int (structure, "width", &visual->width)) - goto error; - if (!gst_structure_get_int (structure, "height", &visual->height)) - goto error; - if (!gst_structure_get_fraction (structure, "framerate", &visual->fps_n, - &visual->fps_d)) - goto error; - - /* precalc some values */ - visual->spf = - gst_util_uint64_scale_int (visual->rate, visual->fps_d, visual->fps_n); - visual->duration = - gst_util_uint64_scale_int (GST_SECOND, visual->fps_d, visual->fps_n); - - gst_gl_display_gen_texture (visual->display, &visual->midtexture, - visual->width, visual->height); - - gst_gl_display_gen_fbo (visual->display, visual->width, visual->height, - &visual->fbo, &visual->depthbuffer); - - gst_object_unref (visual); - return TRUE; - - /* ERRORS */ -error: - { - GST_DEBUG_OBJECT (visual, "error parsing caps"); - gst_object_unref (visual); - return FALSE; - } -} - -static gboolean -gst_visual_gl_sink_setcaps (GstPad * pad, GstCaps * caps) -{ - GstVisualGL *visual = GST_VISUAL_GL (gst_pad_get_parent (pad)); - GstStructure *structure; - - structure = gst_caps_get_structure (caps, 0); - - gst_structure_get_int (structure, "channels", &visual->channels); - gst_structure_get_int (structure, "rate", &visual->rate); - - switch (visual->rate) { - case 8000: - visual->libvisual_rate = VISUAL_AUDIO_SAMPLE_RATE_8000; - break; - case 11250: - visual->libvisual_rate = VISUAL_AUDIO_SAMPLE_RATE_11250; - break; - case 22500: - visual->libvisual_rate = VISUAL_AUDIO_SAMPLE_RATE_22500; - break; - case 32000: - visual->libvisual_rate = VISUAL_AUDIO_SAMPLE_RATE_32000; - break; - case 44100: - visual->libvisual_rate = VISUAL_AUDIO_SAMPLE_RATE_44100; - break; - case 48000: - visual->libvisual_rate = VISUAL_AUDIO_SAMPLE_RATE_48000; - break; - case 96000: - visual->libvisual_rate = VISUAL_AUDIO_SAMPLE_RATE_96000; - break; - default: - gst_object_unref (visual); - return FALSE; - } - - /* this is how many samples we need to fill one frame at the requested - * framerate. */ - if (visual->fps_n != 0) { - visual->spf = - gst_util_uint64_scale_int (visual->rate, visual->fps_d, visual->fps_n); - } - visual->bps = visual->channels * sizeof (gint16); - - gst_object_unref (visual); - return TRUE; -} - -static gboolean -gst_vis_gl_src_negotiate (GstVisualGL * visual) -{ - GstCaps *othercaps, *target; - GstStructure *structure; - GstCaps *caps; - - caps = gst_pad_get_caps (visual->srcpad); - - /* see what the peer can do */ - othercaps = gst_pad_peer_get_caps (visual->srcpad); - if (othercaps) { - target = gst_caps_intersect (othercaps, caps); - gst_caps_unref (othercaps); - gst_caps_unref (caps); - - if (gst_caps_is_empty (target)) - goto no_format; - - gst_caps_truncate (target); - } else { - /* need a copy, we'll be modifying it when fixating */ - target = gst_caps_copy (caps); - gst_caps_unref (caps); - } - - /* fixate in case something is not fixed. This does nothing if the value is - * already fixed. For video we always try to fixate to something like - * 320x240x25 by convention. */ - structure = gst_caps_get_structure (target, 0); - gst_structure_fixate_field_nearest_int (structure, "width", DEFAULT_WIDTH); - gst_structure_fixate_field_nearest_int (structure, "height", DEFAULT_HEIGHT); - gst_structure_fixate_field_nearest_fraction (structure, "framerate", - DEFAULT_FPS_N, DEFAULT_FPS_D); - - gst_pad_set_caps (visual->srcpad, target); - gst_caps_unref (target); - - return TRUE; - - /* ERRORS */ -no_format: - { - GST_ELEMENT_ERROR (visual, STREAM, FORMAT, (NULL), - ("could not negotiate output format")); - gst_caps_unref (target); - return FALSE; - } -} - -static gboolean -gst_visual_gl_sink_event (GstPad * pad, GstEvent * event) -{ - GstVisualGL *visual; - gboolean res; - - visual = GST_VISUAL_GL (gst_pad_get_parent (pad)); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_FLUSH_START: - res = gst_pad_push_event (visual->srcpad, event); - break; - case GST_EVENT_FLUSH_STOP: - /* reset QoS and adapter. */ - gst_visual_gl_reset (visual); - res = gst_pad_push_event (visual->srcpad, event); - break; - case GST_EVENT_NEWSEGMENT: - { - GstFormat format; - gdouble rate, arate; - gint64 start, stop, time; - gboolean update; - - /* the newsegment values are used to clip the input samples - * and to convert the incomming timestamps to running time so - * we can do QoS */ - gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format, - &start, &stop, &time); - - /* now configure the values */ - gst_segment_set_newsegment_full (&visual->segment, update, - rate, arate, format, start, stop, time); - - /* and forward */ - res = gst_pad_push_event (visual->srcpad, event); - break; - } - default: - res = gst_pad_push_event (visual->srcpad, event); - break; - } - - gst_object_unref (visual); - return res; -} - -static gboolean -gst_visual_gl_src_event (GstPad * pad, GstEvent * event) -{ - GstVisualGL *visual; - gboolean res; - - visual = GST_VISUAL_GL (gst_pad_get_parent (pad)); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_QOS: - { - gdouble proportion; - GstClockTimeDiff diff; - GstClockTime timestamp; - - gst_event_parse_qos (event, &proportion, &diff, ×tamp); - - /* save stuff for the _chain function */ - GST_OBJECT_LOCK (visual); - visual->proportion = proportion; - if (diff >= 0) - /* we're late, this is a good estimate for next displayable - * frame (see part-qos.txt) */ - visual->earliest_time = timestamp + 2 * diff + visual->duration; - else - visual->earliest_time = timestamp + diff; - - GST_OBJECT_UNLOCK (visual); - - res = gst_pad_push_event (visual->sinkpad, event); - break; - } - default: - res = gst_pad_push_event (visual->sinkpad, event); - break; - } - - gst_object_unref (visual); - return res; -} - -static gboolean -gst_visual_gl_src_query (GstPad * pad, GstQuery * query) -{ - gboolean res; - GstVisualGL *visual; - - visual = GST_VISUAL_GL (gst_pad_get_parent (pad)); - - switch (GST_QUERY_TYPE (query)) { - case GST_QUERY_LATENCY: - { - /* We need to send the query upstream and add the returned latency to our - * own */ - GstClockTime min_latency, max_latency; - gboolean us_live; - GstClockTime our_latency; - guint max_samples; - - if ((res = gst_pad_peer_query (visual->sinkpad, query))) { - gst_query_parse_latency (query, &us_live, &min_latency, &max_latency); - - GST_DEBUG_OBJECT (visual, "Peer latency: min %" - GST_TIME_FORMAT " max %" GST_TIME_FORMAT, - GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); - - /* the max samples we must buffer buffer */ - max_samples = MAX (VISUAL_SAMPLES, visual->spf); - our_latency = - gst_util_uint64_scale_int (max_samples, GST_SECOND, visual->rate); - - GST_DEBUG_OBJECT (visual, "Our latency: %" GST_TIME_FORMAT, - GST_TIME_ARGS (our_latency)); - - /* we add some latency but only if we need to buffer more than what - * upstream gives us */ - min_latency += our_latency; - if (max_latency != -1) - max_latency += our_latency; - - GST_DEBUG_OBJECT (visual, "Calculated total latency : min %" - GST_TIME_FORMAT " max %" GST_TIME_FORMAT, - GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); - - gst_query_set_latency (query, TRUE, min_latency, max_latency); - } - break; - } - case GST_QUERY_CUSTOM: - { - GstStructure *structure = gst_query_get_structure (query); - gchar *name = gst_element_get_name (visual); - - res = g_strcmp0 (name, gst_structure_get_name (structure)) == 0; - g_free (name); - - if (!res) - res = gst_pad_query_default (pad, query); - break; - } - default: - res = gst_pad_peer_query (visual->sinkpad, query); - break; - } - - gst_object_unref (visual); - - return res; -} - -/* allocate and output buffer, if no format was negotiated, this - * function will negotiate one. After calling this function, a - * reverse negotiation could have happened. */ -static GstFlowReturn -get_buffer (GstVisualGL * visual, GstGLBuffer ** outbuf) -{ - /* we don't know an output format yet, pick one */ - if (GST_PAD_CAPS (visual->srcpad) == NULL) { - if (!gst_vis_gl_src_negotiate (visual)) - return GST_FLOW_NOT_NEGOTIATED; - } - - GST_DEBUG_OBJECT (visual, "allocating output buffer with caps %" - GST_PTR_FORMAT, GST_PAD_CAPS (visual->srcpad)); - - *outbuf = gst_gl_buffer_new (visual->display, visual->width, visual->height); - if (*outbuf == NULL) - return GST_FLOW_ERROR; - - gst_buffer_set_caps (GST_BUFFER (*outbuf), GST_PAD_CAPS (visual->srcpad)); - return GST_FLOW_OK; -} - -static void -actor_setup (GstGLDisplay * display, GstVisualGL * visual) -{ - /* save and clear top of the stack */ - glPushAttrib (GL_ALL_ATTRIB_BITS); - - glMatrixMode (GL_PROJECTION); - glPushMatrix (); - glLoadIdentity (); - - glMatrixMode (GL_MODELVIEW); - glPushMatrix (); - glLoadIdentity (); - - visual->actor_setup_result = visual_actor_realize (visual->actor); - if (visual->actor_setup_result == 0) { - /* store the actor's matrices for rendering the first frame */ - glGetDoublev (GL_MODELVIEW_MATRIX, visual->actor_modelview_matrix); - glGetDoublev (GL_PROJECTION_MATRIX, visual->actor_projection_matrix); - - visual->is_enabled_gl_depth_test = glIsEnabled (GL_DEPTH_TEST); - glGetIntegerv (GL_DEPTH_FUNC, &visual->gl_depth_func); - - visual->is_enabled_gl_blend = glIsEnabled (GL_BLEND); - glGetIntegerv (GL_BLEND_SRC_ALPHA, &visual->gl_blend_src_alpha); - - /* retore matrix */ - glMatrixMode (GL_PROJECTION); - glPopMatrix (); - - glMatrixMode (GL_MODELVIEW); - glPopMatrix (); - - glPopAttrib (); - } -} - -static void -actor_negotiate (GstGLDisplay * display, GstVisualGL * visual) -{ - gint err = VISUAL_OK; - - err = visual_video_set_depth (visual->video, VISUAL_VIDEO_DEPTH_GL); - if (err != VISUAL_OK) - g_warning ("failed to visual_video_set_depth\n"); - - err = - visual_video_set_dimension (visual->video, visual->width, visual->height); - if (err != VISUAL_OK) - g_warning ("failed to visual_video_set_dimension\n"); - - err = visual_actor_video_negotiate (visual->actor, 0, FALSE, FALSE); - if (err != VISUAL_OK) - g_warning ("failed to visual_actor_video_negotiate\n"); -} - -static void -check_gl_matrix (void) -{ - GLdouble projection_matrix[16]; - GLdouble modelview_matrix[16]; - gint i = 0; - gint j = 0; - - glGetDoublev (GL_PROJECTION_MATRIX, projection_matrix); - glGetDoublev (GL_MODELVIEW_MATRIX, modelview_matrix); - - for (j = 0; j < 4; ++j) { - for (i = 0; i < 4; ++i) { - if (projection_matrix[i + 4 * j] != projection_matrix[i + 4 * j]) - g_warning ("invalid projection matrix at coordiante %dx%d: %f\n", i, j, - projection_matrix[i + 4 * j]); - if (modelview_matrix[i + 4 * j] != modelview_matrix[i + 4 * j]) - g_warning ("invalid modelview_matrix matrix at coordiante %dx%d: %f\n", - i, j, modelview_matrix[i + 4 * j]); - } - } -} - -static void -render_frame (GstVisualGL * visual) -{ - const guint16 *data; - VisBuffer *lbuf, *rbuf; - guint16 ldata[VISUAL_SAMPLES], rdata[VISUAL_SAMPLES]; - guint i; - gcahr *name; - - /* Read VISUAL_SAMPLES samples per channel */ - data = - (const guint16 *) gst_adapter_peek (visual->adapter, - VISUAL_SAMPLES * visual->bps); - - lbuf = visual_buffer_new_with_buffer (ldata, sizeof (ldata), NULL); - rbuf = visual_buffer_new_with_buffer (rdata, sizeof (rdata), NULL); - - if (visual->channels == 2) { - for (i = 0; i < VISUAL_SAMPLES; i++) { - ldata[i] = *data++; - rdata[i] = *data++; - } - } else { - for (i = 0; i < VISUAL_SAMPLES; i++) { - ldata[i] = *data; - rdata[i] = *data++; - } - } - - visual_audio_samplepool_input_channel (visual->audio->samplepool, - lbuf, visual->libvisual_rate, VISUAL_AUDIO_SAMPLE_FORMAT_S16, - VISUAL_AUDIO_CHANNEL_LEFT); - visual_audio_samplepool_input_channel (visual->audio->samplepool, - rbuf, visual->libvisual_rate, VISUAL_AUDIO_SAMPLE_FORMAT_S16, - VISUAL_AUDIO_CHANNEL_RIGHT); - - visual_object_unref (VISUAL_OBJECT (lbuf)); - visual_object_unref (VISUAL_OBJECT (rbuf)); - - visual_audio_analyze (visual->audio); - - /* apply the matrices that the actor set up */ - glPushAttrib (GL_ALL_ATTRIB_BITS); - - glMatrixMode (GL_PROJECTION); - glPushMatrix (); - glLoadMatrixd (visual->actor_projection_matrix); - - glMatrixMode (GL_MODELVIEW); - glPushMatrix (); - glLoadMatrixd (visual->actor_modelview_matrix); - - /* This line try to hacks compatiblity with libprojectM - * If libprojectM version <= 2.0.0 then we have to unbind our current - * fbo to see something. But it's incorrect and we cannot use fbo chainning (append other glfilters - * after libvisual_gl_projectM will not work) - * To have full compatibility, libprojectM needs to take care of our fbo. - * Indeed libprojectM has to unbind it before the first rendering pass - * and then rebind it before the final pass. It's done from 2.0.1 - */ - name = gst_element_get_name (GST_ELEMENT (visual)); - if (g_ascii_strncasecmp (name, "visualglprojectm", 16) == 0 - && !HAVE_PROJECTM_TAKING_CARE_OF_EXTERNAL_FBO) - glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0); - g_free (name); - - actor_negotiate (visual->display, visual); - - if (visual->is_enabled_gl_depth_test) { - glEnable (GL_DEPTH_TEST); - glDepthFunc (visual->gl_depth_func); - } - - if (visual->is_enabled_gl_blend) { - glEnable (GL_BLEND); - glBlendFunc (visual->gl_blend_src_alpha, GL_ZERO); - } - - visual_actor_run (visual->actor, visual->audio); - - check_gl_matrix (); - - glMatrixMode (GL_PROJECTION); - glPopMatrix (); - - glMatrixMode (GL_MODELVIEW); - glPopMatrix (); - - glPopAttrib (); - - glDisable (GL_DEPTH_TEST); - glDisable (GL_BLEND); - - /*glDisable (GL_LIGHT0); - glDisable (GL_LIGHTING); - glDisable (GL_POLYGON_OFFSET_FILL); - glDisable (GL_COLOR_MATERIAL); - glDisable (GL_CULL_FACE); */ - - GST_DEBUG_OBJECT (visual, "rendered one frame"); -} - -static void -bottom_up_to_top_down (gint width, gint height, guint texture, - GstVisualGL * visual) -{ - - glEnable (GL_TEXTURE_2D); - glBindTexture (GL_TEXTURE_2D, texture); - - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - - glBegin (GL_QUADS); - glTexCoord2i (0, 0); - glVertex2i (-1, 1); - glTexCoord2i (width, 0); - glVertex2i (1, 1); - glTexCoord2i (width, height); - glVertex2i (1, -1); - glTexCoord2i (0, height); - glVertex2i (-1, -1); - glEnd (); - - glBindTexture (GL_TEXTURE_2D, 0); - glDisable (GL_TEXTURE_2D); - - GST_DEBUG_OBJECT (visual, "bottom up to top down"); -} - -static GstFlowReturn -gst_visual_gl_chain (GstPad * pad, GstBuffer * buffer) -{ - GstGLBuffer *outbuf = NULL; - GstVisualGL *visual = GST_VISUAL_GL (gst_pad_get_parent (pad)); - GstFlowReturn ret = GST_FLOW_OK; - guint avail; - - GST_DEBUG_OBJECT (visual, "chain function called"); - - /* If we don't have an output format yet, preallocate a buffer to try and - * set one */ - if (GST_PAD_CAPS (visual->srcpad) == NULL) { - ret = get_buffer (visual, &outbuf); - if (ret != GST_FLOW_OK) { - gst_buffer_unref (buffer); - goto beach; - } - } - - /* resync on DISCONT */ - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) { - gst_adapter_clear (visual->adapter); - } - - GST_DEBUG_OBJECT (visual, - "Input buffer has %d samples, time=%" G_GUINT64_FORMAT, - GST_BUFFER_SIZE (buffer) / visual->bps, GST_BUFFER_TIMESTAMP (buffer)); - - gst_adapter_push (visual->adapter, buffer); - - while (TRUE) { - gboolean need_skip; - guint64 dist, timestamp; - - GST_DEBUG_OBJECT (visual, "processing buffer"); - - avail = gst_adapter_available (visual->adapter); - GST_DEBUG_OBJECT (visual, "avail now %u", avail); - - /* we need at least VISUAL_SAMPLES samples */ - if (avail < VISUAL_SAMPLES * visual->bps) - break; - - /* we need at least enough samples to make one frame */ - if (avail < visual->spf * visual->bps) - break; - - /* get timestamp of the current adapter byte */ - timestamp = gst_adapter_prev_timestamp (visual->adapter, &dist); - if (GST_CLOCK_TIME_IS_VALID (timestamp)) { - /* convert bytes to time */ - dist /= visual->bps; - timestamp += gst_util_uint64_scale_int (dist, GST_SECOND, visual->rate); - } - - if (timestamp != -1) { - gint64 qostime; - - /* QoS is done on running time */ - qostime = gst_segment_to_running_time (&visual->segment, GST_FORMAT_TIME, - timestamp); - qostime += visual->duration; - - GST_OBJECT_LOCK (visual); - /* check for QoS, don't compute buffers that are known to be late */ - need_skip = visual->earliest_time != -1 && - qostime <= visual->earliest_time; - GST_OBJECT_UNLOCK (visual); - - if (need_skip) { - GST_WARNING_OBJECT (visual, - "QoS: skip ts: %" GST_TIME_FORMAT ", earliest: %" GST_TIME_FORMAT, - GST_TIME_ARGS (qostime), GST_TIME_ARGS (visual->earliest_time)); - goto skip; - } - } - - /* alloc a buffer if we don't have one yet, this happens - * when we pushed a buffer in this while loop before */ - if (outbuf == NULL) { - ret = get_buffer (visual, &outbuf); - if (ret != GST_FLOW_OK) { - goto beach; - } - } - - /* render libvisual plugin to our target */ - gst_gl_display_use_fbo_v2 (visual->display, - visual->width, visual->height, visual->fbo, visual->depthbuffer, - visual->midtexture, (GLCB_V2) render_frame, (gpointer *) visual); - - /* gst video is top-down whereas opengl plan is bottom up */ - gst_gl_display_use_fbo (visual->display, - visual->width, visual->height, visual->fbo, visual->depthbuffer, - outbuf->texture, (GLCB) bottom_up_to_top_down, - visual->width, visual->height, visual->midtexture, - 0, visual->width, 0, visual->height, GST_GL_DISPLAY_PROJECTION_ORTHO2D, - (gpointer *) visual); - - GST_BUFFER_TIMESTAMP (outbuf) = timestamp; - GST_BUFFER_DURATION (outbuf) = visual->duration; - - ret = gst_pad_push (visual->srcpad, GST_BUFFER (outbuf)); - outbuf = NULL; - - skip: - GST_DEBUG_OBJECT (visual, "finished frame, flushing %u samples from input", - visual->spf); - - /* Flush out the number of samples per frame */ - gst_adapter_flush (visual->adapter, visual->spf * visual->bps); - - /* quit the loop if something was wrong */ - if (ret != GST_FLOW_OK) - break; - } - -beach: - - if (outbuf != NULL) - gst_gl_buffer_unref (outbuf); - - gst_object_unref (visual); - - return ret; -} - -static GstStateChangeReturn -gst_visual_gl_change_state (GstElement * element, GstStateChange transition) -{ - GstVisualGL *visual = GST_VISUAL_GL (element); - GstStateChangeReturn ret; - - switch (transition) { - case GST_STATE_CHANGE_NULL_TO_READY: - break; - case GST_STATE_CHANGE_READY_TO_PAUSED: - { - GstElement *parent = GST_ELEMENT (gst_element_get_parent (visual)); - GstStructure *structure = NULL; - GstQuery *query = NULL; - gboolean isPerformed = FALSE; - gchar *name; - - if (!parent) { - GST_ELEMENT_ERROR (visual, CORE, STATE_CHANGE, (NULL), - ("A parent bin is required")); - return FALSE; - } - - name = gst_element_get_name (visual); - structure = gst_structure_new (name, NULL); - query = gst_query_new_application (GST_QUERY_CUSTOM, structure); - g_free (name); - - isPerformed = gst_element_query (parent, query); - - if (isPerformed) { - const GValue *id_value = - gst_structure_get_value (structure, "gstgldisplay"); - if (G_VALUE_HOLDS_POINTER (id_value)) - /* at least one gl element is after in our gl chain */ - visual->display = - gst_object_ref (GST_GL_DISPLAY (g_value_get_pointer (id_value))); - else { - /* this gl filter is a sink in terms of the gl chain */ - visual->display = gst_gl_display_new (); - gst_gl_display_create_context (visual->display, 0); - //TODO visual->external_gl_context); - } - - gst_visual_gl_reset (visual); - - visual->actor = - visual_actor_new (GST_VISUAL_GL_GET_CLASS (visual)->plugin->info-> - plugname); - visual->video = visual_video_new (); - visual->audio = visual_audio_new (); - - if (!visual->actor || !visual->video) - goto actor_setup_failed; - - gst_gl_display_thread_add (visual->display, - (GstGLDisplayThreadFunc) actor_setup, visual); - - if (visual->actor_setup_result != 0) - goto actor_setup_failed; - else - visual_actor_set_video (visual->actor, visual->video); - } - - gst_query_unref (query); - gst_object_unref (GST_OBJECT (parent)); - - if (!isPerformed) - return GST_STATE_CHANGE_FAILURE; - } - break; - case GST_STATE_CHANGE_PAUSED_TO_PLAYING: - break; - default: - break; - } - - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); - - switch (transition) { - case GST_STATE_CHANGE_PLAYING_TO_PAUSED: - break; - case GST_STATE_CHANGE_PAUSED_TO_READY: - { - if (visual->fbo) { - gst_gl_display_del_fbo (visual->display, visual->fbo, - visual->depthbuffer); - visual->fbo = 0; - visual->depthbuffer = 0; - } - if (visual->midtexture) { - gst_gl_display_del_texture (visual->display, visual->midtexture, - visual->width, visual->height); - visual->midtexture = 0; - } - if (visual->display) { - gst_object_unref (visual->display); - visual->display = NULL; - } - - gst_visual_gl_clear_actors (visual); - } - break; - case GST_STATE_CHANGE_READY_TO_NULL: - break; - default: - break; - } - - return ret; - - /* ERRORS */ -actor_setup_failed: - { - GST_ELEMENT_ERROR (visual, LIBRARY, INIT, (NULL), - ("could not set up actor")); - gst_visual_gl_clear_actors (visual); - return GST_STATE_CHANGE_FAILURE; - } -} - -static void -make_valid_name (char *name) -{ - /* - * Replace invalid chars with _ in the type name - */ - static const gchar extra_chars[] = "-_+"; - gchar *p = name; - - for (; *p; p++) { - int valid = ((p[0] >= 'A' && p[0] <= 'Z') || - (p[0] >= 'a' && p[0] <= 'z') || - (p[0] >= '0' && p[0] <= '9') || strchr (extra_chars, p[0])); - if (!valid) - *p = '_'; - } -} - -static gboolean -gst_visual_gl_actor_plugin_is_gl (VisObject * plugin, const gchar * name) -{ - gboolean is_gl; - gint depth; - - depth = VISUAL_ACTOR_PLUGIN (plugin)->vidoptions.depth; - is_gl = (depth & VISUAL_VIDEO_DEPTH_GL) != 0; - - if (!is_gl) { - GST_DEBUG ("plugin %s is not a GL plugin (%d), ignoring", name, depth); - } else { - GST_DEBUG ("plugin %s is a GL plugin (%d), registering", name, depth); - } - - return is_gl; -} - -static gboolean -plugin_init (GstPlugin * plugin) -{ - guint i, count; - VisList *list; - - GST_DEBUG_CATEGORY_INIT (libvisual_debug, "libvisual", 0, - "libvisual audio visualisations"); - -#ifdef LIBVISUAL_PLUGINSBASEDIR - gst_plugin_add_dependency_simple (plugin, "HOME/.libvisual/actor", - LIBVISUAL_PLUGINSBASEDIR "/actor", NULL, GST_PLUGIN_DEPENDENCY_FLAG_NONE); -#endif - - visual_log_set_verboseness (VISUAL_LOG_VERBOSENESS_LOW); - visual_log_set_info_handler (libvisual_log_handler, (void *) GST_LEVEL_INFO); - visual_log_set_warning_handler (libvisual_log_handler, - (void *) GST_LEVEL_WARNING); - visual_log_set_critical_handler (libvisual_log_handler, - (void *) GST_LEVEL_ERROR); - visual_log_set_error_handler (libvisual_log_handler, - (void *) GST_LEVEL_ERROR); - - if (!visual_is_initialized ()) - if (visual_init (NULL, NULL) != 0) - return FALSE; - - list = visual_actor_get_list (); - - count = visual_collection_size (VISUAL_COLLECTION (list)); - - for (i = 0; i < count; i++) { - VisPluginRef *ref = visual_list_get (list, i); - VisPluginData *visplugin = NULL; - gboolean skip = FALSE; - GType type; - gchar *name; - GTypeInfo info = { - sizeof (GstVisualGLClass), - NULL, - NULL, - gst_visual_gl_class_init, - NULL, - ref, - sizeof (GstVisualGL), - 0, - NULL - }; - - visplugin = visual_plugin_load (ref); - - if (ref->info->plugname == NULL) - continue; - - /* Blacklist some plugins */ - if (strcmp (ref->info->plugname, "gstreamer") == 0 || - strcmp (ref->info->plugname, "gdkpixbuf") == 0) { - skip = TRUE; - } else { - /* only register plugins that support GL */ - skip = !(gst_visual_gl_actor_plugin_is_gl (visplugin->info->plugin, - visplugin->info->plugname)); - } - - visual_plugin_unload (visplugin); - - if (!skip) { - name = g_strdup_printf ("GstVisualGL%s", ref->info->plugname); - make_valid_name (name); - type = g_type_register_static (GST_TYPE_VISUAL_GL, name, &info, 0); - g_free (name); - - name = g_strdup_printf ("libvisual_gl_%s", ref->info->plugname); - make_valid_name (name); - if (!gst_element_register (plugin, name, GST_RANK_NONE, type)) { - g_free (name); - return FALSE; - } - g_free (name); - } - } - - return TRUE; -} - -GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "libvisual-gl", - "libvisual-gl visualization plugins", - plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/ext/meson.build b/ext/meson.build index 62af78950..0eba7b49a 100644 --- a/ext/meson.build +++ b/ext/meson.build @@ -1,4 +1,3 @@ -#subdir('apexsink') subdir('assrender') #subdir('bs2b') subdir('bz2') @@ -25,13 +24,11 @@ subdir('kate') #subdir('ladspa') subdir('libde265') subdir('libmms') -#subdir('libvisual') #subdir('lv2') #subdir('modplug') #subdir('mpeg2enc') #subdir('mplex') #subdir('musepack') -#subdir('nas') #subdir('neon') #subdir('ofa') #subdir('openal') @@ -41,16 +38,13 @@ subdir('openh264') subdir('openjpeg') #subdir('openni2') subdir('opus') -#subdir('qt') subdir('resindvd') subdir('rsvg') subdir('rtmp') subdir('sbc') subdir('schroedinger') -#subdir('sdl') subdir('smoothstreaming') #subdir('sndfile') -#subdir('sndio') if cc.get_id() != 'msvc' # soundtouch doesn't do exporting of symbols for DLLs and I'm not sure how to # do that for C++ classes. -- Nirbheek @@ -62,7 +56,7 @@ endif #subdir('spc') subdir('srtp') #subdir('teletextdec') -#subdir('timidity') +#subdir('wildmidi') subdir('ttml') subdir('voaacenc') #subdir('voamrwbenc') @@ -71,5 +65,4 @@ subdir('wayland') #subdir('webrtcdsp') subdir('webp') subdir('x265') -#subdir('xvid') subdir('zbar') diff --git a/ext/nas/Makefile.am b/ext/nas/Makefile.am deleted file mode 100644 index ef1162abc..000000000 --- a/ext/nas/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -plugin_LTLIBRARIES = libgstnassink.la - -libgstnassink_la_SOURCES = nassink.c -libgstnassink_la_CFLAGS = \ - $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(NAS_CFLAGS) -libgstnassink_la_LIBADD = \ - $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) $(NAS_LIBS) -libgstnassink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -libgstnassink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) - -noinst_HEADERS = nassink.h diff --git a/ext/nas/nassink.c b/ext/nas/nassink.c deleted file mode 100644 index 2d6404b8b..000000000 --- a/ext/nas/nassink.c +++ /dev/null @@ -1,583 +0,0 @@ -/* GStreamer - * Copyright (C) <2003> Laurent Vivier - * Copyright (C) <2004> Arwed v. Merkatz - * - * Based on esdsink.c: - * Copyright (C) <2001> Richard Boulton - * - * 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., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include