pad = gst_ogg_demux_find_pad (ogg, serialno);
} else {
GstClockTime chain_time;
- GstOggChain *current_chain;
gint64 current_time;
/* this can only happen in push mode */
if (ogg->pullmode)
goto unknown_chain;
- current_chain = ogg->current_chain;
current_time = ogg->segment.last_stop;
/* time of new chain is current time */
{
GstOggMux *ogg_mux = GST_OGG_MUX (gst_pad_get_parent (pad));
GstOggPadData *ogg_pad = (GstOggPadData *) gst_pad_get_element_private (pad);
- gboolean ret;
+ gboolean ret = FALSE;
- GST_DEBUG ("Got %s event on pad %s:%s", GST_EVENT_TYPE_NAME (event),
- GST_DEBUG_PAD_NAME (pad));
+ GST_DEBUG_OBJECT (pad, "Got %s event", GST_EVENT_TYPE_NAME (event));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_NEWSEGMENT:{
/* We don't support non time NEWSEGMENT events */
if (format != GST_FORMAT_TIME) {
gst_event_unref (event);
- return FALSE;
+ event = NULL;
+ break;
}
+
gst_segment_set_newsegment_full (&ogg_pad->segment, update, rate,
applied_rate, format, start, stop, position);
break;
}
default:
- ret = TRUE;
break;
}
/* now GstCollectPads can take care of the rest, e.g. EOS */
- if (ret)
+ if (event != NULL)
ret = ogg_pad->collect_event (pad, event);
gst_object_unref (ogg_mux);
GST_DEBUG_OBJECT (data->pad, "EOS on pad");
if (!pad->eos) {
ogg_page page;
- GstFlowReturn ret;
/* it's no longer active */
ogg_mux->active_pads--;
while (ogg_stream_flush (&pad->map.stream, &page)) {
/* Place page into the per-pad queue */
- ret = gst_ogg_mux_pad_queue_page (ogg_mux, pad, &page,
- pad->first_delta);
+ gst_ogg_mux_pad_queue_page (ogg_mux, pad, &page, pad->first_delta);
/* increment the page number counter */
pad->pageno++;
/* mark other pages as delta */
static gboolean
is_keyframe_dirac (GstOggStream * pad, gint64 granulepos)
{
- gint64 pt;
int dist_h;
int dist_l;
int dist;
- int delay;
- gint64 dt;
if (granulepos == -1)
return -1;
- pt = ((granulepos >> 22) + (granulepos & OGG_DIRAC_GRANULE_LOW_MASK)) >> 9;
dist_h = (granulepos >> 22) & 0xff;
dist_l = granulepos & 0xff;
dist = (dist_h << 8) | dist_l;
- delay = (granulepos >> 9) & 0x1fff;
- dt = pt - delay;
return (dist == 0);
}
granulepos_to_granule_dirac (GstOggStream * pad, gint64 gp)
{
gint64 pt;
- int dist_h;
- int dist_l;
- int dist;
int delay;
gint64 dt;
pt = ((gp >> 22) + (gp & OGG_DIRAC_GRANULE_LOW_MASK)) >> 9;
- dist_h = (gp >> 22) & 0xff;
- dist_l = gp & 0xff;
- dist = (dist_h << 8) | dist_l;
delay = (gp >> 9) & 0x1fff;
dt = pt - delay;
const GList *tmp;
guint i;
const gchar *profname, *profdesc, *profpreset, *proftype;
- const GstCaps *profformat, *profrestriction;
+ const GstCaps *profformat;
profname = gst_encoding_profile_get_name (prof);
profdesc = gst_encoding_profile_get_description (prof);
profformat = gst_encoding_profile_get_format (prof);
profpreset = gst_encoding_profile_get_preset (prof);
proftype = gst_encoding_profile_get_type_nick (prof);
- profrestriction = gst_encoding_profile_get_restriction (prof);
profgroupname = g_strdup_printf ("profile-%s", profname);
g_key_file_set_string (out, profgroupname, "name", profname);
- g_key_file_set_value (out, profgroupname, "type",
- gst_encoding_profile_get_type_nick (prof));
+ g_key_file_set_value (out, profgroupname, "type", proftype);
if (profdesc) {
gchar *locale;
{
gchar *filename;
gchar *lfilename;
- gboolean res;
g_return_val_if_fail (GST_IS_ENCODING_TARGET (target), FALSE);
g_return_val_if_fail (target->category != NULL, FALSE);
GST_ENCODING_TARGET_DIRECTORY, target->category, lfilename, NULL);
g_free (lfilename);
- res = gst_encoding_target_save_to_file (target, filename, error);
+ gst_encoding_target_save_to_file (target, filename, error);
g_free (filename);
return TRUE;
}
static gboolean
+check_range (const gchar * str, gchar ** tmp, gint * range)
+{
+ glong range_val;
+
+ range_val = strtol (str, tmp, 10);
+ if (range_val >= G_MININT && range_val <= G_MAXINT) {
+ *range = range_val;
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+static gboolean
parse_range (const gchar * str, GstRTSPRange * range)
{
gchar *minus;
if (g_ascii_isspace (minus[1]) || minus[1] == '+' || minus[1] == '-')
goto invalid_range;
- range->min = strtol (str, &tmp, 10);
- if (str == tmp || tmp != minus)
+ if (!check_range (str, &tmp, &range->min) || str == tmp || tmp != minus)
goto invalid_range;
- range->max = strtol (minus + 1, &tmp, 10);
- if (*tmp && *tmp != ';')
+ if (!check_range (minus + 1, &tmp, &range->max) || (*tmp && *tmp != ';'))
goto invalid_range;
} else {
- range->min = strtol (str, &tmp, 10);
- if (str == tmp || (*tmp && *tmp != ';'))
+ if (!check_range (str, &tmp, &range->min) || str == tmp ||
+ (*tmp && *tmp != ';'))
goto invalid_range;
range->max = -1;
#define EXIF_TAG_DATE_TIME_DIGITIZED 0x9004
#define EXIF_TAG_SHUTTER_SPEED_VALUE 0x9201
#define EXIF_TAG_APERTURE_VALUE 0x9202
+#define EXIF_TAG_EXPOSURE_BIAS 0x9204
#define EXIF_TAG_METERING_MODE 0x9207
#define EXIF_TAG_FLASH 0x9209
#define EXIF_TAG_FOCAL_LENGTH 0x920A
{GST_TAG_CAPTURING_FOCAL_RATIO, EXIF_TAG_APERTURE_VALUE, EXIF_TYPE_RATIONAL,
0,
serialize_aperture_value, deserialize_aperture_value},
+ {GST_TAG_CAPTURING_EXPOSURE_COMPENSATION, EXIF_TAG_EXPOSURE_BIAS,
+ EXIF_TYPE_SRATIONAL, 0, NULL, NULL},
{GST_TAG_CAPTURING_METERING_MODE, EXIF_TAG_METERING_MODE, EXIF_TYPE_SHORT, 0,
serialize_metering_mode, deserialize_metering_mode},
{GST_TAG_CAPTURING_FLASH_FIRED, EXIF_TAG_FLASH, EXIF_TYPE_SHORT, 0,
}
static void
+write_exif_signed_rational_tag_from_taglist (GstExifWriter * writer,
+ const GstTagList * taglist, const GstExifTagMatch * exiftag)
+{
+ const GValue *value;
+ gdouble num = 0;
+ gint tag_size = gst_tag_list_get_tag_size (taglist, exiftag->gst_tag);
+
+ if (tag_size != 1) {
+ GST_WARNING ("Only the first item in the taglist will be serialized");
+ return;
+ }
+
+ value = gst_tag_list_get_value_index (taglist, exiftag->gst_tag, 0);
+
+ /* do some conversion if needed */
+ switch (G_VALUE_TYPE (value)) {
+ case G_TYPE_DOUBLE:
+ num = g_value_get_double (value);
+ gst_exif_writer_write_signed_rational_tag_from_double (writer,
+ exiftag->exif_tag, num);
+ break;
+ default:
+ if (G_VALUE_TYPE (value) == GST_TYPE_FRACTION) {
+ gst_exif_writer_write_signed_rational_tag (writer, exiftag->exif_tag,
+ gst_value_get_fraction_numerator (value),
+ gst_value_get_fraction_denominator (value));
+ } else {
+ GST_WARNING ("Conversion from %s to signed rational not supported",
+ G_VALUE_TYPE_NAME (value));
+ }
+ break;
+ }
+}
+
+static void
write_exif_integer_tag_from_taglist (GstExifWriter * writer,
const GstTagList * taglist, const GstExifTagMatch * exiftag)
{
case EXIF_TYPE_RATIONAL:
write_exif_rational_tag_from_taglist (writer, taglist, exiftag);
break;
+ case EXIF_TYPE_SRATIONAL:
+ write_exif_signed_rational_tag_from_taglist (writer, taglist, exiftag);
+ break;
case EXIF_TYPE_LONG:
case EXIF_TYPE_SHORT:
write_exif_integer_tag_from_taglist (writer, taglist, exiftag);
parse_exif_rational_tag (exif_reader, tag_map[map_index].gst_tag,
tagdata.count, tagdata.offset, 1, FALSE);
break;
+ case EXIF_TYPE_SRATIONAL:
+ parse_exif_rational_tag (exif_reader, tag_map[map_index].gst_tag,
+ tagdata.count, tagdata.offset, 1, TRUE);
+ break;
case EXIF_TYPE_UNDEFINED:
parse_exif_undefined_tag (exif_reader, &tag_map[map_index],
tagdata.count, tagdata.offset, tagdata.offset_as_data);
"Native American",
"Cabaret",
"New Wave",
- "Psychadelic",
+ "Psychedelic",
"Rave",
"Showtunes",
"Trailer",
"Avantgarde",
"Gothic Rock",
"Progressive Rock",
- "Psychadelic Rock",
+ "Psychedelic Rock",
"Symphonic Rock",
"Slow Rock",
"Big Band",
_gst_xmp_schema_add_simple_mapping (schema, GST_TAG_GEO_LOCATION_LONGITUDE,
"exif:GPSLongitude", GST_XMP_TAG_TYPE_SIMPLE, serialize_exif_longitude,
deserialize_exif_longitude);
+ _gst_xmp_schema_add_simple_mapping (schema,
+ GST_TAG_CAPTURING_EXPOSURE_COMPENSATION, "exif:ExposureBiasValue",
+ GST_XMP_TAG_TYPE_SIMPLE, NULL, NULL);
/* compound exif tags */
array = g_ptr_array_sized_new (2);
gst_tag_list_add (list, merge_mode, tag, v, NULL);
break;
}
+ case G_TYPE_DOUBLE:{
+ gdouble value = 0;
+ gint frac_n, frac_d;
+
+ if (sscanf (v, "%d/%d", &frac_n, &frac_d) == 2) {
+ gst_util_fraction_to_double (frac_n, frac_d, &value);
+ gst_tag_list_add (list, merge_mode, tag, value, NULL);
+ } else {
+ GST_WARNING ("Failed to parse fraction: %s", v);
+ }
+ break;
+ }
default:
if (tag_type == GST_TYPE_DATE_TIME) {
GstDateTime *datetime = NULL;
return g_strdup_printf ("%d", g_value_get_int (value));
case G_TYPE_UINT:
return g_strdup_printf ("%u", g_value_get_uint (value));
+ case G_TYPE_DOUBLE:
+ return double_to_fraction_string (g_value_get_double (value));
default:
break;
}
#define GST_TAG_CAPTURING_EXPOSURE_MODE "capturing-exposure-mode"
/**
+ * GST_TAG_CAPTURING_EXPOSURE_COMPENSATION:
+ *
+ * Exposure compensation using when capturing an image in EV. (double)
+ *
+ * Since: 0.10.33
+ */
+#define GST_TAG_CAPTURING_EXPOSURE_COMPENSATION "capturing-exposure-compensation"
+
+/**
* GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE:
*
* Scene mode used when capturing an image. (string)
G_TYPE_STRING, _("capturing exposure mode"),
_("The exposure mode used when capturing an image"), NULL);
+ gst_tag_register (GST_TAG_CAPTURING_EXPOSURE_COMPENSATION, GST_TAG_FLAG_META,
+ G_TYPE_DOUBLE, _("capturing exposure compensation"),
+ _("The exposure compensation used when capturing an image"), NULL);
+
gst_tag_register (GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE, GST_TAG_FLAG_META,
G_TYPE_STRING, _("capturing scene capture type"),
_("The scene capture mode used when capturing an image"), NULL);
gst_video_format_is_rgb (GstVideoFormat format)
{
switch (format) {
- case GST_VIDEO_FORMAT_I420:
- case GST_VIDEO_FORMAT_YV12:
- case GST_VIDEO_FORMAT_YUY2:
- case GST_VIDEO_FORMAT_YVYU:
- case GST_VIDEO_FORMAT_UYVY:
- case GST_VIDEO_FORMAT_AYUV:
- case GST_VIDEO_FORMAT_Y41B:
- case GST_VIDEO_FORMAT_Y42B:
- case GST_VIDEO_FORMAT_Y444:
- case GST_VIDEO_FORMAT_v210:
- case GST_VIDEO_FORMAT_v216:
- case GST_VIDEO_FORMAT_NV12:
- case GST_VIDEO_FORMAT_NV21:
- case GST_VIDEO_FORMAT_v308:
- case GST_VIDEO_FORMAT_UYVP:
- case GST_VIDEO_FORMAT_A420:
- case GST_VIDEO_FORMAT_YUV9:
- case GST_VIDEO_FORMAT_YVU9:
- case GST_VIDEO_FORMAT_IYU1:
- case GST_VIDEO_FORMAT_AYUV64:
- return FALSE;
case GST_VIDEO_FORMAT_RGBx:
case GST_VIDEO_FORMAT_BGRx:
case GST_VIDEO_FORMAT_xRGB:
case GST_VIDEO_FORMAT_IYU1:
case GST_VIDEO_FORMAT_AYUV64:
return TRUE;
- case GST_VIDEO_FORMAT_RGBx:
- case GST_VIDEO_FORMAT_BGRx:
- case GST_VIDEO_FORMAT_xRGB:
- case GST_VIDEO_FORMAT_xBGR:
- case GST_VIDEO_FORMAT_RGBA:
- case GST_VIDEO_FORMAT_BGRA:
- case GST_VIDEO_FORMAT_ARGB:
- case GST_VIDEO_FORMAT_ABGR:
- case GST_VIDEO_FORMAT_RGB:
- case GST_VIDEO_FORMAT_BGR:
- case GST_VIDEO_FORMAT_RGB16:
- case GST_VIDEO_FORMAT_BGR16:
- case GST_VIDEO_FORMAT_RGB15:
- case GST_VIDEO_FORMAT_BGR15:
- case GST_VIDEO_FORMAT_RGB8_PALETTED:
- case GST_VIDEO_FORMAT_ARGB64:
- case GST_VIDEO_FORMAT_r210:
- return FALSE;
default:
return FALSE;
}
gst_video_format_has_alpha (GstVideoFormat format)
{
switch (format) {
- case GST_VIDEO_FORMAT_I420:
- case GST_VIDEO_FORMAT_YV12:
- case GST_VIDEO_FORMAT_YUY2:
- case GST_VIDEO_FORMAT_YVYU:
- case GST_VIDEO_FORMAT_UYVY:
- case GST_VIDEO_FORMAT_Y41B:
- case GST_VIDEO_FORMAT_Y42B:
- case GST_VIDEO_FORMAT_Y444:
- case GST_VIDEO_FORMAT_v210:
- case GST_VIDEO_FORMAT_v216:
- case GST_VIDEO_FORMAT_NV12:
- case GST_VIDEO_FORMAT_NV21:
- case GST_VIDEO_FORMAT_v308:
- case GST_VIDEO_FORMAT_Y800:
- case GST_VIDEO_FORMAT_Y16:
- case GST_VIDEO_FORMAT_UYVP:
- case GST_VIDEO_FORMAT_YUV9:
- case GST_VIDEO_FORMAT_YVU9:
- case GST_VIDEO_FORMAT_IYU1:
- return FALSE;
case GST_VIDEO_FORMAT_AYUV:
case GST_VIDEO_FORMAT_RGBA:
case GST_VIDEO_FORMAT_BGRA:
case GST_VIDEO_FORMAT_ARGB64:
case GST_VIDEO_FORMAT_AYUV64:
return TRUE;
- case GST_VIDEO_FORMAT_RGBx:
- case GST_VIDEO_FORMAT_BGRx:
- case GST_VIDEO_FORMAT_xRGB:
- case GST_VIDEO_FORMAT_xBGR:
- case GST_VIDEO_FORMAT_RGB:
- case GST_VIDEO_FORMAT_BGR:
- case GST_VIDEO_FORMAT_RGB16:
- case GST_VIDEO_FORMAT_BGR16:
- case GST_VIDEO_FORMAT_RGB15:
- case GST_VIDEO_FORMAT_BGR15:
- case GST_VIDEO_FORMAT_r210:
- return FALSE;
default:
return FALSE;
}
* @GST_VIDEO_FORMAT_YVU9: planar 4:1:0 YUV (like YUV9 but UV planes swapped) (Since: 0.10.32)
* @GST_VIDEO_FORMAT_IYU1: packed 4:1:1 YUV (Cb-Y0-Y1-Cr-Y2-Y3 ...) (Since: 0.10.32)
* @GST_VIDEO_FORMAT_ARGB64: rgb with alpha channel first, 16 bits per channel (Since: 0.10.33)
- * @GST_VIDEO_FORMAT_AY64: packed 4:4:4 YUV with alpha channel, 16 bits per channel (A0-Y0-U0-V0 ...) (Since: 0.10.33)
+ * @GST_VIDEO_FORMAT_AYUV64: packed 4:4:4 YUV with alpha channel, 16 bits per channel (A0-Y0-U0-V0 ...) (Since: 0.10.33)
* @GST_VIDEO_FORMAT_r210: packed 4:4:4 RGB, 10 bits per channel (Since: 0.10.33)
*
* Enum value describing the most common video formats.
/* Capsfilter - outqueue */
gst_element_set_state (sgroup->outfilter, GST_STATE_NULL);
gst_element_unlink (sgroup->outfilter, sgroup->outqueue);
+ gst_element_set_state (sgroup->outqueue, GST_STATE_NULL);
gst_bin_remove (GST_BIN (ebin), sgroup->outqueue);
/* streamcombiner - parser - capsfilter */
gst_element_set_state (sgroup->parser, GST_STATE_NULL);
gst_element_unlink (sgroup->parser, sgroup->outfilter);
gst_element_unlink (sgroup->combiner, sgroup->parser);
+ gst_bin_remove ((GstBin *) ebin, sgroup->parser);
}
/* Sink Ghostpad */
gst_iterator_resync (it);
}
gst_iterator_free (it);
+ gst_element_set_state (sgroup->combiner, GST_STATE_NULL);
+ gst_bin_remove ((GstBin *) ebin, sgroup->combiner);
}
if (sgroup->splitter) {
gst_iterator_resync (it);
}
gst_iterator_free (it);
+
+ gst_element_set_state (sgroup->splitter, GST_STATE_NULL);
+ gst_bin_remove ((GstBin *) ebin, sgroup->splitter);
}
if (sgroup->inqueue)
gst_bin_remove ((GstBin *) ebin, sgroup->inqueue);
+
if (sgroup->encoder)
gst_bin_remove ((GstBin *) ebin, sgroup->encoder);
+
if (sgroup->smartencoder)
gst_bin_remove ((GstBin *) ebin, sgroup->smartencoder);
+ if (sgroup->outfilter)
+ gst_bin_remove ((GstBin *) ebin, sgroup->outfilter);
+
g_slice_free (StreamGroup, sgroup);
}
/* Remove muxer if present */
if (ebin->muxer) {
+ gst_element_set_state (ebin->muxer, GST_STATE_NULL);
gst_bin_remove (GST_BIN (ebin), ebin->muxer);
ebin->muxer = NULL;
}
{
const unsigned char *p;
int src_wrap, ret, x, y;
- unsigned int r, g, b, a;
+ unsigned int G_GNUC_UNUSED r, G_GNUC_UNUSED g, G_GNUC_UNUSED b, a;
p = src->data[0];
src_wrap = src->linesize[0] - BPP * width;
{
GstPlayBaseGroup *group;
gboolean had_active_group;
- gboolean res;
GROUP_LOCK (play_base_bin);
group = play_base_bin->building_group;
setup_substreams (play_base_bin);
GST_DEBUG_OBJECT (play_base_bin, "Emitting signal");
- res =
- GST_PLAY_BASE_BIN_GET_CLASS (play_base_bin)->setup_output_pads
+ GST_PLAY_BASE_BIN_GET_CLASS (play_base_bin)->setup_output_pads
(play_base_bin, group);
GST_DEBUG_OBJECT (play_base_bin, "done");
GstPlayBaseGroup *group;
GstPlayBaseBin *play_base_bin;
GstStreamInfo *info;
- gboolean res;
GstEventType type;
type = GST_EVENT_TYPE (event);
setup_substreams (play_base_bin);
GST_DEBUG ("switching to next group %p - emitting signal", group);
/* and signal the new group */
- res =
- GST_PLAY_BASE_BIN_GET_CLASS (play_base_bin)->setup_output_pads
+ GST_PLAY_BASE_BIN_GET_CLASS (play_base_bin)->setup_output_pads
(play_base_bin, group);
GROUP_UNLOCK (play_base_bin);
{
GstClockTime ts = GST_CLOCK_TIME_NONE;
const gchar *text_start = NULL;
- gboolean multiline = FALSE;
gchar *ret = NULL;
gchar divc = '\0';
guint h, m, s, l = 1;
GST_LOG ("multiline format %u %u %u %u", h, m, s, l);
ts = GST_SECOND * ((((h * 60) + m) * 60) + s);
text_start = strchr (line, '=');
- multiline = TRUE;
} else if (sscanf (line, "%u:%02u:%02u%c", &h, &m, &s, &divc) == 4 &&
(divc == '=' || divc == ':')) {
GST_LOG ("single line format %u %u %u %u %c", h, m, s, l, divc);
GstTCPClient *client;
GList *clink;
GTimeVal now;
- gint flags, res;
+ gint flags;
struct stat statbuf;
GST_DEBUG_OBJECT (sink, "[fd %5d] adding client, sync_method %d, "
sink->clients_cookie++;
/* set the socket to non blocking */
- res = fcntl (fd, F_SETFL, O_NONBLOCK);
+ if (fcntl (fd, F_SETFL, O_NONBLOCK) < 0) {
+ GST_ERROR_OBJECT (sink, "failed to make socket %d non-blocking: %s", fd,
+ g_strerror (errno));
+ }
+
/* we always read from a client */
gst_poll_add_fd (sink->fdset, &client->fd);
}
}
/* figure out the mode, can't use send() for non sockets */
- res = fstat (fd, &statbuf);
- if (S_ISSOCK (statbuf.st_mode)) {
+ if (fstat (fd, &statbuf) == 0 && S_ISSOCK (statbuf.st_mode)) {
client->is_socket = TRUE;
setup_dscp_client (sink, client);
}
}
case GST_SYNC_METHOD_BURST_KEYFRAME:
{
- gboolean ok;
gint min_idx, max_idx;
gint next_syncframe, prev_syncframe;
* NEXT_KEYFRAME.
*/
/* gather burst limits */
- ok = count_burst_unit (sink, &min_idx, client->burst_min_unit,
+ count_burst_unit (sink, &min_idx, client->burst_min_unit,
client->burst_min_value, &max_idx, client->burst_max_unit,
client->burst_max_value);
}
case GST_SYNC_METHOD_BURST_WITH_KEYFRAME:
{
- gboolean ok;
gint min_idx, max_idx;
gint next_syncframe;
* amount of data up 'till min.
*/
/* gather enough data to burst */
- ok = count_burst_unit (sink, &min_idx, client->burst_min_unit,
+ count_burst_unit (sink, &min_idx, client->burst_min_unit,
client->burst_min_value, &max_idx, client->burst_max_unit,
client->burst_max_value);
while (found < GST_MP3_TYPEFIND_TRY_HEADERS) {
guint32 head;
guint length;
- guint prev_layer = 0, prev_bitrate = 0;
+ guint prev_layer = 0;
guint prev_channels = 0, prev_samplerate = 0;
gboolean free = FALSE;
* be a freaking funky encoded mp3 though. We'll just not count
* this header*/
prev_layer = layer;
- prev_bitrate = bitrate;
prev_channels = channels;
prev_samplerate = samplerate;
} else {
GST_DEBUG_OBJECT (videorate, "intersect %" GST_PTR_FORMAT, caps);
+ /* could turn up empty, due to e.g. colorspace etc */
+ if (gst_caps_get_size (caps) == 0) {
+ gst_caps_unref (caps);
+ goto no_transform;
+ }
+
/* take first possibility */
gst_caps_truncate (caps);
structure = gst_caps_get_structure (caps, 0);
int y_increment;
int x_increment;
int y1;
- int y2;
int i;
int j;
int x;
#define LINE(x) ((tmpbuf) + (dest_size)*((x)&1))
acc = 0;
- y2 = -1;
gst_videoscale_orc_resample_bilinear_u32 (LINE (0), src->pixels,
0, x_increment, dest->width);
y1 = 0;
int j;
int x;
int dest_size;
- int xacc;
if (dest->height == 1)
y_increment = 0;
tmp2 = tmpbuf + dest_size;
acc = 0;
- xacc = 0;
y2 = -1;
gst_videoscale_orc_resample_bilinear_u8 (tmp1, src->pixels,
0, x_increment, dest->width);
} else if (j == y2) {
memcpy (dest->pixels + i * dest->stride, tmp2, dest_size);
} else {
- xacc = 0;
gst_videoscale_orc_resample_bilinear_u8 (tmp1,
src->pixels + j * src->stride, 0, x_increment, dest->width);
y1 = j;
} else {
if (j == y1) {
if (j + 1 != y2) {
- xacc = 0;
gst_videoscale_orc_resample_bilinear_u8 (tmp2,
src->pixels + (j + 1) * src->stride, 0, x_increment, dest->width);
y2 = j + 1;
}
} else if (j == y2) {
if (j + 1 != y1) {
- xacc = 0;
gst_videoscale_orc_resample_bilinear_u8 (tmp1,
src->pixels + (j + 1) * src->stride, 0, x_increment, dest->width);
y1 = j + 1;
int y_increment;
int x_increment;
int y1;
- int y2;
int i;
int j;
int x;
#define LINE(x) ((guint16 *)((tmpbuf) + (dest_size)*((x)&1)))
acc = 0;
- y2 = -1;
//gst_videoscale_orc_resample_bilinear_u64 (LINE (0), src->pixels,
// 0, x_increment, dest->width);
xacc = 0;
noinst_PROGRAMS = $(check_libvisual)
noinst_HEADERS = \
- libs/struct_i386.h
-# libs/struct_arm.h \
-# libs/struct_hppa.h \
-# libs/struct_ppc32.h \
-# libs/struct_ppc64.h \
-# libs/struct_sparc.h \
-# libs/struct_x86_64.h
+ libs/struct_*.h
AM_CFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
$(GST_CFLAGS) $(GST_CHECK_CFLAGS) \
fail_unless_equals_int (gst_element_set_state (ebin, GST_STATE_PAUSED),
GST_STATE_CHANGE_SUCCESS);
+ /* Set back to NULL */
+ fail_unless_equals_int (gst_element_set_state (ebin, GST_STATE_NULL),
+ GST_STATE_CHANGE_SUCCESS);
+
gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpadvorbis);
gst_object_unref (sinkpadvorbis);
gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpadtheora);
gst_object_unref (sinkpadtheora);
- /* Set back to NULL */
- fail_unless_equals_int (gst_element_set_state (ebin, GST_STATE_NULL),
- GST_STATE_CHANGE_SUCCESS);
-
gst_object_unref (ebin);
};
}
}
- gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpad);
- gst_object_unref (sinkpad);
-
/* Set back to NULL */
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
GST_STATE_CHANGE_SUCCESS);
+ gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpad);
+ gst_object_unref (sinkpad);
+
gst_object_unref (bus);
gst_object_unref (pipeline);
}
}
+ /* Set back to NULL */
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
+ GST_STATE_CHANGE_SUCCESS);
+
gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpad1);
gst_object_unref (sinkpad1);
gst_element_release_request_pad (GST_ELEMENT (ebin), sinkpad2);
gst_object_unref (sinkpad2);
- /* Set back to NULL */
- fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
- GST_STATE_CHANGE_SUCCESS);
-
gst_object_unref (bus);
gst_object_unref (pipeline);
_test_encodebin_reuse (prof2, prof3);
gst_encoding_profile_unref (prof1);
+ gst_encoding_profile_unref (prof2);
+ gst_encoding_profile_unref (prof3);
};
GST_END_TEST;
"%f does not match expected %f", ___d, d); \
}
-GST_START_TEST (test_muscibrainz_tag_registration)
+GST_START_TEST (test_musicbrainz_tag_registration)
{
GstTagList *list;
GDate *date;
GstDateTime *datetime;
+ gst_tag_register_musicbrainz_tags ();
+
g_value_init (&value, G_TYPE_STRING);
g_value_set_static_string (&value, "my string");
do_simple_xmp_tag_serialization_deserialization (GST_TAG_ARTIST, &value);
g_value_set_double (&value, 359.99);
do_simple_xmp_tag_serialization_deserialization
(GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION, &value);
+
+ g_value_set_double (&value, 0.0);
+ do_simple_xmp_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_EXPOSURE_COMPENSATION, &value);
+ g_value_set_double (&value, 1.0);
+ do_simple_xmp_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_EXPOSURE_COMPENSATION, &value);
+ g_value_set_double (&value, -2.5);
+ do_simple_xmp_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_EXPOSURE_COMPENSATION, &value);
g_value_unset (&value);
g_value_init (&value, GST_TYPE_DATE);
g_value_set_double (&value, 600.0);
do_simple_exif_tag_serialization_deserialization
(GST_TAG_IMAGE_VERTICAL_PPI, &value);
+
+ g_value_set_double (&value, 0.0);
+ do_simple_exif_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_EXPOSURE_COMPENSATION, &value);
+ g_value_set_double (&value, 1.0);
+ do_simple_exif_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_EXPOSURE_COMPENSATION, &value);
+ g_value_set_double (&value, -2.5);
+ do_simple_exif_tag_serialization_deserialization
+ (GST_TAG_CAPTURING_EXPOSURE_COMPENSATION, &value);
g_value_unset (&value);
g_value_init (&value, G_TYPE_INT);
TCase *tc_chain = tcase_create ("general");
suite_add_tcase (s, tc_chain);
- tcase_add_test (tc_chain, test_muscibrainz_tag_registration);
+ tcase_add_test (tc_chain, test_musicbrainz_tag_registration);
tcase_add_test (tc_chain, test_parse_extended_comment);
tcase_add_test (tc_chain, test_vorbis_tags);
tcase_add_test (tc_chain, test_id3_tags);
remove_range_foreach (GQuark field_id, const GValue * value, GstStructure * st)
{
GType ftype = G_VALUE_TYPE (value);
- const gchar *fname;
+ /* const gchar *fname; */
if (ftype == GST_TYPE_INT_RANGE || ftype == GST_TYPE_DOUBLE_RANGE ||
ftype == GST_TYPE_FRACTION_RANGE) {
return FALSE;
}
- fname = g_quark_to_string (field_id);
-
+ /* fname = g_quark_to_string (field_id); */
/* if (strstr (fname, "framerate") || strstr (fname, "pixel-aspect-ratio") || */
/* strstr (fname, "rate")) { */
/* gst_structure_remove_field (st, g_quark_to_string (field_id)); */
gtk_main ();
+ g_source_remove (watch_id);
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (pipeline);
g_main_loop_run (loop);
+ g_source_remove (watch_id);
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (pipeline);
event = gst_event_new_step (format, amount, rate, flush, FALSE);
res = send_event (event);
+
+ if (!res) {
+ g_print ("Sending step event failed\n");
+ }
}
static void
g_print ("error reading joystick, read %u bytes of %u\n",
(guint) bytes_read, (guint) sizeof (struct js_event));
return TRUE;
+ } else if (result != G_IO_STATUS_NORMAL) {
+ g_print ("reading from joystick returned status %d", result);
}
switch (js->type & ~JS_EVENT_INIT) {
event = gst_event_new_step (format, amount, rate, flush, FALSE);
res = send_event (event);
+
+ if (!res) {
+ g_print ("Sending step event failed\n");
+ }
}
static void