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 = \
-DCOG_ENABLE_UNSTABLE_API \
$(GST_PLUGINS_BAD_CFLAGS) \
-I$(srcdir)/.. \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_CFLAGS) \

View file

@ -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>

View file

@ -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)

View file

@ -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"

View file

@ -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) \

View file

@ -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 \

View file

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

View file

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

View file

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

View file

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

View file

@ -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

View file

@ -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");

View file

@ -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 */

View file

@ -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);

View file

@ -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";
}
}

View file

@ -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__ */

View file

@ -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
*/

View file

@ -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)

View file

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

View file

@ -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)

View file

@ -53,6 +53,7 @@
#include <string.h>
#include <gst/glib-compat-private.h>
#include "gstmplex.hh"
#include "gstmplexoutputstream.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_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)

View file

@ -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"

View file

@ -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"

View file

@ -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);

View file

@ -7,6 +7,7 @@
#endif
#include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <gst/video/video.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,
&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,

View file

@ -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);

View file

@ -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);

View file

@ -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 *

View file

@ -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) \

View file

@ -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

View file

@ -30,6 +30,7 @@
#endif
#include <stdlib.h>
#include <gst/glib-compat-private.h>
#include <gst/interfaces/xoverlay.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",
"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

View file

@ -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

View file

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

View file

@ -28,6 +28,7 @@
*/
#include <gst/app/gstappsrc.h>
#include <gst/app/gstappsink.h>
#include <gst/glib-compat-private.h>
#include "gstcamerabinpreview.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->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 (nr, vui->num_reorder_frames);
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"
#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 <string.h>

View file

@ -127,6 +127,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
#include "gstbasevideodecoder.h"
#include "gstbasevideoutils.h"

View file

@ -105,6 +105,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
#include "gstbasevideoencoder.h"
#include "gstbasevideoutils.h"

View file

@ -52,6 +52,11 @@
#ifdef HAVE_CONFIG_H
#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
#include <string.h>
#include <math.h>

View file

@ -32,6 +32,11 @@
#ifdef HAVE_CONFIG_H
#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
#include <string.h>
#include "gstbaseaudiovisualizer.h"

View file

@ -151,11 +151,16 @@
# 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
#include <string.h>
#include <stdlib.h>
#include <gst/gst.h>
#include <gst/tag/tag.h>
#include <gst/glib-compat-private.h>
/* FIXME: include #include <gst/gst-i18n-plugin.h> and use _(" ") */
#include "gstcamerabin.h"
@ -210,9 +215,10 @@ static guint camerabin_signals[LAST_SIGNAL];
#define DEFAULT_FLAGS GST_CAMERABIN_FLAG_SOURCE_RESIZE | \
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_VIDEO_COLOR_CONVERSION
GST_CAMERABIN_FLAG_VIDEO_COLOR_CONVERSION | \
GST_CAMERABIN_FLAG_AUDIO_CONVERSION
/* Using "bilinear" as default zoom method */
#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", \
(c)->processing_counter); \
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) \
(c)->processing_counter -= 1; \
GST_DEBUG_OBJECT ((c), "Processing counter decremented to: %d", \
(c)->processing_counter); \
g_assert ((c)->processing_counter >= 0); \
if ((c)->processing_counter == 0) \
g_object_notify (G_OBJECT (c), "idle"); \
if ((c)->processing_counter == 0) { \
g_cond_signal ((c)->idle_cond); \
g_object_notify (G_OBJECT (c), "idle"); \
}
#define CAMERABIN_PROCESSING_INC(c) \
g_mutex_lock ((c)->capture_mutex); \
CAMERABIN_PROCESSING_INC_UNLOCKED ((c)); \
g_mutex_unlock ((c)->capture_mutex); \
g_mutex_unlock ((c)->capture_mutex);
#define CAMERABIN_PROCESSING_DEC(c) \
g_mutex_lock ((c)->capture_mutex); \
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
@ -933,6 +951,10 @@ camerabin_dispose_elements (GstCameraBin * camera)
g_cond_free (camera->cond);
camera->cond = NULL;
}
if (camera->idle_cond) {
g_cond_free (camera->idle_cond);
camera->idle_cond = NULL;
}
if (camera->filename) {
g_string_free (camera->filename, TRUE);
camera->filename = NULL;
@ -1607,6 +1629,9 @@ reset_video_capture_caps (GstCameraBin * camera)
/* Interrupt ongoing capture */
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);
if (state == GST_STATE_PAUSED || state == GST_STATE_PLAYING) {
GST_INFO_OBJECT (camera,
@ -3348,6 +3373,7 @@ gst_camerabin_init (GstCameraBin * camera, GstCameraBinClass * gclass)
/* concurrency control */
camera->capture_mutex = g_mutex_new ();
camera->cond = g_cond_new ();
camera->idle_cond = g_cond_new ();
camera->processing_counter = 0;
/* pad names for output and input selectors */
@ -3923,8 +3949,10 @@ gst_camerabin_change_state (GstElement * element, GstStateChange transition)
}
/* 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;
g_cond_signal (camera->idle_cond);
g_object_notify (G_OBJECT (camera), "idle");
g_mutex_unlock (camera->capture_mutex);

View file

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

View file

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

View file

@ -165,6 +165,7 @@
#include "gstcamerabin2.h"
#include <gst/gst-i18n-plugin.h>
#include <gst/pbutils/pbutils.h>
#include <gst/glib-compat-private.h>
#if GLIB_CHECK_VERSION(2,29,6)
#define gst_camerabin2_atomic_int_add g_atomic_int_add
@ -817,15 +818,13 @@ gst_camera_bin_class_init (GstCameraBin2Class * klass)
/* TODO
* 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
* 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
* show that jifmux is picked if image/jpeg is the caps of a container
* profile. So this could work.
* - 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.
*/
g_object_class_install_property (object_class, PROP_IMAGE_ENCODING_PROFILE,

View file

@ -31,6 +31,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
#include <gst/interfaces/photography.h>
#include "gstwrappercamerabinsrc.h"

View file

@ -22,6 +22,11 @@
#ifdef HAVE_CONFIG_H
#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
#include <string.h>
#include "gstcdxaparse.h"

View file

@ -40,6 +40,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
#include "gstchromahold.h"
#include <stdlib.h>

View file

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

View file

@ -32,6 +32,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
#include <gst/gst-i18n-plugin.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,
"rotate",
"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>");
}
@ -154,7 +154,7 @@ rotate_map (GstGeometricTransform * gt, gint x, gint y, gdouble * in_x,
h = gt->height;
/* 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 */
cox = 0.5 * w;

View file

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

View file

@ -41,9 +41,13 @@
# 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
#include <string.h>
#include <gst/base/gsttypefindhelper.h>
#include <gst/glib-compat-private.h>
#include "gsthlsdemux.h"
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src_%u",

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
plugin_LTLIBRARIES = libgstliveadder.la
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 = \
$(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_MAJORMINOR@ \
$(GST_BASE_LIBS) $(GST_LIBS)

View file

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

View file

@ -46,6 +46,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
#include <string.h>
#include "gstmpegdefs.h"
@ -114,8 +118,8 @@ static GstStaticPadTemplate audio_template =
GST_STATIC_PAD_TEMPLATE ("audio_%02x",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
GST_STATIC_CAPS ("audio/mpeg, "
"mpegversion = (int) { 1, 4 };"
GST_STATIC_CAPS ("audio/mpeg, mpegversion = (int) 1;"
"audio/mpeg, mpegversion = (int) 4, stream-format = (string) { adts, loas };"
"audio/x-private1-lpcm; "
"audio/x-private1-ac3;" "audio/x-private1-dts;" "audio/ac3")
);

View file

@ -125,7 +125,10 @@ enum
#define AUDIO_CAPS \
GST_STATIC_CAPS ( \
"audio/mpeg, " \
"mpegversion = (int) { 1, 4 };" \
"mpegversion = (int) 1;" \
"audio/mpeg, " \
"mpegversion = (int) 4, " \
"stream-format = (string) { adts, loas };" \
"audio/x-lpcm, " \
"width = (int) { 16, 20, 24 }, " \
"rate = (int) { 48000, 96000 }, " \
@ -396,6 +399,14 @@ gst_mpegts_demux_reset (GstMpegTSDemux * demux)
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
static void
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 */
if (!stream->pad && 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) {
@ -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
hitting decodebin2's overrun threshold (if using decodebin2) */
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 {
GST_DEBUG_OBJECT (demux,
"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",
demux->pending_pads);
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;
@ -1738,7 +1749,7 @@ gst_mpegts_stream_parse_pmt (GstMpegTSStream * stream,
GST_DEBUG_OBJECT (demux, "Done parsing PMT, pending pads now %d",
demux->pending_pads);
if (demux->pending_pads == 0)
gst_element_no_more_pads (GST_ELEMENT (demux));
gst_mpegts_demux_no_more_pads (GST_ELEMENT (demux));
return TRUE;

View file

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

View file

@ -32,6 +32,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
#include <stdlib.h>
#include <string.h>
@ -174,6 +178,7 @@ mpegts_base_class_init (MpegTSBaseClass * klass)
element_class = GST_ELEMENT_CLASS (klass);
element_class->change_state = mpegts_base_change_state;
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_template));

View file

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

View file

@ -88,6 +88,10 @@
#include <stdio.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 "mpegtsmux.h"
@ -117,7 +121,9 @@ static GstStaticPadTemplate mpegtsmux_sink_factory =
"video/x-dirac;"
"video/x-h264,stream-format=(string)byte-stream;"
"audio/mpeg, "
"mpegversion = (int) { 1, 2, 4 };"
"mpegversion = (int) { 1, 2 };"
"audio/mpeg, "
"mpegversion = (int) 4, stream-format = (string) { raw, adts };"
"audio/x-lpcm, "
"width = (int) { 16, 20, 24 }, "
"rate = (int) { 48000, 96000 }, "
@ -659,27 +665,6 @@ mpegtsmux_choose_best_stream (MpegTsMux * mux)
#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
mpegtsmux_sink_event (GstPad * pad, GstEvent * event)
{
@ -688,7 +673,7 @@ mpegtsmux_sink_event (GstPad * pad, GstEvent * event)
gboolean res = 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)) {
case GST_EVENT_CUSTOM_DOWNSTREAM:

View file

@ -1,6 +1,6 @@
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_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
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 <gst/gst.h>
#include <gst/glib-compat-private.h>
#include "gstmvemux.h"
#include "mve.h"

View file

@ -54,6 +54,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
#include "mxfdemux.h"
#include "mxfessence.h"

View file

@ -29,6 +29,10 @@
#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/base/gstbasetransform.h>
#include <gst/base/gstadapter.h>

View file

@ -47,6 +47,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
#include "gstsdpdemux.h"
#include <gst/rtp/gstrtppayloads.h>

View file

@ -19,6 +19,10 @@
* 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 <math.h>

View file

@ -176,15 +176,12 @@ gst_h264_parse_reset_frame (GstH264Parse * h264parse)
GST_DEBUG_OBJECT (h264parse, "reset frame");
/* done parsing; reset state */
h264parse->nalu.valid = FALSE;
h264parse->nalu.offset = 0;
h264parse->nalu.sc_offset = 0;
h264parse->nalu.size = 0;
h264parse->current_off = 0;
h264parse->current_off = -1;
h264parse->picture_start = FALSE;
h264parse->update_caps = FALSE;
h264parse->idr_pos = -1;
h264parse->sei_pos = -1;
h264parse->keyframe = FALSE;
h264parse->frame_start = FALSE;
gst_adapter_clear (h264parse->frame_out);
@ -291,6 +288,9 @@ gst_h264_parse_get_string (GstH264Parse * parse, gboolean format, gint code)
static void
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)
*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 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));
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 (gst_caps_can_intersect (in_caps, caps)) {
GST_DEBUG_OBJECT (h264parse, "downstream accepts upstream caps");
@ -343,6 +354,8 @@ gst_h264_parse_negotiate (GstH264Parse * h264parse, GstCaps * in_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_caps_unref (caps);
}
@ -504,6 +517,15 @@ gst_h264_parse_process_nal (GstH264Parse * h264parse, GstH264NalUnit * nalu)
GST_TIME_ARGS (h264parse->ts_trn_nb));
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;
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",
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;
default:
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;
GstH264NalUnit nnalu;
if (h264parse->align == GST_H264_PARSE_ALIGN_NAL) {
return TRUE;
}
GST_DEBUG_OBJECT (h264parse, "parsing collected nal");
parse_res = gst_h264_parser_identify_nalu (h264parse->nalparser, data,
nalu->offset + nalu->size, size, &nnalu);
@ -631,9 +655,10 @@ gst_h264_parse_check_valid_frame (GstBaseParse * parse,
guint8 *data;
gsize size;
guint current_off = 0;
gboolean drain;
gboolean drain, nonext;
GstH264NalParser *nalparser = h264parse->nalparser;
GstH264NalUnit nalu;
GstH264ParserResult pres;
gst_buffer_map (buffer, &map, GST_MAP_READ);
data = map.data;
@ -658,15 +683,39 @@ gst_h264_parse_check_valid_frame (GstBaseParse * parse,
GST_LOG_OBJECT (h264parse, "resuming frame parsing");
}
drain = FALSE;
nalu = h264parse->nalu;
drain = GST_BASE_PARSE_DRAINING (parse);
nonext = FALSE;
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) {
GstH264ParserResult pres;
if (h264parse->packetized)
if (h264parse->packetized_chunked)
pres =
gst_h264_parser_identify_nalu_unchecked (nalparser, data, current_off,
size, &nalu);
@ -677,131 +726,121 @@ gst_h264_parse_check_valid_frame (GstBaseParse * parse,
switch (pres) {
case GST_H264_PARSER_OK:
GST_DEBUG_OBJECT (h264parse, "complete nal found. "
"current offset: %u, Nal offset: %u, Nal Size: %u",
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;
}
}
GST_DEBUG_OBJECT (h264parse, "complete nal (offset, size): (%u, %u) ",
nalu.offset, nalu.size);
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:
GST_DEBUG_OBJECT (h264parse, "not a complete nal found at offset %u",
nalu.offset);
current_off = nalu.sc_offset;
/* We keep the reference to this nal so we start over the parsing
* 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 */
/* if draining, accept it as complete nal */
if (drain) {
nonext = TRUE;
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;
}
/* otherwise need 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",
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);
/* if no next nal, we know it's complete here */
if (drain || gst_h264_parse_collect_nal (h264parse, data, size, &nalu))
if (nonext)
break;
/* In packetized mode we know there's only on NALU in each input packet */
if (h264parse->packetized)
/* In packetized mode we know there's only on NALU in each input packet,
* 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;
GST_DEBUG_OBJECT (h264parse, "Looking for more");
current_off = nalu.offset + nalu.size;
}
end:
*skipsize = h264parse->nalu.sc_offset;
*framesize = nalu.offset + nalu.size - h264parse->nalu.sc_offset;
h264parse->current_off = current_off;
*framesize = nalu.offset + nalu.size;
gst_buffer_unmap (buffer, &map);
return TRUE;
parsing_error:
GST_DEBUG_OBJECT (h264parse, "error parsing Nal Unit");
more:
/* ask for best next available */
*framesize = G_MAXUINT;
if (!h264parse->nalu.size) {
/* 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;
}
*skipsize = 0;
/* Restart parsing from here next time */
h264parse->current_off = current_off;
if (current_off > 0)
h264parse->current_off = current_off;
/* Fall-through. */
out:
gst_buffer_unmap (buffer, &map);
return FALSE;
invalid:
skip:
GST_DEBUG_OBJECT (h264parse, "skipping %d", *skipsize);
gst_h264_parse_reset_frame (h264parse);
goto out;
}
@ -1873,7 +1912,17 @@ gst_h264_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
nalu.data + nalu.offset, nalu.size);
/* at least this should make sense */
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);
} else {
/* pass-through: no looking for frames (and nal processing),

View file

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

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

View file

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

View file

@ -35,7 +35,12 @@
#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
#include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include "gstdecklink.h"
#include "gstdecklinksrc.h"
#include "capture.h"

View file

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

View file

@ -5,9 +5,9 @@ include $(top_srcdir)/common/glib-gen.mak
plugin_LTLIBRARIES = libgstshm.la
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_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
noinst_HEADERS = gstshmsrc.h gstshmsink.h shmpipe.h shmalloc.h

View file

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

View file

@ -4,8 +4,8 @@ noinst_PROGRAMS = scaletempo-demo
ERROR_CFLAGS=
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_LDFLAGS = $(GST_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GTK_LIBS) -lgstinterfaces-@GST_MAJORMINOR@
scaletempo_demo_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
scaletempo_demo_LDFLAGS = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-@GST_MAJORMINOR@ $(GST_LIBS) $(GTK_LIBS)
noinst_HEADERS = demo-player.h demo-gui.h

View file

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