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
This commit is contained in:
Wim Taymans 2012-02-10 16:46:50 +01:00
commit 1119f6ee41
88 changed files with 1220 additions and 871 deletions

View file

@ -5,6 +5,7 @@ include $(top_srcdir)/common/orc.mak
libgstcog_la_CFLAGS = \ libgstcog_la_CFLAGS = \
-DCOG_ENABLE_UNSTABLE_API \ -DCOG_ENABLE_UNSTABLE_API \
$(GST_PLUGINS_BAD_CFLAGS) \
-I$(srcdir)/.. \ -I$(srcdir)/.. \
$(GST_PLUGINS_BASE_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \
$(GST_CFLAGS) \ $(GST_CFLAGS) \

View file

@ -23,6 +23,7 @@
#endif #endif
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include <string.h> #include <string.h>
#include <cog/cogframe.h> #include <cog/cogframe.h>

View file

@ -2,6 +2,7 @@ plugin_LTLIBRARIES = libgstcurl.la
libgstcurl_la_SOURCES = gstcurl.c gstcurlsink.c libgstcurl_la_SOURCES = gstcurl.c gstcurlsink.c
libgstcurl_la_CFLAGS = \ libgstcurl_la_CFLAGS = \
$(GST_PLUGINS_BAD_CFLAGS) \
$(GST_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \
$(GST_CFLAGS) \ $(GST_CFLAGS) \
$(CURL_CFLAGS) $(CURL_CFLAGS)

View file

@ -57,6 +57,8 @@
#include "gstcurlsink.h" #include "gstcurlsink.h"
#include "gst/glib-compat-private.h"
/* Default values */ /* Default values */
#define GST_CAT_DEFAULT gst_curl_sink_debug #define GST_CAT_DEFAULT gst_curl_sink_debug
#define DEFAULT_URL "localhost:5555" #define DEFAULT_URL "localhost:5555"

View file

@ -91,7 +91,8 @@ GST_DEBUG_CATEGORY_STATIC (faad_debug);
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, 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) \ #define STATIC_RAW_CAPS(format) \

View file

@ -18,7 +18,7 @@ libgstgsettingselements_la_SOURCES = \
gstswitchsrc.c \ gstswitchsrc.c \
plugin.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 \ -DGstSwitchSrc=GstGSettingsSwitchSrc \
-DGstSwitchSrcClass=GstGSettingsSwitchSrcClass \ -DGstSwitchSrcClass=GstGSettingsSwitchSrcClass \
-DGstSwitchSink=GstGSettingsSwitchSink \ -DGstSwitchSink=GstGSettingsSwitchSink \

View file

@ -35,6 +35,7 @@
#endif #endif
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <string.h> #include <string.h>
#include "gstgsettingsaudiosink.h" #include "gstgsettingsaudiosink.h"

View file

@ -35,6 +35,7 @@
#endif #endif
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <string.h> #include <string.h>
#include "gstgsettingsaudiosrc.h" #include "gstgsettingsaudiosrc.h"

View file

@ -35,6 +35,7 @@
#endif #endif
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <string.h> #include <string.h>
#include "gstgsettingsvideosink.h" #include "gstgsettingsvideosink.h"

View file

@ -35,6 +35,7 @@
#endif #endif
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <string.h> #include <string.h>
#include "gstgsettingsvideosrc.h" #include "gstgsettingsvideosrc.h"

View file

@ -9,7 +9,7 @@ libgstkate_la_SOURCES += gstkatetiger.c
endif endif
# flags used to compile this plugin # 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_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_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstkate_la_LIBTOOLFLAGS = --tag=disable-static libgstkate_la_LIBTOOLFLAGS = --tag=disable-static

View file

@ -409,10 +409,6 @@ gst_kate_enc_create_buffer (GstKateEnc * ke, kate_packet * kp,
GST_BUFFER_TIMESTAMP (buffer) = timestamp; GST_BUFFER_TIMESTAMP (buffer) = timestamp;
GST_BUFFER_DURATION (buffer) = duration; 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; return buffer;
} }
@ -428,9 +424,6 @@ gst_kate_enc_push_buffer (GstKateEnc * ke, GstBuffer * buffer)
GST_BUFFER_TIMESTAMP (buffer) + GST_BUFFER_DURATION (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); flow = gst_pad_push (ke->srcpad, buffer);
if (G_UNLIKELY (flow != GST_FLOW_OK)) { if (G_UNLIKELY (flow != GST_FLOW_OK)) {
GST_WARNING_OBJECT (ke->srcpad, "push flow: %s", gst_flow_get_name (flow)); 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; break;
} else { } else {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), 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; rflow = GST_FLOW_ERROR;
break; break;
} }
@ -656,7 +650,8 @@ gst_kate_enc_flush_headers (GstKateEnc * ke)
ke->headers_sent = TRUE; ke->headers_sent = TRUE;
GST_INFO_OBJECT (ke, "headers flushed"); GST_INFO_OBJECT (ke, "headers flushed");
} else { } 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; return rflow;
@ -694,7 +689,8 @@ gst_kate_enc_generate_keepalive (GstKateEnc * ke, GstClockTime timestamp)
GST_DEBUG_OBJECT (ke, "keepalive at %f", t); GST_DEBUG_OBJECT (ke, "keepalive at %f", t);
ret = kate_encode_keepalive (&ke->k, t, &kp); ret = kate_encode_keepalive (&ke->k, t, &kp);
if (ret < 0) { 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 { } else {
kate_int64_t granpos = kate_encode_get_granule (&ke->k); kate_int64_t granpos = kate_encode_get_granule (&ke->k);
GST_LOG_OBJECT (ke, "Keepalive packet encoded"); 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); ret = kate_encode_text (&ke->k, t0, t1, "", 0, &kp);
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), 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; rflow = GST_FLOW_ERROR;
} else { } else {
rflow = rflow =
@ -735,7 +732,8 @@ gst_kate_enc_flush_waiting (GstKateEnc * ke, GstClockTime now)
if (rflow == GST_FLOW_OK) { if (rflow == GST_FLOW_OK) {
GST_DEBUG_OBJECT (ke, "delayed SPU packet flushed"); GST_DEBUG_OBJECT (ke, "delayed SPU packet flushed");
} else { } 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 */ /* 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); ret = kate_encode_set_region (&ke->k, kregion);
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), 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; rflow = GST_FLOW_ERROR;
} else { } else {
ret = kate_encode_set_palette (&ke->k, kpalette); ret = kate_encode_set_palette (&ke->k, kpalette);
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), 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; rflow = GST_FLOW_ERROR;
} else { } else {
ret = kate_encode_set_bitmap (&ke->k, kbitmap); ret = kate_encode_set_bitmap (&ke->k, kbitmap);
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), 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; rflow = GST_FLOW_ERROR;
} else { } else {
/* Some SPUs have no hide time - so I'm going to delay the encoding of the packet /* 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); ret = kate_encode_text (&ke->k, t0, t1, "", 0, &kp);
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), 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; rflow = GST_FLOW_ERROR;
} else { } else {
rflow = rflow =
@ -921,7 +922,8 @@ gst_kate_enc_chain_text (GstKateEnc * ke, GstBuffer * buf,
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), 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; rflow = GST_FLOW_ERROR;
} else { } else {
const char *text; 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); ret = kate_encode_text (&ke->k, t0, t1, text, text_len, &kp);
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), 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; rflow = GST_FLOW_ERROR;
} else { } else {
rflow = gst_kate_enc_chain_push_packet (ke, &kp, start, stop - start + 1); 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"); GST_DEBUG_OBJECT (ke, "READY -> PAUSED, initializing kate state");
ret = kate_info_init (&ke->ki); ret = kate_info_init (&ke->ki);
if (ret < 0) { if (ret < 0) {
GST_WARNING_OBJECT (ke, "failed to initialize kate info structure: %d", GST_WARNING_OBJECT (ke, "failed to initialize kate info structure: %s",
ret); gst_kate_util_get_error_message (ret));
break; break;
} }
if (ke->language) { if (ke->language) {
ret = kate_info_set_language (&ke->ki, ke->language); ret = kate_info_set_language (&ke->ki, ke->language);
if (ret < 0) { 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; break;
} }
} }
if (ke->category) { if (ke->category) {
ret = kate_info_set_category (&ke->ki, ke->category); ret = kate_info_set_category (&ke->ki, ke->category);
if (ret < 0) { 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; break;
} }
} }
@ -1052,18 +1056,21 @@ gst_kate_enc_change_state (GstElement * element, GstStateChange transition)
kate_info_set_original_canvas_size (&ke->ki, kate_info_set_original_canvas_size (&ke->ki,
ke->original_canvas_width, ke->original_canvas_height); ke->original_canvas_width, ke->original_canvas_height);
if (ret < 0) { 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; break;
} }
ret = kate_comment_init (&ke->kc); ret = kate_comment_init (&ke->kc);
if (ret < 0) { if (ret < 0) {
GST_WARNING_OBJECT (ke, 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; break;
} }
ret = kate_encode_init (&ke->k, &ke->ki); ret = kate_encode_init (&ke->k, &ke->ki);
if (ret < 0) { 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; break;
} }
ke->headers_sent = FALSE; 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); ret = kate_encode_finish (&ke->k, -1, &kp);
if (ret < 0) { 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 { } else {
kate_int64_t granpos = kate_encode_get_granule (&ke->k); kate_int64_t granpos = kate_encode_get_granule (&ke->k);
GST_LOG_OBJECT (ke, "EOS packet encoded"); GST_LOG_OBJECT (ke, "EOS packet encoded");

View file

@ -189,7 +189,8 @@ gst_kate_parse_push_headers (GstKateParse * parse)
kate_packet_wrap (&packet, size, data); kate_packet_wrap (&packet, size, data);
ret = kate_decode_headerin (&parse->ki, &parse->kc, &packet); ret = kate_decode_headerin (&parse->ki, &parse->kc, &packet);
if (G_UNLIKELY (ret < 0)) { 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); gst_buffer_unmap (outbuf, data, size);
/* takes ownership of outbuf, which was previously in parse->streamheader */ /* takes ownership of outbuf, which was previously in parse->streamheader */

View file

@ -80,6 +80,7 @@
#include <string.h> #include <string.h>
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include "gstkate.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); ev->ki, ev->start_time, ev->end_time, ev->bitmap, ev->text);
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
GST_WARNING_OBJECT (tiger, 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, rectangle = gst_video_overlay_rectangle_new_argb (tiger->render_buffer,
tiger->video_width, tiger->video_height, 4 * tiger->video_width, tiger->video_width, tiger->video_height, 4 * tiger->video_width,
0, 0, tiger->video_width, tiger->video_height, 0, 0, tiger->video_width, tiger->video_height,
GST_VIDEO_OVERLAY_FORMAT_FLAG_NONE); GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA);
if (tiger->composition) if (tiger->composition)
gst_video_overlay_composition_unref (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 static GstFlowReturn
gst_kate_tiger_video_chain (GstPad * pad, GstBuffer * buf) 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); tiger->video_height, tiger->video_width * 4, tiger->swap_rgb);
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
GST_WARNING_OBJECT (tiger, 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; goto pass;
} }
@ -852,7 +838,8 @@ gst_kate_tiger_video_chain (GstPad * pad, GstBuffer * buf)
(long) tiger->video_segment.last_stop, t); (long) tiger->video_segment.last_stop, t);
ret = tiger_renderer_update (tiger->tr, t, 1); ret = tiger_renderer_update (tiger->tr, t, 1);
if (G_UNLIKELY (ret < 0)) { 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; 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); tiger->video_height, tiger->video_width * 4, tiger->swap_rgb);
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
GST_WARNING_OBJECT (tiger, 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; goto pass;
} }
ret = tiger_renderer_render (tiger->tr); ret = tiger_renderer_render (tiger->tr);
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
GST_WARNING_OBJECT (tiger, 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 { } else {
GST_LOG_OBJECT (tiger, "Tiger renderer rendered on video frame at %f", t); GST_LOG_OBJECT (tiger, "Tiger renderer rendered on video frame at %f", t);
} }
if (gst_video_format_is_yuv (tiger->video_format)) { 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); gst_kate_tiger_set_composition (tiger);
if (tiger->composition) if (tiger->composition)
gst_video_overlay_composition_blend (tiger->composition, buf); 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) { if (tiger->decoder.initialized) {
int ret = tiger_renderer_create (&tiger->tr); int ret = tiger_renderer_create (&tiger->tr);
if (ret < 0) { if (ret < 0) {
GST_WARNING_OBJECT (tiger, "failed to create tiger renderer: %d", GST_WARNING_OBJECT (tiger, "failed to create tiger renderer: %s",
ret); gst_kate_util_get_error_message (ret));
} else { } else {
ret = ret =
tiger_renderer_set_default_font_description (tiger->tr, tiger_renderer_set_default_font_description (tiger->tr,
tiger->default_font_desc); tiger->default_font_desc);
if (ret < 0) { if (ret < 0) {
GST_WARNING_OBJECT (tiger, 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_font_color (tiger);
gst_kate_tiger_update_default_background_color (tiger); gst_kate_tiger_update_default_background_color (tiger);

View file

@ -24,6 +24,9 @@
#endif #endif
#include <string.h> #include <string.h>
#ifdef HAVE_TIGER
#include <tiger/tiger.h>
#endif
#include <gst/tag/tag.h> #include <gst/tag/tag.h>
#include "gstkate.h" #include "gstkate.h"
#include "gstkateutil.h" #include "gstkateutil.h"
@ -273,7 +276,8 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder,
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
GST_ELEMENT_ERROR (element, STREAM, DECODE, (NULL), 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; 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"); GST_DEBUG_OBJECT (element, "READY -> PAUSED, initializing kate state");
ret = kate_high_decode_init (&decoder->k); ret = kate_high_decode_init (&decoder->k);
if (ret < 0) { if (ret < 0) {
GST_WARNING_OBJECT (element, "failed to initialize kate state: %d", GST_WARNING_OBJECT (element, "failed to initialize kate state: %s",
ret); gst_kate_util_get_error_message (ret));
} }
gst_segment_init (&decoder->kate_segment, GST_FORMAT_UNDEFINED); gst_segment_init (&decoder->kate_segment, GST_FORMAT_UNDEFINED);
decoder->kate_flushing = FALSE; decoder->kate_flushing = FALSE;
@ -627,3 +631,50 @@ gst_kate_decoder_base_sink_query (GstKateDecoderBase * decoder,
return gst_pad_query_default (pad, query); 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";
}
}

View file

@ -98,6 +98,8 @@ extern gboolean gst_kate_decoder_base_sink_query (GstKateDecoderBase * decoder,
GstElement * element, GstPad * pad, GstQuery * query); GstElement * element, GstPad * pad, GstQuery * query);
extern gboolean extern gboolean
gst_kate_util_decoder_base_queue_event (GstKateDecoderBase * decoder, GstEvent * event, gboolean (*handler)(GstPad *, GstEvent *), GstPad * pad); 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 G_END_DECLS
#endif /* __GST_KATE_UTIL_H__ */ #endif /* __GST_KATE_UTIL_H__ */

View file

@ -43,6 +43,10 @@
#include "config.h" #include "config.h"
#endif #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 /* Required to not get an undefined warning
* https://bugzilla.gnome.org/show_bug.cgi?id=613795 * https://bugzilla.gnome.org/show_bug.cgi?id=613795
*/ */

View file

@ -8,8 +8,7 @@ libgstmpeg2enc_la_SOURCES = \
gstmpeg2encpicturereader.cc gstmpeg2encpicturereader.cc
libgstmpeg2enc_la_CXXFLAGS = \ libgstmpeg2enc_la_CXXFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \ $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(MPEG2ENC_CFLAGS)
$(GST_CXXFLAGS) $(MPEG2ENC_CFLAGS)
libgstmpeg2enc_la_LIBADD = \ libgstmpeg2enc_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ \ $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ \
$(GST_LIBS) $(MPEG2ENC_LIBS) $(GST_LIBS) $(MPEG2ENC_LIBS)

View file

@ -57,6 +57,7 @@
#include "config.h" #include "config.h"
#endif #endif
#include <gst/glib-compat-private.h>
#include "gstmpeg2enc.hh" #include "gstmpeg2enc.hh"
GST_DEBUG_CATEGORY (mpeg2enc_debug); GST_DEBUG_CATEGORY (mpeg2enc_debug);

View file

@ -7,7 +7,7 @@ libgstmplex_la_SOURCES = \
gstmplexoutputstream.cc gstmplexoutputstream.cc
libgstmplex_la_CXXFLAGS = \ 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 = \ libgstmplex_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(MPLEX_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(MPLEX_LIBS)
libgstmplex_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(MPLEX_LDFLAGS) libgstmplex_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(MPLEX_LDFLAGS)

View file

@ -53,6 +53,7 @@
#include <string.h> #include <string.h>
#include <gst/glib-compat-private.h>
#include "gstmplex.hh" #include "gstmplex.hh"
#include "gstmplexoutputstream.hh" #include "gstmplexoutputstream.hh"
#include "gstmplexibitstream.hh" #include "gstmplexibitstream.hh"

View file

@ -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_SOURCES = gstopus.c gstopusdec.c gstopusenc.c gstopusparse.c gstopusheader.c gstopuscommon.c gstrtpopuspay.c gstrtpopusdepay.c
libgstopus_la_CFLAGS = \ libgstopus_la_CFLAGS = \
-DGST_USE_UNSTABLE_API \ -DGST_USE_UNSTABLE_API \
$(GST_PLUGINS_BAD_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \
$(GST_CFLAGS) \ $(GST_CFLAGS) \
$(OPUS_CFLAGS) $(OPUS_CFLAGS)
libgstopus_la_LIBADD = \ libgstopus_la_LIBADD = \
-lgstaudio-$(GST_MAJORMINOR) \ $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) \
$(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_MAJORMINOR) \ -lgsttag-$(GST_MAJORMINOR) -lgstrtp-$(GST_MAJORMINOR) \
-lgstrtp-@GST_MAJORMINOR@ \
$(GST_BASE_LIBS) \ $(GST_BASE_LIBS) \
$(GST_LIBS) \ $(GST_LIBS) \
$(OPUS_LIBS) $(OPUS_LIBS)

View file

@ -48,6 +48,7 @@
#include <gst/gsttagsetter.h> #include <gst/gsttagsetter.h>
#include <gst/audio/audio.h> #include <gst/audio/audio.h>
#include <gst/glib-compat-private.h>
#include "gstopusheader.h" #include "gstopusheader.h"
#include "gstopuscommon.h" #include "gstopuscommon.h"
#include "gstopusenc.h" #include "gstopusenc.h"

View file

@ -24,6 +24,7 @@
#include <string.h> #include <string.h>
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <gst/pbutils/missing-plugins.h> #include <gst/pbutils/missing-plugins.h>
#include "resindvdbin.h" #include "resindvdbin.h"

View file

@ -25,6 +25,7 @@
#include <string.h> #include <string.h>
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <gst/gst-i18n-plugin.h> #include <gst/gst-i18n-plugin.h>
#include <gst/interfaces/navigation.h> #include <gst/interfaces/navigation.h>
#include <gst/video/video.h> #include <gst/video/video.h>
@ -1120,7 +1121,7 @@ rsn_dvdsrc_step (resinDvdSrc * src, gboolean have_dvd_lock)
break; break;
} }
if (src->highlight_event && have_dvd_lock) { if (src->highlight_event && have_dvd_lock && src->in_playing) {
GstEvent *hl_event = src->highlight_event; GstEvent *hl_event = src->highlight_event;
src->highlight_event = NULL; src->highlight_event = NULL;
@ -1411,8 +1412,12 @@ rsn_dvdsrc_create (GstBaseSrc * bsrc, guint64 offset,
} }
} }
highlight_event = src->highlight_event; if (src->in_playing) {
src->highlight_event = NULL; highlight_event = src->highlight_event;
src->highlight_event = NULL;
} else {
highlight_event = NULL;
}
/* Schedule a clock callback for the any pending nav packet */ /* Schedule a clock callback for the any pending nav packet */
rsn_dvdsrc_check_nav_blocks (src); rsn_dvdsrc_check_nav_blocks (src);

View file

@ -7,6 +7,7 @@
#endif #endif
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include <string.h> #include <string.h>

View file

@ -313,11 +313,13 @@ parse_sequence_header (GstSchroDec * schro_dec, guint8 * data, int size)
ret = schro_parse_decode_sequence_header (data + 13, size - 13, ret = schro_parse_decode_sequence_header (data + 13, size - 13,
&video_format); &video_format);
if (ret) { if (ret) {
#if SCHRO_CHECK_VERSION(1,0,11)
int bit_depth; int bit_depth;
bit_depth = schro_video_format_get_bit_depth (&video_format); bit_depth = schro_video_format_get_bit_depth (&video_format);
if (bit_depth == 8) { if (bit_depth == 8) {
#endif
if (video_format.chroma_format == SCHRO_CHROMA_444) { if (video_format.chroma_format == SCHRO_CHROMA_444) {
state->format = GST_VIDEO_FORMAT_AYUV; state->format = GST_VIDEO_FORMAT_AYUV;
} else if (video_format.chroma_format == SCHRO_CHROMA_422) { } 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) { } else if (video_format.chroma_format == SCHRO_CHROMA_420) {
state->format = GST_VIDEO_FORMAT_I420; state->format = GST_VIDEO_FORMAT_I420;
} }
#if SCHRO_CHECK_VERSION(1,0,11)
} else if (bit_depth <= 10) { } else if (bit_depth <= 10) {
state->format = GST_VIDEO_FORMAT_v210; state->format = GST_VIDEO_FORMAT_v210;
} else if (bit_depth <= 16) { } 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); GST_ERROR ("bit depth too large (%d > 16)", bit_depth);
state->format = GST_VIDEO_FORMAT_AYUV64; state->format = GST_VIDEO_FORMAT_AYUV64;
} }
#endif
state->fps_n = video_format.frame_rate_numerator; state->fps_n = video_format.frame_rate_numerator;
state->fps_d = video_format.frame_rate_denominator; state->fps_d = video_format.frame_rate_denominator;
GST_DEBUG_OBJECT (schro_dec, "Frame rate is %d/%d", state->fps_n, GST_DEBUG_OBJECT (schro_dec, "Frame rate is %d/%d", state->fps_n,

View file

@ -271,18 +271,24 @@ gst_schro_enc_set_format (GstBaseVideoEncoder * base_video_encoder,
switch (state->format) { switch (state->format) {
case GST_VIDEO_FORMAT_I420: case GST_VIDEO_FORMAT_I420:
case GST_VIDEO_FORMAT_YV12: case GST_VIDEO_FORMAT_YV12:
#if SCHRO_CHECK_VERSION(1,0,11)
case GST_VIDEO_FORMAT_Y42B: case GST_VIDEO_FORMAT_Y42B:
#endif
schro_enc->video_format->chroma_format = SCHRO_CHROMA_420; schro_enc->video_format->chroma_format = SCHRO_CHROMA_420;
break; break;
case GST_VIDEO_FORMAT_YUY2: case GST_VIDEO_FORMAT_YUY2:
case GST_VIDEO_FORMAT_UYVY: case GST_VIDEO_FORMAT_UYVY:
#if SCHRO_CHECK_VERSION(1,0,11)
case GST_VIDEO_FORMAT_v216: case GST_VIDEO_FORMAT_v216:
case GST_VIDEO_FORMAT_v210: case GST_VIDEO_FORMAT_v210:
#endif
schro_enc->video_format->chroma_format = SCHRO_CHROMA_422; schro_enc->video_format->chroma_format = SCHRO_CHROMA_422;
break; break;
case GST_VIDEO_FORMAT_AYUV: case GST_VIDEO_FORMAT_AYUV:
#if SCHRO_CHECK_VERSION(1,0,11)
case GST_VIDEO_FORMAT_Y444: case GST_VIDEO_FORMAT_Y444:
case GST_VIDEO_FORMAT_AYUV64: case GST_VIDEO_FORMAT_AYUV64:
#endif
schro_enc->video_format->chroma_format = SCHRO_CHROMA_444; schro_enc->video_format->chroma_format = SCHRO_CHROMA_444;
break; break;
case GST_VIDEO_FORMAT_ARGB: 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_numerator = state->par_n;
schro_enc->video_format->aspect_ratio_denominator = state->par_d; schro_enc->video_format->aspect_ratio_denominator = state->par_d;
#if SCHRO_CHECK_VERSION(1,0,11)
switch (state->format) { switch (state->format) {
default: default:
#endif
schro_video_format_set_std_signal_range (schro_enc->video_format, schro_video_format_set_std_signal_range (schro_enc->video_format,
SCHRO_SIGNAL_RANGE_8BIT_VIDEO); SCHRO_SIGNAL_RANGE_8BIT_VIDEO);
#if SCHRO_CHECK_VERSION(1,0,11)
break; break;
case GST_VIDEO_FORMAT_v210: case GST_VIDEO_FORMAT_v210:
schro_video_format_set_std_signal_range (schro_enc->video_format, 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; schro_enc->video_format->chroma_excursion = 224 << 8;
break; break;
} }
#endif
schro_video_format_set_std_colour_spec (schro_enc->video_format, schro_video_format_set_std_colour_spec (schro_enc->video_format,
SCHRO_COLOUR_SPEC_HDTV); SCHRO_COLOUR_SPEC_HDTV);

View file

@ -72,6 +72,7 @@ gst_schro_buffer_wrap (GstBuffer * buf, GstVideoFormat format, int width,
frame = frame =
schro_frame_new_from_data_AYUV (GST_BUFFER_DATA (buf), width, height); schro_frame_new_from_data_AYUV (GST_BUFFER_DATA (buf), width, height);
break; break;
#if SCHRO_CHECK_VERSION(1,0,11)
case GST_VIDEO_FORMAT_Y42B: case GST_VIDEO_FORMAT_Y42B:
frame = frame =
schro_frame_new_from_data_Y42B (GST_BUFFER_DATA (buf), width, height); 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 = frame =
schro_frame_new_from_data_v216 (GST_BUFFER_DATA (buf), width, height); schro_frame_new_from_data_v216 (GST_BUFFER_DATA (buf), width, height);
break; break;
#ifdef SCHRO_FRAME_FORMAT_AY64
/* Added in 1.0.11 */
case GST_VIDEO_FORMAT_AYUV64: case GST_VIDEO_FORMAT_AYUV64:
frame = frame =
schro_frame_new_from_data_AY64 (GST_BUFFER_DATA (buf), width, height); schro_frame_new_from_data_AY64 (GST_BUFFER_DATA (buf), width, height);

View file

@ -24,10 +24,10 @@
#include <gst/video/video.h> #include <gst/video/video.h>
#include <schroedinger/schro.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 }" #define GST_SCHRO_YUV_LIST "{ I420, YV12, YUY2, UYVY, AYUV, Y42B, Y444, v216, v210, AY64 }"
#else #else
#define GST_SCHRO_YUV_LIST "{ I420, YV12, YUY2, UYVY, AYUV, Y42B, Y444 }" #define GST_SCHRO_YUV_LIST "{ I420, YV12, YUY2, UYVY, AYUV }"
#endif #endif
SchroFrame * SchroFrame *

View file

@ -5,7 +5,7 @@ libgstsdl_la_SOURCES = \
sdlvideosink.c \ sdlvideosink.c \
sdlaudiosink.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) \ libgstsdl_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
-lgstvideo-$(GST_MAJORMINOR) \ -lgstvideo-$(GST_MAJORMINOR) \
-lgstaudio-$(GST_MAJORMINOR) \ -lgstaudio-$(GST_MAJORMINOR) \

View file

@ -23,6 +23,8 @@
#include <unistd.h> #include <unistd.h>
#include <gst/glib-compat-private.h>
GST_DEBUG_CATEGORY_EXTERN (sdl_debug); GST_DEBUG_CATEGORY_EXTERN (sdl_debug);
#define GST_CAT_DEFAULT sdl_debug #define GST_CAT_DEFAULT sdl_debug

View file

@ -30,6 +30,7 @@
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include <gst/glib-compat-private.h>
#include <gst/interfaces/xoverlay.h> #include <gst/interfaces/xoverlay.h>
#include <gst/interfaces/navigation.h> #include <gst/interfaces/navigation.h>

View file

@ -166,6 +166,8 @@ gst_voaacenc_class_init (GstVoAacEncClass * klass)
gst_element_class_set_details_simple (element_class, "AAC audio encoder", gst_element_class_set_details_simple (element_class, "AAC audio encoder",
"Codec/Encoder/Audio", "AAC audio encoder", "Kan Hu <kan.hu@linaro.org>"); "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 static void

View file

@ -182,6 +182,9 @@ gst_voamrwbenc_class_init (GstVoAmrWbEncClass * klass)
"Encoding Band Mode (Kbps)", GST_VOAMRWBENC_BANDMODE_TYPE, "Encoding Band Mode (Kbps)", GST_VOAMRWBENC_BANDMODE_TYPE,
BANDMODE_DEFAULT, BANDMODE_DEFAULT,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
GST_DEBUG_CATEGORY_INIT (gst_voamrwbenc_debug, "voamrwbenc", 0,
"voamrwb encoder");
} }
static void static void

View file

@ -54,6 +54,7 @@
# include <config.h> # include <config.h>
#endif #endif
#include <gst/glib-compat-private.h>
#include "gstbasecamerasrc.h" #include "gstbasecamerasrc.h"
enum enum

View file

@ -28,6 +28,7 @@
*/ */
#include <gst/app/gstappsrc.h> #include <gst/app/gstappsrc.h>
#include <gst/app/gstappsink.h> #include <gst/app/gstappsink.h>
#include <gst/glib-compat-private.h>
#include "gstcamerabinpreview.h" #include "gstcamerabinpreview.h"
#include "gstbasecamerasrc.h" #include "gstbasecamerasrc.h"

View file

@ -623,7 +623,6 @@ gst_h264_parse_vui_parameters (GstH264SPS * sps, NalReader * nr)
READ_UE_ALLOWED (nr, vui->max_bits_per_mb_denom, 0, 16); READ_UE_ALLOWED (nr, vui->max_bits_per_mb_denom, 0, 16);
READ_UE_ALLOWED (nr, vui->log2_max_mv_length_horizontal, 0, 16); READ_UE_ALLOWED (nr, vui->log2_max_mv_length_horizontal, 0, 16);
READ_UE_ALLOWED (nr, vui->log2_max_mv_length_vertical, 0, 16); READ_UE_ALLOWED (nr, vui->log2_max_mv_length_vertical, 0, 16);
READ_UE_ALLOWED (nr, vui->log2_max_mv_length_vertical, 0, 16);
READ_UE (nr, vui->num_reorder_frames); READ_UE (nr, vui->num_reorder_frames);
READ_UE (nr, vui->max_dec_frame_buffering); READ_UE (nr, vui->max_dec_frame_buffering);
} }

View file

@ -0,0 +1,148 @@
/*
* glib-compat.c
* Functions copied from glib 2.10
*
* Copyright 2005 David Schleef <ds@schleef.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GLIB_COMPAT_PRIVATE_H__
#define __GLIB_COMPAT_PRIVATE_H__
#include <glib.h>
G_BEGIN_DECLS
#if !GLIB_CHECK_VERSION(2,25,0)
#if defined (_MSC_VER) && !defined(_WIN64)
typedef struct _stat32 GStatBuf;
#else
typedef struct stat GStatBuf;
#endif
#endif
#if GLIB_CHECK_VERSION(2,26,0)
#define GLIB_HAS_GDATETIME
#endif
/* See bug #651514 */
#if GLIB_CHECK_VERSION(2,29,5)
#define G_ATOMIC_POINTER_COMPARE_AND_EXCHANGE(a,b,c) \
g_atomic_pointer_compare_and_exchange ((a),(b),(c))
#define G_ATOMIC_INT_COMPARE_AND_EXCHANGE(a,b,c) \
g_atomic_int_compare_and_exchange ((a),(b),(c))
#else
#define G_ATOMIC_POINTER_COMPARE_AND_EXCHANGE(a,b,c) \
g_atomic_pointer_compare_and_exchange ((volatile gpointer *)(a),(b),(c))
#define G_ATOMIC_INT_COMPARE_AND_EXCHANGE(a,b,c) \
g_atomic_int_compare_and_exchange ((volatile int *)(a),(b),(c))
#endif
/* See bug #651514 */
#if GLIB_CHECK_VERSION(2,29,5)
#define G_ATOMIC_INT_ADD(a,b) g_atomic_int_add ((a),(b))
#else
#define G_ATOMIC_INT_ADD(a,b) g_atomic_int_exchange_and_add ((a),(b))
#endif
/* copies */
#if GLIB_CHECK_VERSION (2, 31, 0)
#define g_mutex_new gst_g_mutex_new
static inline GMutex *
gst_g_mutex_new (void)
{
GMutex *mutex = g_slice_new (GMutex);
g_mutex_init (mutex);
return mutex;
}
#define g_mutex_free gst_g_mutex_free
static inline void
gst_g_mutex_free (GMutex *mutex)
{
g_mutex_clear (mutex);
g_slice_free (GMutex, mutex);
}
#define g_static_rec_mutex_init gst_g_static_rec_mutex_init
static inline void
gst_g_static_rec_mutex_init (GStaticRecMutex *mutex)
{
static const GStaticRecMutex init_mutex = G_STATIC_REC_MUTEX_INIT;
*mutex = init_mutex;
}
#define g_cond_new gst_g_cond_new
static inline GCond *
gst_g_cond_new (void)
{
GCond *cond = g_slice_new (GCond);
g_cond_init (cond);
return cond;
}
#define g_cond_free gst_g_cond_free
static inline void
gst_g_cond_free (GCond *cond)
{
g_cond_clear (cond);
g_slice_free (GCond, cond);
}
#define g_cond_timed_wait gst_g_cond_timed_wait
static inline gboolean
gst_g_cond_timed_wait (GCond *cond, GMutex *mutex, GTimeVal *abs_time)
{
gint64 end_time;
if (abs_time == NULL) {
g_cond_wait (cond, mutex);
return TRUE;
}
end_time = abs_time->tv_sec;
end_time *= 1000000;
end_time += abs_time->tv_usec;
/* would be nice if we had clock_rtoffset, but that didn't seem to
* make it into the kernel yet...
*/
/* if CLOCK_MONOTONIC is not defined then g_get_montonic_time() and
* g_get_real_time() are returning the same clock and we'd add ~0
*/
end_time += g_get_monotonic_time () - g_get_real_time ();
return g_cond_wait_until (cond, mutex, end_time);
}
#endif /* GLIB_CHECK_VERSION (2, 31, 0) */
#if GLIB_CHECK_VERSION (2, 31, 0)
#define g_thread_create gst_g_thread_create
static inline GThread *
gst_g_thread_create (GThreadFunc func, gpointer data, gboolean joinable,
GError **error)
{
GThread *thread = g_thread_try_new ("gst-check", func, data, error);
if (!joinable)
g_thread_unref (thread);
return thread;
}
#endif /* GLIB_CHECK_VERSION (2, 31, 0) */
/* adaptations */
G_END_DECLS
#endif

View file

@ -21,6 +21,10 @@
#include "config.h" #include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include "gstbasevideocodec.h" #include "gstbasevideocodec.h"
#include <string.h> #include <string.h>

View file

@ -127,6 +127,10 @@
#include "config.h" #include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include "gstbasevideodecoder.h" #include "gstbasevideodecoder.h"
#include "gstbasevideoutils.h" #include "gstbasevideoutils.h"

View file

@ -105,6 +105,10 @@
#include "config.h" #include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include "gstbasevideoencoder.h" #include "gstbasevideoencoder.h"
#include "gstbasevideoutils.h" #include "gstbasevideoutils.h"

View file

@ -52,6 +52,11 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>

View file

@ -32,6 +32,11 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <string.h> #include <string.h>
#include "gstbaseaudiovisualizer.h" #include "gstbaseaudiovisualizer.h"

View file

@ -151,11 +151,16 @@
# include <config.h> # include <config.h>
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/tag/tag.h> #include <gst/tag/tag.h>
#include <gst/glib-compat-private.h>
/* FIXME: include #include <gst/gst-i18n-plugin.h> and use _(" ") */ /* FIXME: include #include <gst/gst-i18n-plugin.h> and use _(" ") */
#include "gstcamerabin.h" #include "gstcamerabin.h"
@ -210,9 +215,10 @@ static guint camerabin_signals[LAST_SIGNAL];
#define DEFAULT_FLAGS GST_CAMERABIN_FLAG_SOURCE_RESIZE | \ #define DEFAULT_FLAGS GST_CAMERABIN_FLAG_SOURCE_RESIZE | \
GST_CAMERABIN_FLAG_VIEWFINDER_SCALE | \ GST_CAMERABIN_FLAG_VIEWFINDER_SCALE | \
GST_CAMERABIN_FLAG_AUDIO_CONVERSION | \ GST_CAMERABIN_FLAG_VIEWFINDER_COLOR_CONVERSION | \
GST_CAMERABIN_FLAG_IMAGE_COLOR_CONVERSION | \ GST_CAMERABIN_FLAG_IMAGE_COLOR_CONVERSION | \
GST_CAMERABIN_FLAG_VIDEO_COLOR_CONVERSION GST_CAMERABIN_FLAG_VIDEO_COLOR_CONVERSION | \
GST_CAMERABIN_FLAG_AUDIO_CONVERSION
/* Using "bilinear" as default zoom method */ /* Using "bilinear" as default zoom method */
#define CAMERABIN_DEFAULT_ZOOM_METHOD 1 #define CAMERABIN_DEFAULT_ZOOM_METHOD 1
@ -236,25 +242,37 @@ static guint camerabin_signals[LAST_SIGNAL];
GST_DEBUG_OBJECT ((c), "Processing counter incremented to: %d", \ GST_DEBUG_OBJECT ((c), "Processing counter incremented to: %d", \
(c)->processing_counter); \ (c)->processing_counter); \
if ((c)->processing_counter == 1) \ if ((c)->processing_counter == 1) \
g_object_notify (G_OBJECT (c), "idle"); \ g_object_notify (G_OBJECT (c), "idle");
#define CAMERABIN_PROCESSING_DEC_UNLOCKED(c) \ #define CAMERABIN_PROCESSING_DEC_UNLOCKED(c) \
(c)->processing_counter -= 1; \ (c)->processing_counter -= 1; \
GST_DEBUG_OBJECT ((c), "Processing counter decremented to: %d", \ GST_DEBUG_OBJECT ((c), "Processing counter decremented to: %d", \
(c)->processing_counter); \ (c)->processing_counter); \
g_assert ((c)->processing_counter >= 0); \ g_assert ((c)->processing_counter >= 0); \
if ((c)->processing_counter == 0) \ if ((c)->processing_counter == 0) { \
g_object_notify (G_OBJECT (c), "idle"); \ g_cond_signal ((c)->idle_cond); \
g_object_notify (G_OBJECT (c), "idle"); \
}
#define CAMERABIN_PROCESSING_INC(c) \ #define CAMERABIN_PROCESSING_INC(c) \
g_mutex_lock ((c)->capture_mutex); \ g_mutex_lock ((c)->capture_mutex); \
CAMERABIN_PROCESSING_INC_UNLOCKED ((c)); \ CAMERABIN_PROCESSING_INC_UNLOCKED ((c)); \
g_mutex_unlock ((c)->capture_mutex); \ g_mutex_unlock ((c)->capture_mutex);
#define CAMERABIN_PROCESSING_DEC(c) \ #define CAMERABIN_PROCESSING_DEC(c) \
g_mutex_lock ((c)->capture_mutex); \ g_mutex_lock ((c)->capture_mutex); \
CAMERABIN_PROCESSING_DEC_UNLOCKED ((c)); \ CAMERABIN_PROCESSING_DEC_UNLOCKED ((c)); \
g_mutex_unlock ((c)->capture_mutex); \ g_mutex_unlock ((c)->capture_mutex);
#define CAMERABIN_PROCESSING_WAIT_IDLE(c) \
g_mutex_lock ((c)->capture_mutex); \
if ((c)->processing_counter > 0) { \
GST_DEBUG_OBJECT ((c), "Waiting for processing operations to finish %d", \
(c)->processing_counter); \
g_cond_wait ((c)->idle_cond, (c)->capture_mutex); \
GST_DEBUG_OBJECT ((c), "Processing operations finished"); \
} \
g_mutex_unlock ((c)->capture_mutex);
/* /*
* static helper functions declaration * static helper functions declaration
@ -933,6 +951,10 @@ camerabin_dispose_elements (GstCameraBin * camera)
g_cond_free (camera->cond); g_cond_free (camera->cond);
camera->cond = NULL; camera->cond = NULL;
} }
if (camera->idle_cond) {
g_cond_free (camera->idle_cond);
camera->idle_cond = NULL;
}
if (camera->filename) { if (camera->filename) {
g_string_free (camera->filename, TRUE); g_string_free (camera->filename, TRUE);
camera->filename = NULL; camera->filename = NULL;
@ -1607,6 +1629,9 @@ reset_video_capture_caps (GstCameraBin * camera)
/* Interrupt ongoing capture */ /* Interrupt ongoing capture */
gst_camerabin_do_stop (camera); gst_camerabin_do_stop (camera);
/* prevent image captures from being lost */
CAMERABIN_PROCESSING_WAIT_IDLE (camera);
gst_element_get_state (GST_ELEMENT (camera), &state, &pending, 0); gst_element_get_state (GST_ELEMENT (camera), &state, &pending, 0);
if (state == GST_STATE_PAUSED || state == GST_STATE_PLAYING) { if (state == GST_STATE_PAUSED || state == GST_STATE_PLAYING) {
GST_INFO_OBJECT (camera, GST_INFO_OBJECT (camera,
@ -3348,6 +3373,7 @@ gst_camerabin_init (GstCameraBin * camera, GstCameraBinClass * gclass)
/* concurrency control */ /* concurrency control */
camera->capture_mutex = g_mutex_new (); camera->capture_mutex = g_mutex_new ();
camera->cond = g_cond_new (); camera->cond = g_cond_new ();
camera->idle_cond = g_cond_new ();
camera->processing_counter = 0; camera->processing_counter = 0;
/* pad names for output and input selectors */ /* pad names for output and input selectors */
@ -3923,8 +3949,10 @@ gst_camerabin_change_state (GstElement * element, GstStateChange transition)
} }
/* reset processing counter */ /* reset processing counter */
GST_DEBUG_OBJECT (camera, "Reset processing counter to 0"); GST_DEBUG_OBJECT (camera, "Reset processing counter from %d to 0",
camera->processing_counter);
camera->processing_counter = 0; camera->processing_counter = 0;
g_cond_signal (camera->idle_cond);
g_object_notify (G_OBJECT (camera), "idle"); g_object_notify (G_OBJECT (camera), "idle");
g_mutex_unlock (camera->capture_mutex); g_mutex_unlock (camera->capture_mutex);

View file

@ -129,6 +129,7 @@ struct _GstCameraBin
/* concurrency control */ /* concurrency control */
GMutex *capture_mutex; GMutex *capture_mutex;
GCond *cond; GCond *cond;
GCond *idle_cond;
gboolean capturing; gboolean capturing;
gboolean eos_handled; gboolean eos_handled;
/* everytime a new capture is started this is incremented, when it is /* everytime a new capture is started this is incremented, when it is

View file

@ -35,6 +35,7 @@
#include <string.h> #include <string.h>
#include <gst/glib-compat-private.h>
#include "gstinputselector.h" #include "gstinputselector.h"
#include "gstcamerabin-marshal.h" #include "gstcamerabin-marshal.h"

View file

@ -165,6 +165,7 @@
#include "gstcamerabin2.h" #include "gstcamerabin2.h"
#include <gst/gst-i18n-plugin.h> #include <gst/gst-i18n-plugin.h>
#include <gst/pbutils/pbutils.h> #include <gst/pbutils/pbutils.h>
#include <gst/glib-compat-private.h>
#if GLIB_CHECK_VERSION(2,29,6) #if GLIB_CHECK_VERSION(2,29,6)
#define gst_camerabin2_atomic_int_add g_atomic_int_add #define gst_camerabin2_atomic_int_add g_atomic_int_add
@ -817,15 +818,13 @@ gst_camera_bin_class_init (GstCameraBin2Class * klass)
/* TODO /* TODO
* Review before stable * Review before stable
* - We use a profile for video recording properties and here we have
* elements for image capture. This is slightly inconsistent.
* - One problem with using encodebin for images here is how jifmux * - One problem with using encodebin for images here is how jifmux
* autoplugging works. We need to give it a higher rank and fix its * autoplugging works. We need to give it a higher rank and fix its
* caps (it has image/jpeg on sink and src pads). Preliminary tests * caps (it has image/jpeg on sink and src pads). Preliminary tests
* show that jifmux is picked if image/jpeg is the caps of a container * show that jifmux is picked if image/jpeg is the caps of a container
* profile. So this could work. * profile. So this could work.
* - There seems to be a problem with encodebin for images currently as * - There seems to be a problem with encodebin for images currently as
* it autoplugs a videorate that ony starts outputing buffers after * it autoplugs a videorate that only starts outputing buffers after
* getting the 2nd buffer. * getting the 2nd buffer.
*/ */
g_object_class_install_property (object_class, PROP_IMAGE_ENCODING_PROFILE, g_object_class_install_property (object_class, PROP_IMAGE_ENCODING_PROFILE,

View file

@ -31,6 +31,10 @@
# include <config.h> # include <config.h>
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <gst/interfaces/photography.h> #include <gst/interfaces/photography.h>
#include "gstwrappercamerabinsrc.h" #include "gstwrappercamerabinsrc.h"

View file

@ -22,6 +22,11 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <string.h> #include <string.h>
#include "gstcdxaparse.h" #include "gstcdxaparse.h"

View file

@ -40,6 +40,10 @@
#include "config.h" #include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include "gstchromahold.h" #include "gstchromahold.h"
#include <stdlib.h> #include <stdlib.h>

View file

@ -38,6 +38,7 @@
# include <config.h> # include <config.h>
#endif #endif
#include <gst/glib-compat-private.h>
#include "gstdvbsuboverlay.h" #include "gstdvbsuboverlay.h"
#include <string.h> #include <string.h>

View file

@ -32,6 +32,10 @@
# include <config.h> # include <config.h>
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <gst/gst-i18n-plugin.h> #include <gst/gst-i18n-plugin.h>
#include <gst/video/video.h> #include <gst/video/video.h>

View file

@ -134,7 +134,7 @@ gst_rotate_base_init (gpointer gclass)
gst_element_class_set_details_simple (element_class, gst_element_class_set_details_simple (element_class,
"rotate", "rotate",
"Transform/Effect/Video", "Transform/Effect/Video",
"Warps the picture into an arc shaped form", "Rotates the picture by an arbitrary angle",
"Thiago Santos<thiago.sousa.santos@collabora.co.uk>"); "Thiago Santos<thiago.sousa.santos@collabora.co.uk>");
} }
@ -154,7 +154,7 @@ rotate_map (GstGeometricTransform * gt, gint x, gint y, gdouble * in_x,
h = gt->height; h = gt->height;
/* our parameters */ /* our parameters */
ar = rotate->angle * G_PI / 180.0; /* angle of rotation, degrees to radians */ ar = rotate->angle; /* angle of rotation */
/* get in and out centers */ /* get in and out centers */
cox = 0.5 * w; cox = 0.5 * w;

View file

@ -6,8 +6,8 @@ libgstfragmented_la_SOURCES = \
gsthlsdemux.c \ gsthlsdemux.c \
gstfragmentedplugin.c gstfragmentedplugin.c
libgstfragmented_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(SOUP_CFLAGS) libgstfragmented_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(SOUP_CFLAGS)
libgstfragmented_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(SOUP_LIBS) libgstfragmented_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(SOUP_LIBS)
libgstfragmented_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -no-undefined libgstfragmented_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -no-undefined
libgstfragmented_la_LIBTOOLFLAGS = --tag=disable-static libgstfragmented_la_LIBTOOLFLAGS = --tag=disable-static

View file

@ -41,9 +41,13 @@
# include "config.h" # include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <string.h> #include <string.h>
#include <gst/base/gsttypefindhelper.h> #include <gst/base/gsttypefindhelper.h>
#include <gst/glib-compat-private.h>
#include "gsthlsdemux.h" #include "gsthlsdemux.h"
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src_%u", static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src_%u",

View file

@ -23,6 +23,7 @@
#include <errno.h> #include <errno.h>
#include <glib.h> #include <glib.h>
#include <gst/glib-compat-private.h>
#include "gstfragmented.h" #include "gstfragmented.h"
#include "m3u8.h" #include "m3u8.h"

View file

@ -22,14 +22,15 @@ noinst_HEADERS = \
gstintersurface.h gstintersurface.h
libgstinter_la_CFLAGS = \ libgstinter_la_CFLAGS = \
$(GST_CFLAGS) \ $(GST_PLUGINS_BAD_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) $(GST_BASE_CFLAGS) \
$(GST_CFLAGS)
libgstinter_la_LIBADD = \ libgstinter_la_LIBADD = \
$(GST_LIBS) \
$(GST_BASE_LIBS) \
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ -lgstaudio-@GST_MAJORMINOR@ \ $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ -lgstaudio-@GST_MAJORMINOR@ \
$(GST_BASE_LIBS) \
$(GST_LIBS) \
$(LIBM) $(LIBM)
libgstinter_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstinter_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
@ -39,12 +40,13 @@ gstintertest_SOURCES = \
gstintertest.c gstintertest.c
gstintertest_CFLAGS = \ gstintertest_CFLAGS = \
$(GST_CFLAGS) \ $(GST_PLUGINS_BAD_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
$(GST_CFLAGS)
gstintertest_LDADD = \ gstintertest_LDADD = \
$(GST_LIBS) \
$(GST_PLUGINS_BASE_LIBS) \ $(GST_PLUGINS_BASE_LIBS) \
$(GST_LIBS) \
$(LIBM) $(LIBM)
Android.mk: Makefile.am $(BUILT_SOURCES) Android.mk: Makefile.am $(BUILT_SOURCES)

View file

@ -23,6 +23,7 @@
#include <string.h> #include <string.h>
#include <gst/glib-compat-private.h>
#include "gstintersurface.h" #include "gstintersurface.h"
static GList *list; static GList *list;

View file

@ -29,6 +29,7 @@
#endif #endif
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <stdlib.h> #include <stdlib.h>
//#define GETTEXT_PACKAGE "intertest" //#define GETTEXT_PACKAGE "intertest"
@ -80,8 +81,10 @@ main (int argc, char *argv[])
GstInterTest *intertest2; GstInterTest *intertest2;
GMainLoop *main_loop; GMainLoop *main_loop;
#if !GLIB_CHECK_VERSION (2, 31, 0)
if (!g_thread_supported ()) if (!g_thread_supported ())
g_thread_init (NULL); g_thread_init (NULL);
#endif
context = g_option_context_new ("- FIXME"); context = g_option_context_new ("- FIXME");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);

View file

@ -1,7 +1,7 @@
plugin_LTLIBRARIES = libgstliveadder.la plugin_LTLIBRARIES = libgstliveadder.la
libgstliveadder_la_SOURCES = liveadder.c libgstliveadder_la_SOURCES = liveadder.c
libgstliveadder_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) libgstliveadder_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
libgstliveadder_la_LIBADD = \ libgstliveadder_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_MAJORMINOR@ \ $(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_MAJORMINOR@ \
$(GST_BASE_LIBS) $(GST_LIBS) $(GST_BASE_LIBS) $(GST_LIBS)

View file

@ -44,6 +44,7 @@
#include "liveadder.h" #include "liveadder.h"
#include <gst/glib-compat-private.h>
#include <gst/audio/audio.h> #include <gst/audio/audio.h>
#include <string.h> #include <string.h>

View file

@ -46,6 +46,10 @@
#include "config.h" #include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <string.h> #include <string.h>
#include "gstmpegdefs.h" #include "gstmpegdefs.h"
@ -114,8 +118,8 @@ static GstStaticPadTemplate audio_template =
GST_STATIC_PAD_TEMPLATE ("audio_%02x", GST_STATIC_PAD_TEMPLATE ("audio_%02x",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_SOMETIMES, GST_PAD_SOMETIMES,
GST_STATIC_CAPS ("audio/mpeg, " GST_STATIC_CAPS ("audio/mpeg, mpegversion = (int) 1;"
"mpegversion = (int) { 1, 4 };" "audio/mpeg, mpegversion = (int) 4, stream-format = (string) { adts, loas };"
"audio/x-private1-lpcm; " "audio/x-private1-lpcm; "
"audio/x-private1-ac3;" "audio/x-private1-dts;" "audio/ac3") "audio/x-private1-ac3;" "audio/x-private1-dts;" "audio/ac3")
); );

View file

@ -125,7 +125,10 @@ enum
#define AUDIO_CAPS \ #define AUDIO_CAPS \
GST_STATIC_CAPS ( \ GST_STATIC_CAPS ( \
"audio/mpeg, " \ "audio/mpeg, " \
"mpegversion = (int) { 1, 4 };" \ "mpegversion = (int) 1;" \
"audio/mpeg, " \
"mpegversion = (int) 4, " \
"stream-format = (string) { adts, loas };" \
"audio/x-lpcm, " \ "audio/x-lpcm, " \
"width = (int) { 16, 20, 24 }, " \ "width = (int) { 16, 20, 24 }, " \
"rate = (int) { 48000, 96000 }, " \ "rate = (int) { 48000, 96000 }, " \
@ -396,6 +399,14 @@ gst_mpegts_demux_reset (GstMpegTSDemux * demux)
demux->last_buf_ts = GST_CLOCK_TIME_NONE; demux->last_buf_ts = GST_CLOCK_TIME_NONE;
} }
static void
gst_mpegts_demux_no_more_pads (GstElement * demux)
{
/* We should really call no-more-pads here, but we don't as
this would preclude addition of more pads if/when new streams
are added. */
}
#if 0 #if 0
static void static void
gst_mpegts_demux_remove_pads (GstMpegTSDemux * demux) gst_mpegts_demux_remove_pads (GstMpegTSDemux * demux)
@ -1083,7 +1094,7 @@ gst_mpegts_demux_sync_streams (GstMpegTSDemux * demux, GstClockTime time)
any pad that might be waiting for data */ any pad that might be waiting for data */
if (!stream->pad && demux->pending_pads > 0) { if (!stream->pad && demux->pending_pads > 0) {
demux->pending_pads = 0; demux->pending_pads = 0;
gst_element_no_more_pads (GST_ELEMENT (demux)); gst_mpegts_demux_no_more_pads (GST_ELEMENT (demux));
} }
if (stream->pad) { if (stream->pad) {
@ -1329,7 +1340,7 @@ gst_mpegts_demux_data_cb (GstPESFilter * filter, gboolean first,
If not, we'll add pads as we get data for them, and will end up If not, we'll add pads as we get data for them, and will end up
hitting decodebin2's overrun threshold (if using decodebin2) */ hitting decodebin2's overrun threshold (if using decodebin2) */
GST_DEBUG_OBJECT (demux, "All pads added, we can signal no-more-pads"); GST_DEBUG_OBJECT (demux, "All pads added, we can signal no-more-pads");
gst_element_no_more_pads (GST_ELEMENT (demux)); gst_mpegts_demux_no_more_pads (GST_ELEMENT (demux));
} else { } else {
GST_DEBUG_OBJECT (demux, GST_DEBUG_OBJECT (demux,
"All pads could not be added, we will not signal no-more-pads"); "All pads could not be added, we will not signal no-more-pads");
@ -1384,7 +1395,7 @@ gst_mpegts_demux_data_cb (GstPESFilter * filter, gboolean first,
"Adding pad due to received data, decreasing pending pads to %d", "Adding pad due to received data, decreasing pending pads to %d",
demux->pending_pads); demux->pending_pads);
if (demux->pending_pads == 0) if (demux->pending_pads == 0)
gst_element_no_more_pads (GST_ELEMENT (demux)); gst_mpegts_demux_no_more_pads (GST_ELEMENT (demux));
stream->discont = TRUE; stream->discont = TRUE;
@ -1738,7 +1749,7 @@ gst_mpegts_stream_parse_pmt (GstMpegTSStream * stream,
GST_DEBUG_OBJECT (demux, "Done parsing PMT, pending pads now %d", GST_DEBUG_OBJECT (demux, "Done parsing PMT, pending pads now %d",
demux->pending_pads); demux->pending_pads);
if (demux->pending_pads == 0) if (demux->pending_pads == 0)
gst_element_no_more_pads (GST_ELEMENT (demux)); gst_mpegts_demux_no_more_pads (GST_ELEMENT (demux));
return TRUE; return TRUE;

View file

@ -69,7 +69,9 @@ static GstStaticPadTemplate mpegpsmux_sink_factory =
"video/x-dirac;" "video/x-dirac;"
"video/x-h264;" "video/x-h264;"
"audio/mpeg, " "audio/mpeg, "
"mpegversion = (int) { 1, 2, 4 };" "mpegversion = (int) { 1, 2 };"
"audio/mpeg, "
"mpegversion = (int) 4, stream-format = (string) { raw, adts }; "
"audio/x-lpcm, " "audio/x-lpcm, "
"width = (int) { 16, 20, 24 }, " "width = (int) { 16, 20, 24 }, "
"rate = (int) { 48000, 96000 }, " "rate = (int) { 48000, 96000 }, "

View file

@ -32,6 +32,10 @@
#include "config.h" #include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -174,6 +178,7 @@ mpegts_base_class_init (MpegTSBaseClass * klass)
element_class = GST_ELEMENT_CLASS (klass); element_class = GST_ELEMENT_CLASS (klass);
element_class->change_state = mpegts_base_change_state; element_class->change_state = mpegts_base_change_state;
gst_element_class_add_pad_template (element_class, gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_template)); gst_static_pad_template_get (&sink_template));

View file

@ -144,7 +144,10 @@ struct _TSDemuxStream
#define AUDIO_CAPS \ #define AUDIO_CAPS \
GST_STATIC_CAPS ( \ GST_STATIC_CAPS ( \
"audio/mpeg, " \ "audio/mpeg, " \
"mpegversion = (int) { 1, 4 };" \ "mpegversion = (int) 1;" \
"audio/mpeg, " \
"mpegversion = (int) 4, " \
"stream-format = (string) adts; " \
"audio/x-lpcm, " \ "audio/x-lpcm, " \
"width = (int) { 16, 20, 24 }, " \ "width = (int) { 16, 20, 24 }, " \
"rate = (int) { 48000, 96000 }, " \ "rate = (int) { 48000, 96000 }, " \
@ -1082,11 +1085,12 @@ create_pad_for_stream (MpegTSBase * base, MpegTSBaseStream * bstream,
case ST_DSMCC_D: case ST_DSMCC_D:
MPEGTS_BIT_UNSET (base->is_pes, bstream->pid); MPEGTS_BIT_UNSET (base->is_pes, bstream->pid);
break; break;
case ST_AUDIO_AAC: case ST_AUDIO_AAC: /* ADTS */
template = gst_static_pad_template_get (&audio_template); template = gst_static_pad_template_get (&audio_template);
name = g_strdup_printf ("audio_%04x", bstream->pid); name = g_strdup_printf ("audio_%04x", bstream->pid);
caps = gst_caps_new_simple ("audio/mpeg", caps = gst_caps_new_simple ("audio/mpeg",
"mpegversion", G_TYPE_INT, 4, NULL); "mpegversion", G_TYPE_INT, 4,
"stream-format", G_TYPE_STRING, "adts", NULL);
break; break;
case ST_VIDEO_MPEG4: case ST_VIDEO_MPEG4:
template = gst_static_pad_template_get (&video_template); template = gst_static_pad_template_get (&video_template);

View file

@ -88,6 +88,10 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <gst/video/video.h> #include <gst/video/video.h>
#include "mpegtsmux.h" #include "mpegtsmux.h"
@ -117,7 +121,9 @@ static GstStaticPadTemplate mpegtsmux_sink_factory =
"video/x-dirac;" "video/x-dirac;"
"video/x-h264,stream-format=(string)byte-stream;" "video/x-h264,stream-format=(string)byte-stream;"
"audio/mpeg, " "audio/mpeg, "
"mpegversion = (int) { 1, 2, 4 };" "mpegversion = (int) { 1, 2 };"
"audio/mpeg, "
"mpegversion = (int) 4, stream-format = (string) { raw, adts };"
"audio/x-lpcm, " "audio/x-lpcm, "
"width = (int) { 16, 20, 24 }, " "width = (int) { 16, 20, 24 }, "
"rate = (int) { 48000, 96000 }, " "rate = (int) { 48000, 96000 }, "
@ -659,27 +665,6 @@ mpegtsmux_choose_best_stream (MpegTsMux * mux)
#define COLLECT_DATA_PAD(collect_data) (((GstCollectData2 *)(collect_data))->pad) #define COLLECT_DATA_PAD(collect_data) (((GstCollectData2 *)(collect_data))->pad)
static MpegTsPadData *
find_pad_data (MpegTsMux * mux, GstPad * pad)
{
GSList *walk;
MpegTsPadData *ts_data = NULL;
GST_COLLECT_PADS2_STREAM_LOCK (mux->collect);
walk = mux->collect->pad_list;
while (walk) {
if (((GstCollectData2 *) walk->data)->pad == pad) {
ts_data = (MpegTsPadData *) walk->data;
break;
}
walk = g_slist_next (walk);
}
GST_COLLECT_PADS2_STREAM_UNLOCK (mux->collect);
return ts_data;
}
static gboolean static gboolean
mpegtsmux_sink_event (GstPad * pad, GstEvent * event) mpegtsmux_sink_event (GstPad * pad, GstEvent * event)
{ {
@ -688,7 +673,7 @@ mpegtsmux_sink_event (GstPad * pad, GstEvent * event)
gboolean res = TRUE; gboolean res = TRUE;
gboolean forward = TRUE; gboolean forward = TRUE;
ts_data = find_pad_data (mux, pad); ts_data = (MpegTsPadData *) gst_pad_get_element_private (pad);
switch (GST_EVENT_TYPE (event)) { switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_CUSTOM_DOWNSTREAM: case GST_EVENT_CUSTOM_DOWNSTREAM:

View file

@ -1,6 +1,6 @@
plugin_LTLIBRARIES = libgstmve.la plugin_LTLIBRARIES = libgstmve.la
libgstmve_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) libgstmve_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
libgstmve_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) libgstmve_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
libgstmve_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstmve_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstmve_la_LIBTOOLFLAGS = --tag=disable-static libgstmve_la_LIBTOOLFLAGS = --tag=disable-static

View file

@ -31,6 +31,7 @@ gst-launch-0.10 filesrc location=movie.mve ! mvedemux name=d !
#include <string.h> #include <string.h>
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include "gstmvemux.h" #include "gstmvemux.h"
#include "mve.h" #include "mve.h"

View file

@ -54,6 +54,10 @@
#include "config.h" #include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include "mxfdemux.h" #include "mxfdemux.h"
#include "mxfessence.h" #include "mxfessence.h"

View file

@ -29,6 +29,10 @@
#include <string.h> #include <string.h>
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/base/gstbasetransform.h> #include <gst/base/gstbasetransform.h>
#include <gst/base/gstadapter.h> #include <gst/base/gstadapter.h>

View file

@ -47,6 +47,10 @@
#include "config.h" #include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include "gstsdpdemux.h" #include "gstsdpdemux.h"
#include <gst/rtp/gstrtppayloads.h> #include <gst/rtp/gstrtppayloads.h>

View file

@ -19,6 +19,10 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <gst/gst.h> #include <gst/gst.h>
#include <math.h> #include <math.h>

View file

@ -176,15 +176,12 @@ gst_h264_parse_reset_frame (GstH264Parse * h264parse)
GST_DEBUG_OBJECT (h264parse, "reset frame"); GST_DEBUG_OBJECT (h264parse, "reset frame");
/* done parsing; reset state */ /* done parsing; reset state */
h264parse->nalu.valid = FALSE; h264parse->current_off = -1;
h264parse->nalu.offset = 0;
h264parse->nalu.sc_offset = 0;
h264parse->nalu.size = 0;
h264parse->current_off = 0;
h264parse->picture_start = FALSE; h264parse->picture_start = FALSE;
h264parse->update_caps = FALSE; h264parse->update_caps = FALSE;
h264parse->idr_pos = -1; h264parse->idr_pos = -1;
h264parse->sei_pos = -1;
h264parse->keyframe = FALSE; h264parse->keyframe = FALSE;
h264parse->frame_start = FALSE; h264parse->frame_start = FALSE;
gst_adapter_clear (h264parse->frame_out); gst_adapter_clear (h264parse->frame_out);
@ -291,6 +288,9 @@ gst_h264_parse_get_string (GstH264Parse * parse, gboolean format, gint code)
static void static void
gst_h264_parse_format_from_caps (GstCaps * caps, guint * format, guint * align) gst_h264_parse_format_from_caps (GstCaps * caps, guint * format, guint * align)
{ {
g_return_if_fail (gst_caps_is_fixed (caps));
GST_DEBUG ("parsing caps: %" GST_PTR_FORMAT, caps);
if (format) if (format)
*format = GST_H264_PARSE_FORMAT_NONE; *format = GST_H264_PARSE_FORMAT_NONE;
@ -330,9 +330,20 @@ gst_h264_parse_negotiate (GstH264Parse * h264parse, GstCaps * in_caps)
guint format = GST_H264_PARSE_FORMAT_NONE; guint format = GST_H264_PARSE_FORMAT_NONE;
guint align = GST_H264_PARSE_ALIGN_NONE; guint align = GST_H264_PARSE_ALIGN_NONE;
g_return_if_fail ((in_caps == NULL) || gst_caps_is_fixed (in_caps));
caps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (h264parse)); caps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (h264parse));
GST_DEBUG_OBJECT (h264parse, "allowed caps: %" GST_PTR_FORMAT, caps); GST_DEBUG_OBJECT (h264parse, "allowed caps: %" GST_PTR_FORMAT, caps);
/* concentrate on leading structure, since decodebin2 parser
* capsfilter always includes parser template caps */
if (caps) {
caps = gst_caps_make_writable (caps);
gst_caps_truncate (caps);
GST_DEBUG_OBJECT (h264parse, "negotiating with caps: %" GST_PTR_FORMAT,
caps);
}
if (in_caps && caps) { if (in_caps && caps) {
if (gst_caps_can_intersect (in_caps, caps)) { if (gst_caps_can_intersect (in_caps, caps)) {
GST_DEBUG_OBJECT (h264parse, "downstream accepts upstream caps"); GST_DEBUG_OBJECT (h264parse, "downstream accepts upstream caps");
@ -343,6 +354,8 @@ gst_h264_parse_negotiate (GstH264Parse * h264parse, GstCaps * in_caps)
} }
if (caps) { if (caps) {
/* fixate to avoid ambiguity with lists when parsing */
gst_pad_fixate_caps (GST_BASE_PARSE_SRC_PAD (h264parse), caps);
gst_h264_parse_format_from_caps (caps, &format, &align); gst_h264_parse_format_from_caps (caps, &format, &align);
gst_caps_unref (caps); gst_caps_unref (caps);
} }
@ -504,6 +517,15 @@ gst_h264_parse_process_nal (GstH264Parse * h264parse, GstH264NalUnit * nalu)
GST_TIME_ARGS (h264parse->ts_trn_nb)); GST_TIME_ARGS (h264parse->ts_trn_nb));
break; break;
} }
/* mark SEI pos */
if (h264parse->sei_pos == -1) {
if (h264parse->format == GST_H264_PARSE_FORMAT_AVC)
h264parse->sei_pos = gst_adapter_available (h264parse->frame_out);
else
h264parse->sei_pos = nalu->offset - 4;
GST_DEBUG_OBJECT (h264parse, "marking SEI in frame at offset %d",
h264parse->sei_pos);
}
break; break;
case GST_H264_NAL_SLICE: case GST_H264_NAL_SLICE:
@ -547,6 +569,12 @@ gst_h264_parse_process_nal (GstH264Parse * h264parse, GstH264NalUnit * nalu)
GST_DEBUG_OBJECT (h264parse, "marking IDR in frame at offset %d", GST_DEBUG_OBJECT (h264parse, "marking IDR in frame at offset %d",
h264parse->idr_pos); h264parse->idr_pos);
} }
/* if SEI preceeds (faked) IDR, then we have to insert config there */
if (h264parse->sei_pos >= 0 && h264parse->idr_pos > h264parse->sei_pos) {
h264parse->idr_pos = h264parse->sei_pos;
GST_DEBUG_OBJECT (h264parse, "moved IDR mark to SEI position %d",
h264parse->idr_pos);
}
break; break;
default: default:
gst_h264_parser_parse_nal (nalparser, nalu); gst_h264_parser_parse_nal (nalparser, nalu);
@ -575,10 +603,6 @@ gst_h264_parse_collect_nal (GstH264Parse * h264parse, const guint8 * data,
GstH264NalUnitType nal_type = nalu->type; GstH264NalUnitType nal_type = nalu->type;
GstH264NalUnit nnalu; GstH264NalUnit nnalu;
if (h264parse->align == GST_H264_PARSE_ALIGN_NAL) {
return TRUE;
}
GST_DEBUG_OBJECT (h264parse, "parsing collected nal"); GST_DEBUG_OBJECT (h264parse, "parsing collected nal");
parse_res = gst_h264_parser_identify_nalu (h264parse->nalparser, data, parse_res = gst_h264_parser_identify_nalu (h264parse->nalparser, data,
nalu->offset + nalu->size, size, &nnalu); nalu->offset + nalu->size, size, &nnalu);
@ -631,9 +655,10 @@ gst_h264_parse_check_valid_frame (GstBaseParse * parse,
guint8 *data; guint8 *data;
gsize size; gsize size;
guint current_off = 0; guint current_off = 0;
gboolean drain; gboolean drain, nonext;
GstH264NalParser *nalparser = h264parse->nalparser; GstH264NalParser *nalparser = h264parse->nalparser;
GstH264NalUnit nalu; GstH264NalUnit nalu;
GstH264ParserResult pres;
gst_buffer_map (buffer, &map, GST_MAP_READ); gst_buffer_map (buffer, &map, GST_MAP_READ);
data = map.data; data = map.data;
@ -658,15 +683,39 @@ gst_h264_parse_check_valid_frame (GstBaseParse * parse,
GST_LOG_OBJECT (h264parse, "resuming frame parsing"); GST_LOG_OBJECT (h264parse, "resuming frame parsing");
} }
drain = FALSE; drain = GST_BASE_PARSE_DRAINING (parse);
nalu = h264parse->nalu; nonext = FALSE;
current_off = h264parse->current_off; current_off = h264parse->current_off;
if (current_off < 0)
current_off = 0;
g_assert (current_off < size);
GST_DEBUG_OBJECT (h264parse, "last parse position %d", current_off);
/* check for initial skip */
if (h264parse->current_off == -1) {
pres =
gst_h264_parser_identify_nalu_unchecked (nalparser, data, current_off,
size, &nalu);
switch (pres) {
case GST_H264_PARSER_OK:
if (nalu.sc_offset > 0) {
*skipsize = nalu.sc_offset;
goto skip;
}
break;
case GST_H264_PARSER_NO_NAL:
*skipsize = size - 3;
goto skip;
break;
default:
g_assert_not_reached ();
break;
}
}
GST_DEBUG_OBJECT (h264parse, "last parse position %u", current_off);
while (TRUE) { while (TRUE) {
GstH264ParserResult pres; if (h264parse->packetized_chunked)
if (h264parse->packetized)
pres = pres =
gst_h264_parser_identify_nalu_unchecked (nalparser, data, current_off, gst_h264_parser_identify_nalu_unchecked (nalparser, data, current_off,
size, &nalu); size, &nalu);
@ -677,131 +726,121 @@ gst_h264_parse_check_valid_frame (GstBaseParse * parse,
switch (pres) { switch (pres) {
case GST_H264_PARSER_OK: case GST_H264_PARSER_OK:
GST_DEBUG_OBJECT (h264parse, "complete nal found. " GST_DEBUG_OBJECT (h264parse, "complete nal (offset, size): (%u, %u) ",
"current offset: %u, Nal offset: %u, Nal Size: %u", nalu.offset, nalu.size);
current_off, nalu.offset, nalu.size);
GST_DEBUG_OBJECT (h264parse, "current off. %u",
nalu.offset + nalu.size);
if (!h264parse->nalu.size && !h264parse->nalu.valid)
h264parse->nalu = nalu;
/* need 2 bytes of next nal */
if (!h264parse->packetized && (nalu.offset + nalu.size + 4 + 2 > size)) {
if (GST_BASE_PARSE_DRAINING (parse)) {
drain = TRUE;
} else {
GST_DEBUG_OBJECT (h264parse, "need more bytes of next nal");
current_off = nalu.sc_offset;
goto more;
}
}
break; break;
case GST_H264_PARSER_BROKEN_LINK:
goto out;
case GST_H264_PARSER_ERROR:
current_off = size - 3;
goto parsing_error;
case GST_H264_PARSER_NO_NAL:
/* don't expect to have found any NAL so far */
g_assert (h264parse->nalu.size == 0);
current_off = h264parse->nalu.sc_offset = size - 3;
goto more;
case GST_H264_PARSER_BROKEN_DATA:
GST_WARNING_OBJECT (h264parse, "input stream is corrupt; "
"it contains a NAL unit of length %d", nalu.size);
/* broken nal at start -> arrange to skip it,
* otherwise have it terminate current au
* (and so it will be skipped on next frame round) */
if (nalu.sc_offset == h264parse->nalu.sc_offset) {
*skipsize = nalu.offset;
GST_DEBUG_OBJECT (h264parse, "skipping broken nal");
goto invalid;
} else {
nalu.size = 0;
goto end;
}
case GST_H264_PARSER_NO_NAL_END: case GST_H264_PARSER_NO_NAL_END:
GST_DEBUG_OBJECT (h264parse, "not a complete nal found at offset %u", GST_DEBUG_OBJECT (h264parse, "not a complete nal found at offset %u",
nalu.offset); nalu.offset);
/* if draining, accept it as complete nal */
current_off = nalu.sc_offset; if (drain) {
/* We keep the reference to this nal so we start over the parsing nonext = TRUE;
* here */
if (!h264parse->nalu.size && !h264parse->nalu.valid)
h264parse->nalu = nalu;
if (GST_BASE_PARSE_DRAINING (parse)) {
drain = TRUE;
GST_DEBUG_OBJECT (h264parse, "draining NAL %" G_GSIZE_FORMAT " %u %u",
size, h264parse->nalu.offset, h264parse->nalu.size);
/* Can't parse the nalu */
if (size - h264parse->nalu.offset < 2) {
*skipsize = nalu.offset;
goto invalid;
}
/* We parse it anyway */
nalu.size = size - nalu.offset; nalu.size = size - nalu.offset;
GST_DEBUG_OBJECT (h264parse, "draining, accepting with size %u",
nalu.size);
/* if it's not too short at least */
if (nalu.size < 2)
goto broken;
break; break;
} }
/* otherwise need more */
goto more; goto more;
case GST_H264_PARSER_BROKEN_LINK:
g_assert_not_reached ();
break;
case GST_H264_PARSER_ERROR:
/* should not really occur either */
GST_DEBUG_OBJECT (h264parse, "error parsing Nal Unit");
/* fall-through */
case GST_H264_PARSER_NO_NAL:
g_assert_not_reached ();
break;
case GST_H264_PARSER_BROKEN_DATA:
GST_WARNING_OBJECT (h264parse, "input stream is corrupt; "
"it contains a NAL unit of length %u", nalu.size);
broken:
/* broken nal at start -> arrange to skip it,
* otherwise have it terminate current au
* (and so it will be skipped on next frame round) */
if (current_off == 0) {
GST_DEBUG_OBJECT (h264parse, "skipping broken nal");
*skipsize = nalu.offset;
goto skip;
} else {
GST_DEBUG_OBJECT (h264parse, "terminating au");
nalu.size = 0;
nalu.offset = nalu.sc_offset;
goto end;
}
break;
default:
g_assert_not_reached ();
break;
} }
current_off = nalu.offset + nalu.size;
GST_DEBUG_OBJECT (h264parse, "%p complete nal found. Off: %u, Size: %u", GST_DEBUG_OBJECT (h264parse, "%p complete nal found. Off: %u, Size: %u",
data, nalu.offset, nalu.size); data, nalu.offset, nalu.size);
/* simulate no next nal if none needed */
nonext = nonext || (h264parse->align == GST_H264_PARSE_ALIGN_NAL);
if (!nonext && !h264parse->packetized_chunked) {
if (nalu.offset + nalu.size + 4 + 2 > size) {
GST_DEBUG_OBJECT (h264parse, "not enough data for next NALU");
if (drain) {
GST_DEBUG_OBJECT (h264parse, "but draining anyway");
nonext = TRUE;
} else {
goto more;
}
}
}
gst_h264_parse_process_nal (h264parse, &nalu); gst_h264_parse_process_nal (h264parse, &nalu);
/* if no next nal, we know it's complete here */
if (drain || gst_h264_parse_collect_nal (h264parse, data, size, &nalu)) if (nonext)
break; break;
/* In packetized mode we know there's only on NALU in each input packet */ /* In packetized mode we know there's only on NALU in each input packet,
if (h264parse->packetized) * but we may not have seen the whole AU already, possibly need more */
if (h264parse->packetized_chunked) {
if (h264parse->packetized_last)
break;
/* next NALU expected at end of current data */
current_off = size;
goto more;
}
/* if no next nal, we know it's complete here */
if (gst_h264_parse_collect_nal (h264parse, data, size, &nalu))
break; break;
GST_DEBUG_OBJECT (h264parse, "Looking for more"); GST_DEBUG_OBJECT (h264parse, "Looking for more");
current_off = nalu.offset + nalu.size;
} }
end: end:
*skipsize = h264parse->nalu.sc_offset; *framesize = nalu.offset + nalu.size;
*framesize = nalu.offset + nalu.size - h264parse->nalu.sc_offset;
h264parse->current_off = current_off;
gst_buffer_unmap (buffer, &map); gst_buffer_unmap (buffer, &map);
return TRUE; return TRUE;
parsing_error:
GST_DEBUG_OBJECT (h264parse, "error parsing Nal Unit");
more: more:
/* ask for best next available */ /* ask for best next available */
*framesize = G_MAXUINT; *framesize = G_MAXUINT;
if (!h264parse->nalu.size) { *skipsize = 0;
/* skip up to initial startcode */
*skipsize = h264parse->nalu.sc_offset;
/* but mind some stuff will have been skipped */
g_assert (current_off >= *skipsize);
current_off -= *skipsize;
h264parse->nalu.sc_offset = 0;
} else {
*skipsize = 0;
}
/* Restart parsing from here next time */ /* Restart parsing from here next time */
h264parse->current_off = current_off; if (current_off > 0)
h264parse->current_off = current_off;
/* Fall-through. */ /* Fall-through. */
out: out:
gst_buffer_unmap (buffer, &map); gst_buffer_unmap (buffer, &map);
return FALSE; return FALSE;
invalid: skip:
GST_DEBUG_OBJECT (h264parse, "skipping %d", *skipsize);
gst_h264_parse_reset_frame (h264parse); gst_h264_parse_reset_frame (h264parse);
goto out; goto out;
} }
@ -1873,7 +1912,17 @@ gst_h264_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
nalu.data + nalu.offset, nalu.size); nalu.data + nalu.offset, nalu.size);
/* at least this should make sense */ /* at least this should make sense */
GST_BUFFER_TIMESTAMP (sub) = GST_BUFFER_TIMESTAMP (buffer); GST_BUFFER_TIMESTAMP (sub) = GST_BUFFER_TIMESTAMP (buffer);
GST_LOG_OBJECT (h264parse, "pushing NAL of size %d", nalu.size); /* transfer flags (e.g. DISCONT) for first fragment */
if (nalu.offset <= nl)
gst_buffer_copy_metadata (sub, buffer, GST_BUFFER_COPY_FLAGS);
/* in reverse playback, baseparse gathers buffers, so we cannot
* guarantee a buffer to contain a single whole NALU */
h264parse->packetized_chunked =
(GST_BASE_PARSE (h264parse)->segment.rate > 0.0);
h264parse->packetized_last =
(nalu.offset + nalu.size + nl >= GST_BUFFER_SIZE (buffer));
GST_LOG_OBJECT (h264parse, "pushing NAL of size %d, last = %d",
nalu.size, h264parse->packetized_last);
ret = h264parse->parse_chain (pad, parent, sub); ret = h264parse->parse_chain (pad, parent, sub);
} else { } else {
/* pass-through: no looking for frames (and nal processing), /* pass-through: no looking for frames (and nal processing),

View file

@ -67,10 +67,11 @@ struct _GstH264Parse
/* state */ /* state */
GstH264NalParser *nalparser; GstH264NalParser *nalparser;
GstH264NalUnit nalu;
guint align; guint align;
guint format; guint format;
guint current_off; gint current_off;
gboolean packetized_last;
gboolean packetized_chunked;
GstClockTime last_report; GstClockTime last_report;
gboolean push_codec; gboolean push_codec;
@ -97,7 +98,7 @@ struct _GstH264Parse
/* frame parsing */ /* frame parsing */
/*guint last_nal_pos;*/ /*guint last_nal_pos;*/
/*guint next_sc_pos;*/ /*guint next_sc_pos;*/
gint idr_pos; gint idr_pos, sei_pos;
gboolean update_caps; gboolean update_caps;
GstAdapter *frame_out; GstAdapter *frame_out;
gboolean keyframe; gboolean keyframe;

View file

@ -691,6 +691,9 @@ gst_mpegv_parse_update_src_caps (GstMpegvParse * mpvparse)
gst_caps_set_simple (caps, "level", G_TYPE_STRING, level, NULL); gst_caps_set_simple (caps, "level", G_TYPE_STRING, level, NULL);
else else
GST_DEBUG_OBJECT (mpvparse, "Invalid level - %u", level_c); GST_DEBUG_OBJECT (mpvparse, "Invalid level - %u", level_c);
gst_caps_set_simple (caps, "interlaced",
G_TYPE_BOOLEAN, !mpvparse->sequenceext.progressive, NULL);
} }
gst_pad_set_caps (GST_BASE_PARSE_SRC_PAD (mpvparse), caps); gst_pad_set_caps (GST_BASE_PARSE_SRC_PAD (mpvparse), caps);

File diff suppressed because it is too large Load diff

View file

@ -83,8 +83,9 @@ struct _GstD3DVideoSink
gboolean is_hooked; gboolean is_hooked;
GMutex *d3d_swap_chain_lock; GMutex *d3d_swap_chain_lock;
LPDIRECT3DSWAPCHAIN9 d3d_swap_chain;
LPDIRECT3DSURFACE9 d3d_offscreen_surface; LPDIRECT3DSURFACE9 d3d_offscreen_surface;
LPDIRECT3DDEVICE9 d3ddev;
D3DPRESENT_PARAMETERS d3dpp;
D3DFORMAT d3dformat; D3DFORMAT d3dformat;
D3DFORMAT d3dfourcc; D3DFORMAT d3dfourcc;

View file

@ -1,6 +1,7 @@
plugin_LTLIBRARIES = libgstdecklink.la plugin_LTLIBRARIES = libgstdecklink.la
libgstdecklink_la_CPPFLAGS = \ libgstdecklink_la_CPPFLAGS = \
$(GST_PLUGINS_BAD_CFLAGS) \
$(GST_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \
$(GST_CXXFLAGS) \ $(GST_CXXFLAGS) \
$(DECKLINK_CXXFLAGS) $(DECKLINK_CXXFLAGS)

View file

@ -31,6 +31,8 @@
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <gst/glib-compat-private.h>
#include "gstdecklinksrc.h" #include "gstdecklinksrc.h"
#include "capture.h" #include "capture.h"

View file

@ -35,7 +35,7 @@
#endif #endif
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/gst.h> #include <gst/glib-compat-private.h>
#include "gstdecklink.h" #include "gstdecklink.h"
#include "gstdecklinksink.h" #include "gstdecklinksink.h"
#include <string.h> #include <string.h>

View file

@ -35,7 +35,12 @@
#include "config.h" #include "config.h"
#endif #endif
/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include "gstdecklink.h" #include "gstdecklink.h"
#include "gstdecklinksrc.h" #include "gstdecklinksrc.h"
#include "capture.h" #include "capture.h"

View file

@ -42,6 +42,7 @@
#include "gstdvbsrc.h" #include "gstdvbsrc.h"
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/poll.h> #include <sys/poll.h>
#include <fcntl.h> #include <fcntl.h>

View file

@ -5,9 +5,9 @@ include $(top_srcdir)/common/glib-gen.mak
plugin_LTLIBRARIES = libgstshm.la plugin_LTLIBRARIES = libgstshm.la
libgstshm_la_SOURCES = shmpipe.c shmalloc.c gstshm.c gstshmsrc.c gstshmsink.c libgstshm_la_SOURCES = shmpipe.c shmalloc.c gstshm.c gstshmsrc.c gstshmsink.c
libgstshm_la_CFLAGS = $(GST_CFLAGS) -DSHM_PIPE_USE_GLIB libgstshm_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS) -DSHM_PIPE_USE_GLIB
libgstshm_la_LIBADD = -lrt libgstshm_la_LIBADD = -lrt
libgstshm_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) libgstshm_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GST_BASE_LIBS)
libgstshm_la_LIBTOOLFLAGS = --tag=disable-static libgstshm_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = gstshmsrc.h gstshmsink.h shmpipe.h shmalloc.h noinst_HEADERS = gstshmsrc.h gstshmsink.h shmpipe.h shmalloc.h

View file

@ -27,6 +27,7 @@
#include "gstshmsink.h" #include "gstshmsink.h"
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <string.h> #include <string.h>
@ -512,12 +513,15 @@ pollthread_func (gpointer data)
{ {
GstShmSink *self = GST_SHM_SINK (data); GstShmSink *self = GST_SHM_SINK (data);
GList *item; GList *item;
GstClockTime timeout = GST_CLOCK_TIME_NONE;
while (!self->stop) { while (!self->stop) {
if (gst_poll_wait (self->poll, GST_CLOCK_TIME_NONE) < 0) if (gst_poll_wait (self->poll, timeout) < 0)
return NULL; return NULL;
timeout = GST_CLOCK_TIME_NONE;
if (self->stop) if (self->stop)
return NULL; return NULL;
@ -561,6 +565,7 @@ pollthread_func (gpointer data)
functions on that new descriptor, so restart the loop, so _wait functions on that new descriptor, so restart the loop, so _wait
will have been called on all elements of self->poll, whether will have been called on all elements of self->poll, whether
they have just been added or not. */ they have just been added or not. */
timeout = 0;
continue; continue;
} }

View file

@ -4,8 +4,8 @@ noinst_PROGRAMS = scaletempo-demo
ERROR_CFLAGS= ERROR_CFLAGS=
scaletempo_demo_SOURCES = demo-main.c demo-player.c demo-gui.c scaletempo_demo_SOURCES = demo-main.c demo-player.c demo-gui.c
scaletempo_demo_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GTK_CFLAGS) scaletempo_demo_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
scaletempo_demo_LDFLAGS = $(GST_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GTK_LIBS) -lgstinterfaces-@GST_MAJORMINOR@ scaletempo_demo_LDFLAGS = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-@GST_MAJORMINOR@ $(GST_LIBS) $(GTK_LIBS)
noinst_HEADERS = demo-player.h demo-gui.h noinst_HEADERS = demo-player.h demo-gui.h

View file

@ -19,6 +19,7 @@
#include "config.h" #include "config.h"
#endif #endif
#include <gst/glib-compat-private.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <glib/gprintf.h> #include <glib/gprintf.h>
#include <math.h> #include <math.h>