summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2012-02-10 16:46:50 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2012-02-10 16:46:50 +0100
commit1119f6ee4103990ccc55d521be08bdce10737c8e (patch)
treed2b9a31d43d6a1f832951a9c984127e27622211a /ext
parent9fcfa6046d0e8e8ec89c32d7091b747088265d70 (diff)
parent1cbd755a2cd45531076c7b19ef194b77d5575cb0 (diff)
downloadgstreamer-plugins-bad-1119f6ee4103990ccc55d521be08bdce10737c8e.tar.gz
Merge branch 'master' into 0.11
Conflicts: ext/chromaprint/gstchromaprint.c ext/mpeg2enc/Makefile.am ext/voaacenc/gstvoaacenc.c gst/dvbsuboverlay/gstdvbsuboverlay.c gst/mpegtsdemux/mpegtsbase.c gst/sdp/gstsdpdemux.c gst/videoparsers/gsth264parse.c sys/d3dvideosink/d3dvideosink.c tests/examples/camerabin/gst-camera-perf.c tests/examples/camerabin/gst-camerabin-test.c tests/examples/camerabin2/gst-camerabin2-test.c tests/examples/mxf/mxfdemux-structure.c tests/examples/scaletempo/demo-main.c
Diffstat (limited to 'ext')
-rw-r--r--ext/cog/Makefile.am1
-rw-r--r--ext/cog/gstcogmse.c1
-rw-r--r--ext/curl/Makefile.am1
-rw-r--r--ext/curl/gstcurlsink.c2
-rw-r--r--ext/faad/gstfaad.c3
-rw-r--r--ext/gsettings/Makefile.am2
-rw-r--r--ext/gsettings/gstgsettingsaudiosink.c1
-rw-r--r--ext/gsettings/gstgsettingsaudiosrc.c1
-rw-r--r--ext/gsettings/gstgsettingsvideosink.c1
-rw-r--r--ext/gsettings/gstgsettingsvideosrc.c1
-rw-r--r--ext/kate/Makefile.am2
-rw-r--r--ext/kate/gstkateenc.c60
-rw-r--r--ext/kate/gstkateparse.c3
-rw-r--r--ext/kate/gstkatetiger.c45
-rw-r--r--ext/kate/gstkateutil.c57
-rw-r--r--ext/kate/gstkateutil.h2
-rw-r--r--ext/modplug/gstmodplug.cc4
-rw-r--r--ext/mpeg2enc/Makefile.am3
-rw-r--r--ext/mpeg2enc/gstmpeg2enc.cc1
-rw-r--r--ext/mplex/Makefile.am2
-rw-r--r--ext/mplex/gstmplex.cc1
-rw-r--r--ext/opus/Makefile.am6
-rw-r--r--ext/opus/gstopusenc.c1
-rw-r--r--ext/resindvd/resindvdbin.c1
-rw-r--r--ext/resindvd/resindvdsrc.c11
-rw-r--r--ext/resindvd/rsnparsetter.c1
-rw-r--r--ext/schroedinger/gstschrodec.c4
-rw-r--r--ext/schroedinger/gstschroenc.c10
-rw-r--r--ext/schroedinger/gstschroutils.c3
-rw-r--r--ext/schroedinger/gstschroutils.h4
-rw-r--r--ext/sdl/Makefile.am2
-rw-r--r--ext/sdl/sdlaudiosink.c2
-rw-r--r--ext/sdl/sdlvideosink.c1
-rw-r--r--ext/voaacenc/gstvoaacenc.c2
-rw-r--r--ext/voamrwbenc/gstvoamrwbenc.c3
35 files changed, 169 insertions, 76 deletions
diff --git a/ext/cog/Makefile.am b/ext/cog/Makefile.am
index 81e0f15e1..bbed6fe0e 100644
--- a/ext/cog/Makefile.am
+++ b/ext/cog/Makefile.am
@@ -5,6 +5,7 @@ include $(top_srcdir)/common/orc.mak
libgstcog_la_CFLAGS = \
-DCOG_ENABLE_UNSTABLE_API \
+ $(GST_PLUGINS_BAD_CFLAGS) \
-I$(srcdir)/.. \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_CFLAGS) \
diff --git a/ext/cog/gstcogmse.c b/ext/cog/gstcogmse.c
index f4ac3fb58..f73a3b8d4 100644
--- a/ext/cog/gstcogmse.c
+++ b/ext/cog/gstcogmse.c
@@ -23,6 +23,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <gst/video/video.h>
#include <string.h>
#include <cog/cogframe.h>
diff --git a/ext/curl/Makefile.am b/ext/curl/Makefile.am
index 77b237385..42fbe31b4 100644
--- a/ext/curl/Makefile.am
+++ b/ext/curl/Makefile.am
@@ -2,6 +2,7 @@ plugin_LTLIBRARIES = libgstcurl.la
libgstcurl_la_SOURCES = gstcurl.c gstcurlsink.c
libgstcurl_la_CFLAGS = \
+ $(GST_PLUGINS_BAD_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_CFLAGS) \
$(CURL_CFLAGS)
diff --git a/ext/curl/gstcurlsink.c b/ext/curl/gstcurlsink.c
index 2a448f436..a06843522 100644
--- a/ext/curl/gstcurlsink.c
+++ b/ext/curl/gstcurlsink.c
@@ -57,6 +57,8 @@
#include "gstcurlsink.h"
+#include "gst/glib-compat-private.h"
+
/* Default values */
#define GST_CAT_DEFAULT gst_curl_sink_debug
#define DEFAULT_URL "localhost:5555"
diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c
index 8fa344724..94ac0a781 100644
--- a/ext/faad/gstfaad.c
+++ b/ext/faad/gstfaad.c
@@ -91,7 +91,8 @@ GST_DEBUG_CATEGORY_STATIC (faad_debug);
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("audio/mpeg, " "mpegversion = (int) { 2, 4 }")
+ GST_STATIC_CAPS ("audio/mpeg, " "mpegversion = (int) 2; "
+ "audio/mpeg, mpegversion = (int) 4, stream-format = (string) { raw, adts }")
);
#define STATIC_RAW_CAPS(format) \
diff --git a/ext/gsettings/Makefile.am b/ext/gsettings/Makefile.am
index 64801df9b..6cef006a6 100644
--- a/ext/gsettings/Makefile.am
+++ b/ext/gsettings/Makefile.am
@@ -18,7 +18,7 @@ libgstgsettingselements_la_SOURCES = \
gstswitchsrc.c \
plugin.c
-libgstgsettingselements_la_CFLAGS = $(GST_CFLAGS) $(GSETTINGS_CFLAGS) $(DIR_CFLAGS) \
+libgstgsettingselements_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS) $(GSETTINGS_CFLAGS) $(DIR_CFLAGS) \
-DGstSwitchSrc=GstGSettingsSwitchSrc \
-DGstSwitchSrcClass=GstGSettingsSwitchSrcClass \
-DGstSwitchSink=GstGSettingsSwitchSink \
diff --git a/ext/gsettings/gstgsettingsaudiosink.c b/ext/gsettings/gstgsettingsaudiosink.c
index 7e115c9de..f4155b3bc 100644
--- a/ext/gsettings/gstgsettingsaudiosink.c
+++ b/ext/gsettings/gstgsettingsaudiosink.c
@@ -35,6 +35,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <string.h>
#include "gstgsettingsaudiosink.h"
diff --git a/ext/gsettings/gstgsettingsaudiosrc.c b/ext/gsettings/gstgsettingsaudiosrc.c
index 844c8eba4..7b9bd1f18 100644
--- a/ext/gsettings/gstgsettingsaudiosrc.c
+++ b/ext/gsettings/gstgsettingsaudiosrc.c
@@ -35,6 +35,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <string.h>
#include "gstgsettingsaudiosrc.h"
diff --git a/ext/gsettings/gstgsettingsvideosink.c b/ext/gsettings/gstgsettingsvideosink.c
index 2444c7c5d..f04e8054c 100644
--- a/ext/gsettings/gstgsettingsvideosink.c
+++ b/ext/gsettings/gstgsettingsvideosink.c
@@ -35,6 +35,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <string.h>
#include "gstgsettingsvideosink.h"
diff --git a/ext/gsettings/gstgsettingsvideosrc.c b/ext/gsettings/gstgsettingsvideosrc.c
index 42ee5fef5..877656814 100644
--- a/ext/gsettings/gstgsettingsvideosrc.c
+++ b/ext/gsettings/gstgsettingsvideosrc.c
@@ -35,6 +35,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <string.h>
#include "gstgsettingsvideosrc.h"
diff --git a/ext/kate/Makefile.am b/ext/kate/Makefile.am
index fd7d6ced4..4e310d92b 100644
--- a/ext/kate/Makefile.am
+++ b/ext/kate/Makefile.am
@@ -9,7 +9,7 @@ libgstkate_la_SOURCES += gstkatetiger.c
endif
# flags used to compile this plugin
-libgstkate_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(TIGER_CFLAGS) $(KATE_CFLAGS)
+libgstkate_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(TIGER_CFLAGS) $(KATE_CFLAGS)
libgstkate_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) -lgsttag-$(GST_MAJORMINOR) $(GST_LIBS) $(TIGER_LIBS) $(KATE_LIBS)
libgstkate_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstkate_la_LIBTOOLFLAGS = --tag=disable-static
diff --git a/ext/kate/gstkateenc.c b/ext/kate/gstkateenc.c
index 450e8e61e..db365691c 100644
--- a/ext/kate/gstkateenc.c
+++ b/ext/kate/gstkateenc.c
@@ -409,10 +409,6 @@ gst_kate_enc_create_buffer (GstKateEnc * ke, kate_packet * kp,
GST_BUFFER_TIMESTAMP (buffer) = timestamp;
GST_BUFFER_DURATION (buffer) = duration;
- /* data packets are each on their own page */
-// if (!header)
-// GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
-
return buffer;
}
@@ -428,9 +424,6 @@ gst_kate_enc_push_buffer (GstKateEnc * ke, GstBuffer * buffer)
GST_BUFFER_TIMESTAMP (buffer) + GST_BUFFER_DURATION (buffer);
}
- /* Hack to flush each packet on its own page - taken off the CMML encoder element */
- GST_BUFFER_DURATION (buffer) = G_MAXINT64;
-
flow = gst_pad_push (ke->srcpad, buffer);
if (G_UNLIKELY (flow != GST_FLOW_OK)) {
GST_WARNING_OBJECT (ke->srcpad, "push flow: %s", gst_flow_get_name (flow));
@@ -608,7 +601,8 @@ gst_kate_enc_send_headers (GstKateEnc * ke)
break;
} else {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL),
- ("kate_encode_headers: %d", ret));
+ ("Failed encoding headers: %s",
+ gst_kate_util_get_error_message (ret)));
rflow = GST_FLOW_ERROR;
break;
}
@@ -656,7 +650,8 @@ gst_kate_enc_flush_headers (GstKateEnc * ke)
ke->headers_sent = TRUE;
GST_INFO_OBJECT (ke, "headers flushed");
} else {
- GST_WARNING_OBJECT (ke, "Failed to flush headers: %d", rflow);
+ GST_WARNING_OBJECT (ke, "Failed to flush headers: %s",
+ gst_flow_get_name (rflow));
}
}
return rflow;
@@ -694,7 +689,8 @@ gst_kate_enc_generate_keepalive (GstKateEnc * ke, GstClockTime timestamp)
GST_DEBUG_OBJECT (ke, "keepalive at %f", t);
ret = kate_encode_keepalive (&ke->k, t, &kp);
if (ret < 0) {
- GST_WARNING_OBJECT (ke, "Failed to encode keepalive packet: %d", ret);
+ GST_WARNING_OBJECT (ke, "Failed to encode keepalive packet: %s",
+ gst_kate_util_get_error_message (ret));
} else {
kate_int64_t granpos = kate_encode_get_granule (&ke->k);
GST_LOG_OBJECT (ke, "Keepalive packet encoded");
@@ -724,7 +720,8 @@ gst_kate_enc_flush_waiting (GstKateEnc * ke, GstClockTime now)
ret = kate_encode_text (&ke->k, t0, t1, "", 0, &kp);
if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL),
- ("kate_encode_text: %d", ret));
+ ("Failed to encode text packet: %s",
+ gst_kate_util_get_error_message (ret)));
rflow = GST_FLOW_ERROR;
} else {
rflow =
@@ -735,7 +732,8 @@ gst_kate_enc_flush_waiting (GstKateEnc * ke, GstClockTime now)
if (rflow == GST_FLOW_OK) {
GST_DEBUG_OBJECT (ke, "delayed SPU packet flushed");
} else {
- GST_WARNING_OBJECT (ke, "Failed to flush delayed SPU packet: %d", rflow);
+ GST_WARNING_OBJECT (ke, "Failed to flush delayed SPU packet: %s",
+ gst_flow_get_name (rflow));
}
/* forget it even if we couldn't flush it */
@@ -845,19 +843,21 @@ gst_kate_enc_chain_spu (GstKateEnc * ke, GstBuffer * buf)
ret = kate_encode_set_region (&ke->k, kregion);
if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL),
- ("kate_encode_set_region: %d", ret));
+ ("Failed to set region: %s", gst_kate_util_get_error_message (ret)));
rflow = GST_FLOW_ERROR;
} else {
ret = kate_encode_set_palette (&ke->k, kpalette);
if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL),
- ("kate_encode_set_palette: %d", ret));
+ ("Failed to set palette: %s",
+ gst_kate_util_get_error_message (ret)));
rflow = GST_FLOW_ERROR;
} else {
ret = kate_encode_set_bitmap (&ke->k, kbitmap);
if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL),
- ("kate_encode_set_bitmap: %d", ret));
+ ("Failed to set bitmap: %s",
+ gst_kate_util_get_error_message (ret)));
rflow = GST_FLOW_ERROR;
} else {
/* Some SPUs have no hide time - so I'm going to delay the encoding of the packet
@@ -879,7 +879,8 @@ gst_kate_enc_chain_spu (GstKateEnc * ke, GstBuffer * buf)
ret = kate_encode_text (&ke->k, t0, t1, "", 0, &kp);
if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL),
- ("Failed to encode empty text for SPU buffer: %d", ret));
+ ("Failed to encode empty text for SPU buffer: %s",
+ gst_kate_util_get_error_message (ret)));
rflow = GST_FLOW_ERROR;
} else {
rflow =
@@ -921,7 +922,8 @@ gst_kate_enc_chain_text (GstKateEnc * ke, GstBuffer * buf,
if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL),
- ("kate_encode_set_markup_type: %d", ret));
+ ("Failed to set markup type: %s",
+ gst_kate_util_get_error_message (ret)));
rflow = GST_FLOW_ERROR;
} else {
const char *text;
@@ -943,7 +945,7 @@ gst_kate_enc_chain_text (GstKateEnc * ke, GstBuffer * buf,
ret = kate_encode_text (&ke->k, t0, t1, text, text_len, &kp);
if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL),
- ("Failed to encode text: %d", ret));
+ ("Failed to encode text: %s", gst_kate_util_get_error_message (ret)));
rflow = GST_FLOW_ERROR;
} else {
rflow = gst_kate_enc_chain_push_packet (ke, &kp, start, stop - start + 1);
@@ -1030,21 +1032,23 @@ gst_kate_enc_change_state (GstElement * element, GstStateChange transition)
GST_DEBUG_OBJECT (ke, "READY -> PAUSED, initializing kate state");
ret = kate_info_init (&ke->ki);
if (ret < 0) {
- GST_WARNING_OBJECT (ke, "failed to initialize kate info structure: %d",
- ret);
+ GST_WARNING_OBJECT (ke, "failed to initialize kate info structure: %s",
+ gst_kate_util_get_error_message (ret));
break;
}
if (ke->language) {
ret = kate_info_set_language (&ke->ki, ke->language);
if (ret < 0) {
- GST_WARNING_OBJECT (ke, "failed to set stream language: %d", ret);
+ GST_WARNING_OBJECT (ke, "failed to set stream language: %s",
+ gst_kate_util_get_error_message (ret));
break;
}
}
if (ke->category) {
ret = kate_info_set_category (&ke->ki, ke->category);
if (ret < 0) {
- GST_WARNING_OBJECT (ke, "failed to set stream category: %d", ret);
+ GST_WARNING_OBJECT (ke, "failed to set stream category: %s",
+ gst_kate_util_get_error_message (ret));
break;
}
}
@@ -1052,18 +1056,21 @@ gst_kate_enc_change_state (GstElement * element, GstStateChange transition)
kate_info_set_original_canvas_size (&ke->ki,
ke->original_canvas_width, ke->original_canvas_height);
if (ret < 0) {
- GST_WARNING_OBJECT (ke, "failed to set original canvas size: %d", ret);
+ GST_WARNING_OBJECT (ke, "failed to set original canvas size: %s",
+ gst_kate_util_get_error_message (ret));
break;
}
ret = kate_comment_init (&ke->kc);
if (ret < 0) {
GST_WARNING_OBJECT (ke,
- "failed to initialize kate comment structure: %d", ret);
+ "failed to initialize kate comment structure: %s",
+ gst_kate_util_get_error_message (ret));
break;
}
ret = kate_encode_init (&ke->k, &ke->ki);
if (ret < 0) {
- GST_WARNING_OBJECT (ke, "failed to initialize kate state: %d", ret);
+ GST_WARNING_OBJECT (ke, "failed to initialize kate state: %s",
+ gst_kate_util_get_error_message (ret));
break;
}
ke->headers_sent = FALSE;
@@ -1375,7 +1382,8 @@ gst_kate_enc_sink_event (GstPad * pad, GstEvent * event)
ret = kate_encode_finish (&ke->k, -1, &kp);
if (ret < 0) {
- GST_WARNING_OBJECT (ke, "Failed to encode EOS packet: %d", ret);
+ GST_WARNING_OBJECT (ke, "Failed to encode EOS packet: %s",
+ gst_kate_util_get_error_message (ret));
} else {
kate_int64_t granpos = kate_encode_get_granule (&ke->k);
GST_LOG_OBJECT (ke, "EOS packet encoded");
diff --git a/ext/kate/gstkateparse.c b/ext/kate/gstkateparse.c
index 80c7ca41b..67821d8c1 100644
--- a/ext/kate/gstkateparse.c
+++ b/ext/kate/gstkateparse.c
@@ -189,7 +189,8 @@ gst_kate_parse_push_headers (GstKateParse * parse)
kate_packet_wrap (&packet, size, data);
ret = kate_decode_headerin (&parse->ki, &parse->kc, &packet);
if (G_UNLIKELY (ret < 0)) {
- GST_WARNING_OBJECT (parse, "kate_decode_headerin returned %d", ret);
+ GST_WARNING_OBJECT (parse, "Failed to decode header: %s",
+ gst_kate_util_get_error_message (ret));
}
gst_buffer_unmap (outbuf, data, size);
/* takes ownership of outbuf, which was previously in parse->streamheader */
diff --git a/ext/kate/gstkatetiger.c b/ext/kate/gstkatetiger.c
index 67783dcfa..fda3f7c12 100644
--- a/ext/kate/gstkatetiger.c
+++ b/ext/kate/gstkatetiger.c
@@ -80,6 +80,7 @@
#include <string.h>
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <gst/video/video.h>
#include "gstkate.h"
@@ -683,7 +684,8 @@ gst_kate_tiger_kate_chain (GstPad * pad, GstBuffer * buf)
ev->ki, ev->start_time, ev->end_time, ev->bitmap, ev->text);
if (G_UNLIKELY (ret < 0)) {
GST_WARNING_OBJECT (tiger,
- "failed to add Kate event to Tiger renderer: %d", ret);
+ "failed to add Kate event to Tiger renderer: %s",
+ gst_kate_util_get_error_message (ret));
}
}
}
@@ -777,7 +779,7 @@ gst_kate_tiger_set_composition (GstKateTiger * tiger)
rectangle = gst_video_overlay_rectangle_new_argb (tiger->render_buffer,
tiger->video_width, tiger->video_height, 4 * tiger->video_width,
0, 0, tiger->video_width, tiger->video_height,
- GST_VIDEO_OVERLAY_FORMAT_FLAG_NONE);
+ GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA);
if (tiger->composition)
gst_video_overlay_composition_unref (tiger->composition);
@@ -790,23 +792,6 @@ gst_kate_tiger_set_composition (GstKateTiger * tiger)
}
}
-static inline void
-gst_kate_tiger_unpremultiply (GstKateTiger * tiger)
-{
- guint i, j;
- guint8 *pimage, *text_image = GST_BUFFER_DATA (tiger->render_buffer);
-
- for (i = 0; i < tiger->video_height; i++) {
- pimage = text_image + 4 * (i * tiger->video_width);
- for (j = 0; j < tiger->video_width; j++) {
- TIGER_UNPREMULTIPLY (pimage[TIGER_ARGB_A], pimage[TIGER_ARGB_R],
- pimage[TIGER_ARGB_G], pimage[TIGER_ARGB_B]);
-
- pimage += 4;
- }
- }
-}
-
static GstFlowReturn
gst_kate_tiger_video_chain (GstPad * pad, GstBuffer * buf)
{
@@ -842,7 +827,8 @@ gst_kate_tiger_video_chain (GstPad * pad, GstBuffer * buf)
tiger->video_height, tiger->video_width * 4, tiger->swap_rgb);
if (G_UNLIKELY (ret < 0)) {
GST_WARNING_OBJECT (tiger,
- "Tiger renderer failed to set buffer to video frame: %d", ret);
+ "Tiger renderer failed to set buffer to video frame: %s",
+ gst_kate_util_get_error_message (ret));
goto pass;
}
@@ -852,7 +838,8 @@ gst_kate_tiger_video_chain (GstPad * pad, GstBuffer * buf)
(long) tiger->video_segment.last_stop, t);
ret = tiger_renderer_update (tiger->tr, t, 1);
if (G_UNLIKELY (ret < 0)) {
- GST_WARNING_OBJECT (tiger, "Tiger renderer failed to update: %d", ret);
+ GST_WARNING_OBJECT (tiger, "Tiger renderer failed to update: %s",
+ gst_kate_util_get_error_message (ret));
goto pass;
}
@@ -884,21 +871,20 @@ gst_kate_tiger_video_chain (GstPad * pad, GstBuffer * buf)
tiger->video_height, tiger->video_width * 4, tiger->swap_rgb);
if (G_UNLIKELY (ret < 0)) {
GST_WARNING_OBJECT (tiger,
- "Tiger renderer failed to set buffer to video frame: %d", ret);
+ "Tiger renderer failed to set buffer to video frame: %s",
+ gst_kate_util_get_error_message (ret));
goto pass;
}
ret = tiger_renderer_render (tiger->tr);
if (G_UNLIKELY (ret < 0)) {
GST_WARNING_OBJECT (tiger,
- "Tiger renderer failed to render to video frame: %d", ret);
+ "Tiger renderer failed to render to video frame: %s",
+ gst_kate_util_get_error_message (ret));
} else {
GST_LOG_OBJECT (tiger, "Tiger renderer rendered on video frame at %f", t);
}
if (gst_video_format_is_yuv (tiger->video_format)) {
- /* As the GstVideoOverlayComposition supports only unpremultiply ARGB,
- * we need to unpermultiply it */
- gst_kate_tiger_unpremultiply (tiger);
gst_kate_tiger_set_composition (tiger);
if (tiger->composition)
gst_video_overlay_composition_blend (tiger->composition, buf);
@@ -949,15 +935,16 @@ gst_kate_tiger_change_state (GstElement * element, GstStateChange transition)
if (tiger->decoder.initialized) {
int ret = tiger_renderer_create (&tiger->tr);
if (ret < 0) {
- GST_WARNING_OBJECT (tiger, "failed to create tiger renderer: %d",
- ret);
+ GST_WARNING_OBJECT (tiger, "failed to create tiger renderer: %s",
+ gst_kate_util_get_error_message (ret));
} else {
ret =
tiger_renderer_set_default_font_description (tiger->tr,
tiger->default_font_desc);
if (ret < 0) {
GST_WARNING_OBJECT (tiger,
- "failed to set tiger default font description: %d", ret);
+ "failed to set tiger default font description: %s",
+ gst_kate_util_get_error_message (ret));
}
gst_kate_tiger_update_default_font_color (tiger);
gst_kate_tiger_update_default_background_color (tiger);
diff --git a/ext/kate/gstkateutil.c b/ext/kate/gstkateutil.c
index 787bc3e10..d28158758 100644
--- a/ext/kate/gstkateutil.c
+++ b/ext/kate/gstkateutil.c
@@ -24,6 +24,9 @@
#endif
#include <string.h>
+#ifdef HAVE_TIGER
+#include <tiger/tiger.h>
+#endif
#include <gst/tag/tag.h>
#include "gstkate.h"
#include "gstkateutil.h"
@@ -273,7 +276,8 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder,
if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (element, STREAM, DECODE, (NULL),
- ("Failed to decode Kate packet: %d", ret));
+ ("Failed to decode Kate packet: %s",
+ gst_kate_util_get_error_message (ret)));
return GST_FLOW_ERROR;
}
@@ -443,8 +447,8 @@ gst_kate_decoder_base_change_state (GstKateDecoderBase * decoder,
GST_DEBUG_OBJECT (element, "READY -> PAUSED, initializing kate state");
ret = kate_high_decode_init (&decoder->k);
if (ret < 0) {
- GST_WARNING_OBJECT (element, "failed to initialize kate state: %d",
- ret);
+ GST_WARNING_OBJECT (element, "failed to initialize kate state: %s",
+ gst_kate_util_get_error_message (ret));
}
gst_segment_init (&decoder->kate_segment, GST_FORMAT_UNDEFINED);
decoder->kate_flushing = FALSE;
@@ -627,3 +631,50 @@ gst_kate_decoder_base_sink_query (GstKateDecoderBase * decoder,
return gst_pad_query_default (pad, query);
}
}
+
+const char *
+gst_kate_util_get_error_message (int ret)
+{
+ switch (ret) {
+ case KATE_E_NOT_FOUND:
+ return "value not found";
+ case KATE_E_INVALID_PARAMETER:
+ return "invalid parameter";
+ case KATE_E_OUT_OF_MEMORY:
+ return "out of memory";
+ case KATE_E_BAD_GRANULE:
+ return "bad granule";
+ case KATE_E_INIT:
+ return "initialization error";
+ case KATE_E_BAD_PACKET:
+ return "bad packet";
+ case KATE_E_TEXT:
+ return "invalid/truncated text";
+ case KATE_E_LIMIT:
+ return "a limit was exceeded";
+ case KATE_E_VERSION:
+ return "unsupported bitstream version";
+ case KATE_E_NOT_KATE:
+ return "not a kate bitstream";
+ case KATE_E_BAD_TAG:
+ return "bad tag";
+ case KATE_E_IMPL:
+ return "not implemented";
+
+#ifdef HAVE_TIGER
+ case TIGER_E_NOT_FOUND:
+ return "value not found";
+ case TIGER_E_INVALID_PARAMETER:
+ return "invalid parameter";
+ case TIGER_E_OUT_OF_MEMORY:
+ return "out of memory";
+ case TIGER_E_CAIRO_ERROR:
+ return "Cairo error";
+ case TIGER_E_BAD_SURFACE_TYPE:
+ return "bad surface type";
+#endif
+
+ default:
+ return "unknown error";
+ }
+}
diff --git a/ext/kate/gstkateutil.h b/ext/kate/gstkateutil.h
index a837369db..85a86d2ad 100644
--- a/ext/kate/gstkateutil.h
+++ b/ext/kate/gstkateutil.h
@@ -98,6 +98,8 @@ extern gboolean gst_kate_decoder_base_sink_query (GstKateDecoderBase * decoder,
GstElement * element, GstPad * pad, GstQuery * query);
extern gboolean
gst_kate_util_decoder_base_queue_event (GstKateDecoderBase * decoder, GstEvent * event, gboolean (*handler)(GstPad *, GstEvent *), GstPad * pad);
+extern const char *
+gst_kate_util_get_error_message (int ret);
G_END_DECLS
#endif /* __GST_KATE_UTIL_H__ */
diff --git a/ext/modplug/gstmodplug.cc b/ext/modplug/gstmodplug.cc
index 8c9f6064a..05d827853 100644
--- a/ext/modplug/gstmodplug.cc
+++ b/ext/modplug/gstmodplug.cc
@@ -43,6 +43,10 @@
#include "config.h"
#endif
+/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
+ * with newer GLib versions (>= 2.31.0) */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
/* Required to not get an undefined warning
* https://bugzilla.gnome.org/show_bug.cgi?id=613795
*/
diff --git a/ext/mpeg2enc/Makefile.am b/ext/mpeg2enc/Makefile.am
index 719a161b7..9b79185ff 100644
--- a/ext/mpeg2enc/Makefile.am
+++ b/ext/mpeg2enc/Makefile.am
@@ -8,8 +8,7 @@ libgstmpeg2enc_la_SOURCES = \
gstmpeg2encpicturereader.cc
libgstmpeg2enc_la_CXXFLAGS = \
- $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
- $(GST_CXXFLAGS) $(MPEG2ENC_CFLAGS)
+ $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(MPEG2ENC_CFLAGS)
libgstmpeg2enc_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ \
$(GST_LIBS) $(MPEG2ENC_LIBS)
diff --git a/ext/mpeg2enc/gstmpeg2enc.cc b/ext/mpeg2enc/gstmpeg2enc.cc
index e8f16aa21..4e8eaaccd 100644
--- a/ext/mpeg2enc/gstmpeg2enc.cc
+++ b/ext/mpeg2enc/gstmpeg2enc.cc
@@ -57,6 +57,7 @@
#include "config.h"
#endif
+#include <gst/glib-compat-private.h>
#include "gstmpeg2enc.hh"
GST_DEBUG_CATEGORY (mpeg2enc_debug);
diff --git a/ext/mplex/Makefile.am b/ext/mplex/Makefile.am
index 86ff2f215..741b0d893 100644
--- a/ext/mplex/Makefile.am
+++ b/ext/mplex/Makefile.am
@@ -7,7 +7,7 @@ libgstmplex_la_SOURCES = \
gstmplexoutputstream.cc
libgstmplex_la_CXXFLAGS = \
- $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(MPLEX_CFLAGS)
+ $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(MPLEX_CFLAGS)
libgstmplex_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(MPLEX_LIBS)
libgstmplex_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(MPLEX_LDFLAGS)
diff --git a/ext/mplex/gstmplex.cc b/ext/mplex/gstmplex.cc
index 4a492976b..2c9328d17 100644
--- a/ext/mplex/gstmplex.cc
+++ b/ext/mplex/gstmplex.cc
@@ -53,6 +53,7 @@
#include <string.h>
+#include <gst/glib-compat-private.h>
#include "gstmplex.hh"
#include "gstmplexoutputstream.hh"
#include "gstmplexibitstream.hh"
diff --git a/ext/opus/Makefile.am b/ext/opus/Makefile.am
index cdf3c30ac..48a7eade4 100644
--- a/ext/opus/Makefile.am
+++ b/ext/opus/Makefile.am
@@ -3,13 +3,13 @@ plugin_LTLIBRARIES = libgstopus.la
libgstopus_la_SOURCES = gstopus.c gstopusdec.c gstopusenc.c gstopusparse.c gstopusheader.c gstopuscommon.c gstrtpopuspay.c gstrtpopusdepay.c
libgstopus_la_CFLAGS = \
-DGST_USE_UNSTABLE_API \
+ $(GST_PLUGINS_BAD_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_CFLAGS) \
$(OPUS_CFLAGS)
libgstopus_la_LIBADD = \
- -lgstaudio-$(GST_MAJORMINOR) \
- $(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_MAJORMINOR) \
- -lgstrtp-@GST_MAJORMINOR@ \
+ $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) \
+ -lgsttag-$(GST_MAJORMINOR) -lgstrtp-$(GST_MAJORMINOR) \
$(GST_BASE_LIBS) \
$(GST_LIBS) \
$(OPUS_LIBS)
diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c
index fd2f0ad62..167d195ff 100644
--- a/ext/opus/gstopusenc.c
+++ b/ext/opus/gstopusenc.c
@@ -48,6 +48,7 @@
#include <gst/gsttagsetter.h>
#include <gst/audio/audio.h>
+#include <gst/glib-compat-private.h>
#include "gstopusheader.h"
#include "gstopuscommon.h"
#include "gstopusenc.h"
diff --git a/ext/resindvd/resindvdbin.c b/ext/resindvd/resindvdbin.c
index 8c2d94fd6..a83656d1e 100644
--- a/ext/resindvd/resindvdbin.c
+++ b/ext/resindvd/resindvdbin.c
@@ -24,6 +24,7 @@
#include <string.h>
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <gst/pbutils/missing-plugins.h>
#include "resindvdbin.h"
diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c
index 21282a620..8ce39a1b2 100644
--- a/ext/resindvd/resindvdsrc.c
+++ b/ext/resindvd/resindvdsrc.c
@@ -25,6 +25,7 @@
#include <string.h>
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <gst/gst-i18n-plugin.h>
#include <gst/interfaces/navigation.h>
#include <gst/video/video.h>
@@ -1120,7 +1121,7 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock)
break;
}
- if (src->highlight_event && have_dvd_lock) {
+ if (src->highlight_event && have_dvd_lock && src->in_playing) {
GstEvent *hl_event = src->highlight_event;
src->highlight_event = NULL;
@@ -1411,8 +1412,12 @@ rsn_dvdsrc_create (GstBaseSrc * bsrc, guint64 offset,
}
}
- highlight_event = src->highlight_event;
- src->highlight_event = NULL;
+ if (src->in_playing) {
+ highlight_event = src->highlight_event;
+ src->highlight_event = NULL;
+ } else {
+ highlight_event = NULL;
+ }
/* Schedule a clock callback for the any pending nav packet */
rsn_dvdsrc_check_nav_blocks (src);
diff --git a/ext/resindvd/rsnparsetter.c b/ext/resindvd/rsnparsetter.c
index a69366f9d..f2f328c25 100644
--- a/ext/resindvd/rsnparsetter.c
+++ b/ext/resindvd/rsnparsetter.c
@@ -7,6 +7,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <gst/video/video.h>
#include <string.h>
diff --git a/ext/schroedinger/gstschrodec.c b/ext/schroedinger/gstschrodec.c
index c8fa8336e..7508b3885 100644
--- a/ext/schroedinger/gstschrodec.c
+++ b/ext/schroedinger/gstschrodec.c
@@ -313,11 +313,13 @@ parse_sequence_header (GstSchroDec * schro_dec, guint8 * data, int size)
ret = schro_parse_decode_sequence_header (data + 13, size - 13,
&video_format);
if (ret) {
+#if SCHRO_CHECK_VERSION(1,0,11)
int bit_depth;
bit_depth = schro_video_format_get_bit_depth (&video_format);
if (bit_depth == 8) {
+#endif
if (video_format.chroma_format == SCHRO_CHROMA_444) {
state->format = GST_VIDEO_FORMAT_AYUV;
} else if (video_format.chroma_format == SCHRO_CHROMA_422) {
@@ -325,6 +327,7 @@ parse_sequence_header (GstSchroDec * schro_dec, guint8 * data, int size)
} else if (video_format.chroma_format == SCHRO_CHROMA_420) {
state->format = GST_VIDEO_FORMAT_I420;
}
+#if SCHRO_CHECK_VERSION(1,0,11)
} else if (bit_depth <= 10) {
state->format = GST_VIDEO_FORMAT_v210;
} else if (bit_depth <= 16) {
@@ -333,6 +336,7 @@ parse_sequence_header (GstSchroDec * schro_dec, guint8 * data, int size)
GST_ERROR ("bit depth too large (%d > 16)", bit_depth);
state->format = GST_VIDEO_FORMAT_AYUV64;
}
+#endif
state->fps_n = video_format.frame_rate_numerator;
state->fps_d = video_format.frame_rate_denominator;
GST_DEBUG_OBJECT (schro_dec, "Frame rate is %d/%d", state->fps_n,
diff --git a/ext/schroedinger/gstschroenc.c b/ext/schroedinger/gstschroenc.c
index 1fb75f98e..933a92102 100644
--- a/ext/schroedinger/gstschroenc.c
+++ b/ext/schroedinger/gstschroenc.c
@@ -271,18 +271,24 @@ gst_schro_enc_set_format (GstBaseVideoEncoder * base_video_encoder,
switch (state->format) {
case GST_VIDEO_FORMAT_I420:
case GST_VIDEO_FORMAT_YV12:
+#if SCHRO_CHECK_VERSION(1,0,11)
case GST_VIDEO_FORMAT_Y42B:
+#endif
schro_enc->video_format->chroma_format = SCHRO_CHROMA_420;
break;
case GST_VIDEO_FORMAT_YUY2:
case GST_VIDEO_FORMAT_UYVY:
+#if SCHRO_CHECK_VERSION(1,0,11)
case GST_VIDEO_FORMAT_v216:
case GST_VIDEO_FORMAT_v210:
+#endif
schro_enc->video_format->chroma_format = SCHRO_CHROMA_422;
break;
case GST_VIDEO_FORMAT_AYUV:
+#if SCHRO_CHECK_VERSION(1,0,11)
case GST_VIDEO_FORMAT_Y444:
case GST_VIDEO_FORMAT_AYUV64:
+#endif
schro_enc->video_format->chroma_format = SCHRO_CHROMA_444;
break;
case GST_VIDEO_FORMAT_ARGB:
@@ -305,10 +311,13 @@ gst_schro_enc_set_format (GstBaseVideoEncoder * base_video_encoder,
schro_enc->video_format->aspect_ratio_numerator = state->par_n;
schro_enc->video_format->aspect_ratio_denominator = state->par_d;
+#if SCHRO_CHECK_VERSION(1,0,11)
switch (state->format) {
default:
+#endif
schro_video_format_set_std_signal_range (schro_enc->video_format,
SCHRO_SIGNAL_RANGE_8BIT_VIDEO);
+#if SCHRO_CHECK_VERSION(1,0,11)
break;
case GST_VIDEO_FORMAT_v210:
schro_video_format_set_std_signal_range (schro_enc->video_format,
@@ -322,6 +331,7 @@ gst_schro_enc_set_format (GstBaseVideoEncoder * base_video_encoder,
schro_enc->video_format->chroma_excursion = 224 << 8;
break;
}
+#endif
schro_video_format_set_std_colour_spec (schro_enc->video_format,
SCHRO_COLOUR_SPEC_HDTV);
diff --git a/ext/schroedinger/gstschroutils.c b/ext/schroedinger/gstschroutils.c
index 99a22c8a4..5ee2317f0 100644
--- a/ext/schroedinger/gstschroutils.c
+++ b/ext/schroedinger/gstschroutils.c
@@ -72,6 +72,7 @@ gst_schro_buffer_wrap (GstBuffer * buf, GstVideoFormat format, int width,
frame =
schro_frame_new_from_data_AYUV (GST_BUFFER_DATA (buf), width, height);
break;
+#if SCHRO_CHECK_VERSION(1,0,11)
case GST_VIDEO_FORMAT_Y42B:
frame =
schro_frame_new_from_data_Y42B (GST_BUFFER_DATA (buf), width, height);
@@ -88,8 +89,6 @@ gst_schro_buffer_wrap (GstBuffer * buf, GstVideoFormat format, int width,
frame =
schro_frame_new_from_data_v216 (GST_BUFFER_DATA (buf), width, height);
break;
-#ifdef SCHRO_FRAME_FORMAT_AY64
- /* Added in 1.0.11 */
case GST_VIDEO_FORMAT_AYUV64:
frame =
schro_frame_new_from_data_AY64 (GST_BUFFER_DATA (buf), width, height);
diff --git a/ext/schroedinger/gstschroutils.h b/ext/schroedinger/gstschroutils.h
index a9924a633..c1d06c503 100644
--- a/ext/schroedinger/gstschroutils.h
+++ b/ext/schroedinger/gstschroutils.h
@@ -24,10 +24,10 @@
#include <gst/video/video.h>
#include <schroedinger/schro.h>
-#ifdef SCHRO_FRAME_FORMAT_AY64
+#if SCHRO_CHECK_VERSION(1,0,11)
#define GST_SCHRO_YUV_LIST "{ I420, YV12, YUY2, UYVY, AYUV, Y42B, Y444, v216, v210, AY64 }"
#else
-#define GST_SCHRO_YUV_LIST "{ I420, YV12, YUY2, UYVY, AYUV, Y42B, Y444 }"
+#define GST_SCHRO_YUV_LIST "{ I420, YV12, YUY2, UYVY, AYUV }"
#endif
SchroFrame *
diff --git a/ext/sdl/Makefile.am b/ext/sdl/Makefile.am
index 7f2998106..6bc4264f6 100644
--- a/ext/sdl/Makefile.am
+++ b/ext/sdl/Makefile.am
@@ -5,7 +5,7 @@ libgstsdl_la_SOURCES = \
sdlvideosink.c \
sdlaudiosink.c
-libgstsdl_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(SDL_CFLAGS)
+libgstsdl_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(SDL_CFLAGS)
libgstsdl_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
-lgstvideo-$(GST_MAJORMINOR) \
-lgstaudio-$(GST_MAJORMINOR) \
diff --git a/ext/sdl/sdlaudiosink.c b/ext/sdl/sdlaudiosink.c
index 707459fc7..77f885a9d 100644
--- a/ext/sdl/sdlaudiosink.c
+++ b/ext/sdl/sdlaudiosink.c
@@ -23,6 +23,8 @@
#include <unistd.h>
+#include <gst/glib-compat-private.h>
+
GST_DEBUG_CATEGORY_EXTERN (sdl_debug);
#define GST_CAT_DEFAULT sdl_debug
diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c
index fa05ace1a..ebf756f17 100644
--- a/ext/sdl/sdlvideosink.c
+++ b/ext/sdl/sdlvideosink.c
@@ -30,6 +30,7 @@
#endif
#include <stdlib.h>
+#include <gst/glib-compat-private.h>
#include <gst/interfaces/xoverlay.h>
#include <gst/interfaces/navigation.h>
diff --git a/ext/voaacenc/gstvoaacenc.c b/ext/voaacenc/gstvoaacenc.c
index f6fb6517f..dd4b7ed9e 100644
--- a/ext/voaacenc/gstvoaacenc.c
+++ b/ext/voaacenc/gstvoaacenc.c
@@ -166,6 +166,8 @@ gst_voaacenc_class_init (GstVoAacEncClass * klass)
gst_element_class_set_details_simple (element_class, "AAC audio encoder",
"Codec/Encoder/Audio", "AAC audio encoder", "Kan Hu <kan.hu@linaro.org>");
+
+ GST_DEBUG_CATEGORY_INIT (gst_voaacenc_debug, "voaacenc", 0, "voaac encoder");
}
static void
diff --git a/ext/voamrwbenc/gstvoamrwbenc.c b/ext/voamrwbenc/gstvoamrwbenc.c
index 2c2e253cb..0f40fb3c2 100644
--- a/ext/voamrwbenc/gstvoamrwbenc.c
+++ b/ext/voamrwbenc/gstvoamrwbenc.c
@@ -182,6 +182,9 @@ gst_voamrwbenc_class_init (GstVoAmrWbEncClass * klass)
"Encoding Band Mode (Kbps)", GST_VOAMRWBENC_BANDMODE_TYPE,
BANDMODE_DEFAULT,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
+
+ GST_DEBUG_CATEGORY_INIT (gst_voamrwbenc_debug, "voamrwbenc", 0,
+ "voamrwb encoder");
}
static void