Commit 225e98d6 authored by Wim Taymans's avatar Wim Taymans
Browse files

Merge branch 'master' into 0.11

Conflicts:
	ext/flac/gstflacenc.c
	ext/jack/gstjackaudioclient.c
	ext/jack/gstjackaudiosink.c
	ext/jack/gstjackaudiosrc.c
	ext/pulse/plugin.c
	ext/shout2/gstshout2.c
	gst/matroska/matroska-mux.c
	gst/rtp/gstrtph264pay.c
parents 8eca20ea 5b25f373
......@@ -36,8 +36,8 @@ libgstcairo_la_CFLAGS = \
$(GST_BASE_CFLAGS) \
$(GST_CFLAGS) $(CAIRO_CFLAGS) $(CAIRO_GOBJECT_CFLAGS)
libgstcairo_la_LIBADD = \
$(GST_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \
$(GST_LIBS) $(CAIRO_LIBS) $(CAIRO_GOBJECT_LIBS) $(LIBM)
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \
$(GST_BASE_LIBS) $(GST_LIBS) $(CAIRO_LIBS) $(CAIRO_GOBJECT_LIBS) $(LIBM)
libgstcairo_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstcairo_la_LIBTOOLFLAGS = --tag=disable-static
......
......@@ -839,7 +839,6 @@ gst_flac_enc_seek_callback (const FLAC__StreamEncoder * encoder,
FLAC__uint64 absolute_byte_offset, void *client_data)
{
GstFlacEnc *flacenc;
GstEvent *event;
GstPad *peerpad;
GstSegment seg;
......@@ -848,15 +847,17 @@ gst_flac_enc_seek_callback (const FLAC__StreamEncoder * encoder,
if (flacenc->stopped)
return FLAC__STREAM_ENCODER_SEEK_STATUS_OK;
gst_segment_init (&seg, GST_FORMAT_BYTES);
seg.start = absolute_byte_offset;
seg.stop = GST_BUFFER_OFFSET_NONE;
seg.time = 0;
event = gst_event_new_segment (&seg);
if ((peerpad = gst_pad_get_peer (GST_AUDIO_ENCODER_SRC_PAD (flacenc)))) {
gboolean ret = gst_pad_send_event (peerpad, event);
GstEvent *event;
gboolean ret;
gst_segment_init (&seg, GST_FORMAT_BYTES);
seg.start = absolute_byte_offset;
seg.stop = GST_BUFFER_OFFSET_NONE;
seg.time = 0;
event = gst_event_new_segment (&seg);
ret = gst_pad_send_event (peerpad, event);
gst_object_unref (peerpad);
if (ret) {
......
......@@ -22,6 +22,7 @@
#include <string.h>
#include "gstjackaudioclient.h"
#include "gstjack.h"
#include <gst/glib-compat-private.h>
......@@ -77,14 +78,29 @@ struct _GstJackAudioClient
gpointer user_data;
};
typedef jack_default_audio_sample_t sample_t;
typedef struct
{
jack_nframes_t nframes;
gpointer user_data;
} JackCB;
static gboolean
jack_handle_transport_change (GstJackAudioClient * client, GstState state)
{
GstObject *obj = GST_OBJECT_PARENT (client->user_data);
GstJackTransport mode;
g_object_get (obj, "transport", &mode, NULL);
if ((mode == GST_JACK_TRANSPORT_SLAVE) && (GST_STATE (obj) != state)) {
GST_INFO_OBJECT (obj, "requesting state change: %s",
gst_element_state_get_name (state));
gst_element_post_message (GST_ELEMENT (obj),
gst_message_new_request_state (obj, state));
return TRUE;
}
return FALSE;
}
static int
jack_process_cb (jack_nframes_t nframes, void *arg)
{
......@@ -111,6 +127,8 @@ jack_process_cb (jack_nframes_t nframes, void *arg)
default:
break;
}
GST_DEBUG ("num of clients: src=%d, sink=%d",
g_list_length (conn->src_clients), g_list_length (conn->sink_clients));
}
g_mutex_lock (&conn->lock);
......@@ -141,7 +159,29 @@ jack_process_cb (jack_nframes_t nframes, void *arg)
}
}
}
/* handle transport state requisition, do sinks first, stop after the first
* element that handled it */
if (conn->transport_state != GST_STATE_VOID_PENDING) {
for (walk = conn->sink_clients; walk; walk = g_list_next (walk)) {
if (jack_handle_transport_change ((GstJackAudioClient *) walk->data,
conn->transport_state)) {
conn->transport_state = GST_STATE_VOID_PENDING;
break;
}
}
}
if (conn->transport_state != GST_STATE_VOID_PENDING) {
for (walk = conn->src_clients; walk; walk = g_list_next (walk)) {
if (jack_handle_transport_change ((GstJackAudioClient *) walk->data,
conn->transport_state)) {
conn->transport_state = GST_STATE_VOID_PENDING;
break;
}
}
}
g_mutex_unlock (&conn->lock);
return res;
}
......@@ -259,6 +299,7 @@ gst_jack_audio_make_connection (const gchar * id, const gchar * server,
jack_on_shutdown (jclient, jack_shutdown_cb, conn);
/* all callbacks are set, activate the client */
GST_INFO ("activate jack_client %p", jclient);
if ((res = jack_activate (jclient)))
goto could_not_activate;
......@@ -353,6 +394,7 @@ gst_jack_audio_unref_connection (GstJackAudioConnection * conn)
* waiting for the JACK thread, and can thus cause deadlock in
* jack_process_cb()
*/
GST_INFO ("deactivate jack_client %p", conn->client);
if ((res = jack_deactivate (conn->client))) {
/* we only warn, this means the server is probably shut down and the client
* is gone anyway. */
......
......@@ -197,18 +197,6 @@ jack_process_cb (jack_nframes_t nframes, void *arg)
channels = GST_AUDIO_INFO_CHANNELS (&buf->spec.info);
/* handle transport state requisitions */
if (sink->transport == GST_JACK_TRANSPORT_SLAVE) {
GstState state = gst_jack_audio_client_get_transport_state (sink->client);
if ((state != GST_STATE_VOID_PENDING) && (GST_STATE (sink) != state)) {
GST_DEBUG_OBJECT (sink, "requesting state change: %s",
gst_element_state_get_name (state));
gst_element_post_message (GST_ELEMENT (sink),
gst_message_new_request_state (GST_OBJECT (sink), state));
}
}
/* get target buffers */
for (i = 0; i < channels; i++) {
sink->buffers[i] =
......
......@@ -217,18 +217,6 @@ jack_process_cb (jack_nframes_t nframes, void *arg)
channels = GST_AUDIO_INFO_CHANNELS (&buf->spec.info);
/* handle transport state requisitions */
if (src->transport == GST_JACK_TRANSPORT_SLAVE) {
GstState state = gst_jack_audio_client_get_transport_state (src->client);
if ((state != GST_STATE_VOID_PENDING) && (GST_STATE (src) != state)) {
GST_DEBUG_OBJECT (src, "requesting state change: %s",
gst_element_state_get_name (state));
gst_element_post_message (GST_ELEMENT (src),
gst_message_new_request_state (GST_OBJECT (src), state));
}
}
/* get input buffers */
for (i = 0; i < channels; i++)
src->buffers[i] =
......
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
* Copyright (C) <2006> Tim-Philipp Müller <tim centricular net>
* Copyright (C) <2012> Ralph Giles <giles@mozilla.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -70,12 +71,17 @@ enum
static GstElementClass *parent_class = NULL;
#ifdef SHOUT_FORMAT_WEBM
#define WEBM_CAPS "; video/webm"
#else
#define WEBM_CAPS ""
#endif
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("application/ogg; "
"audio/mpeg, mpegversion = (int) 1, layer = (int) [ 1, 3 ]")
);
"audio/mpeg, mpegversion = (int) 1, layer = (int) [ 1, 3 ]" WEBM_CAPS));
static void gst_shout2send_class_init (GstShout2sendClass * klass);
static void gst_shout2send_base_init (GstShout2sendClass * klass);
static void gst_shout2send_init (GstShout2send * shout2send);
......@@ -162,6 +168,7 @@ gst_shout2send_base_init (GstShout2sendClass * klass)
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_template));
gst_element_class_set_details_simple (element_class, "Icecast network sink",
"Sink/Network", "Sends data to an icecast server",
"Wim Taymans <wim.taymans@chello.be>, "
......@@ -538,9 +545,14 @@ set_failed:
static gboolean
gst_shout2send_connect (GstShout2send * sink)
{
GST_DEBUG_OBJECT (sink, "Connection format is: %s",
const char *format =
(sink->audio_format == SHOUT_FORMAT_VORBIS) ? "vorbis" :
((sink->audio_format == SHOUT_FORMAT_MP3) ? "mp3" : "unknown"));
((sink->audio_format == SHOUT_FORMAT_MP3) ? "mp3" : "unknown");
#ifdef SHOUT_FORMAT_WEBM
if (sink->audio_format == SHOUT_FORMAT_WEBM)
format = "webm";
#endif
GST_DEBUG_OBJECT (sink, "Connection format is: %s", format);
if (shout_set_format (sink->conn, sink->audio_format) != SHOUTERR_SUCCESS)
goto could_not_set_format;
......@@ -810,6 +822,10 @@ gst_shout2send_setcaps (GstPad * pad, GstCaps * caps)
shout2send->audio_format = SHOUT_FORMAT_MP3;
} else if (!strcmp (mimetype, "application/ogg")) {
shout2send->audio_format = SHOUT_FORMAT_VORBIS;
#ifdef SHOUT_FORMAT_WEBM
} else if (!strcmp (mimetype, "video/webm")) {
shout2send->audio_format = SHOUT_FORMAT_WEBM;
#endif
} else {
ret = FALSE;
}
......
......@@ -63,7 +63,7 @@ static GstStaticPadTemplate audio_src_template =
GST_STATIC_CAPS
("audio/x-adpcm, layout = (string) swf, channels = (int) { 1, 2 }, rate = (int) { 5512, 11025, 22050, 44100 }; "
"audio/mpeg, mpegversion = (int) 1, layer = (int) 3, channels = (int) { 1, 2 }, rate = (int) { 5512, 8000, 11025, 22050, 44100 }, parsed = (boolean) TRUE; "
"audio/mpeg, mpegversion = (int) 4, framed = (boolean) TRUE; "
"audio/mpeg, mpegversion = (int) 4, stream-format = (string) raw, framed = (boolean) TRUE; "
"audio/x-nellymoser, channels = (int) { 1, 2 }, rate = (int) { 5512, 8000, 11025, 16000, 22050, 44100 }; "
"audio/x-raw, format = (string) { U8, S16LE }, layout = (string) interleaved, channels = (int) { 1, 2 }, rate = (int) { 5512, 11025, 22050, 44100 }; "
"audio/x-alaw, channels = (int) { 1, 2 }, rate = (int) { 5512, 11025, 22050, 44100 }; "
......
......@@ -76,7 +76,8 @@ static GstStaticPadTemplate audiosink_templ = GST_STATIC_PAD_TEMPLATE ("audio",
GST_STATIC_CAPS
("audio/x-adpcm, layout = (string) swf, channels = (int) { 1, 2 }, rate = (int) { 5512, 11025, 22050, 44100 }; "
"audio/mpeg, mpegversion = (int) 1, layer = (int) 3, channels = (int) { 1, 2 }, rate = (int) { 5512, 8000, 11025, 22050, 44100 }, parsed = (boolean) TRUE; "
"audio/mpeg, mpegversion = (int) { 2, 4 }, framed = (boolean) TRUE; "
"audio/mpeg, mpegversion = (int) 2, framed = (boolean) TRUE; "
"audio/mpeg, mpegversion = (int) 4, stream-format = (string) raw, framed = (boolean) TRUE; "
"audio/x-nellymoser, channels = (int) { 1, 2 }, rate = (int) { 5512, 8000, 11025, 16000, 22050, 44100 }; "
"audio/x-raw, format = (string) { U8, S16LE}, layout = (string) interleaved, channels = (int) { 1, 2 }, rate = (int) { 5512, 11025, 22050, 44100 }; "
"audio/x-alaw, channels = (int) { 1, 2 }, rate = (int) { 5512, 11025, 22050, 44100 }; "
......
......@@ -3549,10 +3549,12 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
demux->common.segment.duration =
last_stop_end - demux->stream_start_time;
GST_OBJECT_UNLOCK (demux);
gst_element_post_message (GST_ELEMENT_CAST (demux),
gst_message_new_duration (GST_OBJECT_CAST (demux),
GST_FORMAT_TIME, GST_CLOCK_TIME_NONE));
demux->invalid_duration = TRUE;
if (!demux->invalid_duration) {
gst_element_post_message (GST_ELEMENT_CAST (demux),
gst_message_new_duration (GST_OBJECT_CAST (demux),
GST_FORMAT_TIME, GST_CLOCK_TIME_NONE));
demux->invalid_duration = TRUE;
}
} else {
GST_OBJECT_UNLOCK (demux);
}
......
......@@ -1955,7 +1955,6 @@ gst_matroska_mux_subtitle_pad_setcaps (GstPad * pad, GstCaps * caps)
GstStructure *structure;
const GValue *value = NULL;
GstBuffer *buf = NULL;
gchar *id = NULL;
gboolean ret = TRUE;
mux = GST_MATROSKA_MUX (GST_PAD_PARENT (pad));
......@@ -1971,9 +1970,6 @@ gst_matroska_mux_subtitle_pad_setcaps (GstPad * pad, GstCaps * caps)
structure = gst_caps_get_structure (caps, 0);
mimetype = gst_structure_get_name (structure);
/* keep track of default set in request_pad */
id = context->codec_id;
/* general setup */
scontext->check_utf8 = 1;
scontext->invalid_utf8 = 0;
......@@ -2007,7 +2003,6 @@ gst_matroska_mux_subtitle_pad_setcaps (GstPad * pad, GstCaps * caps)
gst_matroska_mux_set_codec_id (context,
GST_MATROSKA_CODEC_ID_SUBTITLE_VOBSUB);
} else {
id = NULL;
ret = FALSE;
goto exit;
}
......@@ -2043,9 +2038,6 @@ gst_matroska_mux_subtitle_pad_setcaps (GstPad * pad, GstCaps * caps)
GST_STR_NULL (context->codec_id), context->codec_priv_size);
exit:
/* free default if modified */
if (id)
g_free (id);
return ret;
}
......
......@@ -46,10 +46,13 @@ enum
static const guint8 sync_bytes[] = { 0, 0, 0, 1 };
static GstStaticPadTemplate gst_rtp_h264_depay_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-h264")
GST_STATIC_CAPS ("video/x-h264, "
"stream-format = (string) avc, alignment = (string) au; "
"video/x-h264, "
"stream-format = (string) byte-stream, alignment = (string) { nal, au }")
);
static GstStaticPadTemplate gst_rtp_h264_depay_sink_template =
......@@ -735,8 +738,9 @@ gst_rtp_h264_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
*/
nalu_size = (payload[0] << 8) | payload[1];
if (nalu_size > payload_len)
nalu_size = payload_len;
/* dont include nalu_size */
if (nalu_size > (payload_len - 2))
nalu_size = payload_len - 2;
outsize = nalu_size + sizeof (sync_bytes);
outbuf = gst_buffer_new_and_alloc (outsize);
......
......@@ -45,10 +45,13 @@ GST_DEBUG_CATEGORY_STATIC (rtph264pay_debug);
*/
static GstStaticPadTemplate gst_rtp_h264_pay_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-h264")
GST_STATIC_CAPS ("video/x-h264, "
"stream-format = (string) byte-stream, alignment = (string) { nal, au };"
"video/x-h264, "
"stream-format = (string) avc, alignment = (string) au")
);
static GstStaticPadTemplate gst_rtp_h264_pay_src_template =
......@@ -267,98 +270,110 @@ static GstCaps *
gst_rtp_h264_pay_getcaps (GstRTPBasePayload * payload, GstPad * pad,
GstCaps * filter)
{
GstCaps *template_caps;
GstCaps *allowed_caps;
GstCaps *caps, *icaps;
guint i;
allowed_caps =
gst_pad_peer_query_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), filter);
if (allowed_caps) {
GstCaps *caps = NULL;
guint i;
if (allowed_caps == NULL)
return NULL;
if (gst_caps_is_any (allowed_caps)) {
gst_caps_unref (allowed_caps);
goto any;
}
template_caps =
gst_static_pad_template_get_caps (&gst_rtp_h264_pay_sink_template);
if (gst_caps_is_empty (allowed_caps))
return allowed_caps;
if (gst_caps_is_any (allowed_caps)) {
caps = gst_caps_ref (template_caps);
goto done;
}
caps = gst_caps_new_empty ();
if (gst_caps_is_empty (allowed_caps)) {
caps = gst_caps_ref (allowed_caps);
goto done;
}
for (i = 0; i < gst_caps_get_size (allowed_caps); i++) {
GstStructure *s = gst_caps_get_structure (allowed_caps, i);
GstStructure *new_s = gst_structure_new_empty ("video/x-h264");
const gchar *profile_level_id;
caps = gst_caps_new_empty ();
profile_level_id = gst_structure_get_string (s, "profile-level-id");
for (i = 0; i < gst_caps_get_size (allowed_caps); i++) {
GstStructure *s = gst_caps_get_structure (allowed_caps, i);
GstStructure *new_s = gst_structure_new_empty ("video/x-h264");
const gchar *profile_level_id;
if (profile_level_id && strlen (profile_level_id) == 6) {
const gchar *profile;
const gchar *level;
long int spsint;
guint8 sps[3];
profile_level_id = gst_structure_get_string (s, "profile-level-id");
spsint = strtol (profile_level_id, NULL, 16);
sps[0] = spsint >> 16;
sps[1] = spsint >> 8;
sps[2] = spsint;
if (profile_level_id && strlen (profile_level_id) == 6) {
const gchar *profile;
const gchar *level;
long int spsint;
guint8 sps[3];
profile = gst_codec_utils_h264_get_profile (sps, 3);
level = gst_codec_utils_h264_get_level (sps, 3);
spsint = strtol (profile_level_id, NULL, 16);
sps[0] = spsint >> 16;
sps[1] = spsint >> 8;
sps[2] = spsint;
if (profile && level) {
GST_LOG_OBJECT (payload, "In caps, have profile %s and level %s",
profile, level);
profile = gst_codec_utils_h264_get_profile (sps, 3);
level = gst_codec_utils_h264_get_level (sps, 3);
if (!strcmp (profile, "constrained-baseline"))
gst_structure_set (new_s, "profile", G_TYPE_STRING, profile, NULL);
else {
GValue val = { 0, };
GValue profiles = { 0, };
if (profile && level) {
GST_LOG_OBJECT (payload, "In caps, have profile %s and level %s",
profile, level);
g_value_init (&profiles, GST_TYPE_LIST);
g_value_init (&val, G_TYPE_STRING);
if (!strcmp (profile, "constrained-baseline"))
gst_structure_set (new_s, "profile", G_TYPE_STRING, profile, NULL);
else {
GValue val = { 0, };
GValue profiles = { 0, };
g_value_set_static_string (&val, profile);
gst_value_list_append_value (&profiles, &val);
g_value_init (&profiles, GST_TYPE_LIST);
g_value_init (&val, G_TYPE_STRING);
g_value_set_static_string (&val, "constrained-baseline");
gst_value_list_append_value (&profiles, &val);
g_value_set_static_string (&val, profile);
gst_value_list_append_value (&profiles, &val);
gst_structure_take_value (new_s, "profile", &profiles);
}
g_value_set_static_string (&val, "constrained-baseline");
gst_value_list_append_value (&profiles, &val);
if (!strcmp (level, "1"))
gst_structure_set (new_s, "level", G_TYPE_STRING, level, NULL);
else {
GValue levels = { 0, };
GValue val = { 0, };
int j;
g_value_init (&levels, GST_TYPE_LIST);
g_value_init (&val, G_TYPE_STRING);
for (j = 0; all_levels[j]; j++) {
g_value_set_static_string (&val, all_levels[j]);
gst_value_list_prepend_value (&levels, &val);
if (!strcmp (level, all_levels[j]))
break;
}
gst_structure_take_value (new_s, "level", &levels);
gst_structure_take_value (new_s, "profile", &profiles);
}
if (!strcmp (level, "1"))
gst_structure_set (new_s, "level", G_TYPE_STRING, level, NULL);
else {
GValue levels = { 0, };
GValue val = { 0, };
int j;
g_value_init (&levels, GST_TYPE_LIST);
g_value_init (&val, G_TYPE_STRING);
for (j = 0; all_levels[j]; j++) {
g_value_set_static_string (&val, all_levels[j]);
gst_value_list_prepend_value (&levels, &val);
if (!strcmp (level, all_levels[j]))
break;
}
gst_structure_take_value (new_s, "level", &levels);
}
}
gst_caps_merge_structure (caps, new_s);
}
gst_caps_unref (allowed_caps);
return caps;
gst_caps_merge_structure (caps, new_s);
}
any:
return gst_caps_new_empty_simple ("video/x-h264");
icaps = gst_caps_intersect (caps, template_caps);
gst_caps_unref (caps);
caps = icaps;
done:
gst_caps_unref (template_caps);
gst_caps_unref (allowed_caps);
GST_LOG_OBJECT (payload, "returning caps %" GST_PTR_FORMAT, caps);
return caps;
}
/* take the currently configured SPS and PPS lists and set them on the caps as
......
......@@ -124,6 +124,8 @@ gst_rtp_mp2t_pay_flush (GstRTPMP2TPay * rtpmp2tpay)
GstRTPBuffer rtp = { NULL };
avail = gst_adapter_available (rtpmp2tpay->adapter);
if (avail == 0)
return GST_FLOW_OK;
outbuf = gst_rtp_buffer_new_allocate (avail, 0, 0);
/* get payload */
......
......@@ -1901,7 +1901,7 @@ gst_rtp_bin_init (GstRtpBin * rtpbin)
rtpbin->use_pipeline_clock = DEFAULT_USE_PIPELINE_CLOCK;
/* some default SDES entries */
cname = g_strdup_printf ("user%u@x-%u.net", g_random_int (), g_random_int ());
cname = g_strdup_printf ("user%u@host-%x", g_random_int (), g_random_int ());
rtpbin->sdes = gst_structure_new ("application/x-rtp-source-sdes",
"cname", G_TYPE_STRING, cname, "tool", G_TYPE_STRING, "GStreamer", NULL);
g_free (cname);
......
......@@ -488,7 +488,7 @@ rtp_session_init (RTPSession * sess)
/* some default SDES entries */
/* we do not want to leak details like the username or hostname here */
str = g_strdup_printf ("user%u@x-%u.net", g_random_int (), g_random_int ());
str = g_strdup_printf ("user%u@host-%x", g_random_int (), g_random_int ());
rtp_source_set_sdes_string (sess->source, GST_RTCP_SDES_CNAME, str);
g_free (str);
......
......@@ -240,7 +240,7 @@ gst_multiudpsink_class_init (GstMultiUDPSinkClass * klass)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BYTES_SERVED,
g_param_spec_uint64 ("bytes-served", "Bytes served",
"Total number of bytes send to all clients", 0, G_MAXUINT64, 0,
"Total number of bytes sent to all clients", 0, G_MAXUINT64, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_SOCKET,
g_param_spec_object ("socket", "Socket Handle",
......
......@@ -3270,8 +3270,8 @@ static void
gst_video_box_process (GstVideoBox * video_box, const guint8 * src,
guint8 * dest)
{
guint b_alpha = CLAMP (video_box->border_alpha * 256, 0, 256);
guint i_alpha = CLAMP (video_box->alpha * 256, 0, 256);
guint b_alpha = CLAMP (video_box->border_alpha * 256, 0, 255);
guint i_alpha = CLAMP (video_box->alpha * 256, 0, 255);
GstVideoBoxFill fill_type = video_box->fill_type;
gint br, bl, bt, bb, crop_w, crop_h;
......
......@@ -41,8 +41,6 @@ GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS (SRC_CAPS_TMPL)
);
const gchar *factory = "aacparse";
/* some data */
static guint8 mp3_frame[384] = {
0xff, 0xfb, 0x94, 0xc4, 0xff, 0x83, 0xc0, 0x00,
......
......@@ -31,13 +31,11 @@
typedef struct
{
GstElement *pipeline;
GstElement *fdsrc;
GstElement *capsfilter;
GstElement *appsrc;
GstElement *rtppay;
GstElement *rtpdepay;
GstElement *fakesink;
int fd[2];
const char *frame_data;
const guint8 *frame_data;
int frame_data_size;
int frame_count;
} rtp_pipeline;
......@@ -134,13 +132,11 @@ rtp_bus_callback (GstBus * bus, GstMessage * message, gpointer data)
* The user must free the RTP pipeline when it's not used anymore.
*/
static rtp_pipeline *
rtp_pipeline_create (const char *frame_data, int frame_data_size,