Merge remote-tracking branch 'origin/master' into 0.11

Conflicts:
	sys/v4l2/gstv4l2object.c
This commit is contained in:
Tim-Philipp Müller 2011-12-08 01:28:26 +00:00
commit 668e15598b
8 changed files with 42 additions and 15 deletions

View file

@ -1331,9 +1331,9 @@ gst_multi_file_src_get_type
<FILE>element-multifilesink</FILE>
<TITLE>multifilesink</TITLE>
GstMultiFileSink
GstMultiFileSinkNext
<SUBSECTION Standard>
GstMultiFileSinkClass
GstMultiFileSinkNext
GST_MULTI_FILE_SINK
GST_MULTI_FILE_SINK_CLASS
GST_IS_MULTI_FILE_SINK

View file

@ -326,6 +326,7 @@ gst_flac_parse_start (GstBaseParse * parse)
flacparse->blocking_strategy = 0;
flacparse->block_size = 0;
flacparse->sample_number = 0;
flacparse->strategy_checked = FALSE;
/* "fLaC" marker */
gst_base_parse_set_min_frame_size (GST_BASE_PARSE (flacparse), 4);
@ -536,11 +537,16 @@ gst_flac_parse_frame_header_is_valid (GstFlacParse * flacparse,
/* Sanity check sample number against blocking strategy, as it seems
some files claim fixed block size but supply sample numbers,
rather than block numbers. */
if (set && blocking_strategy == 0 && block_size == sample_number) {
GST_WARNING_OBJECT (flacparse, "This file claims fixed block size, "
"but seems to be lying: assuming variable block size");
flacparse->force_variable_block_size = TRUE;
blocking_strategy = 1;
if (blocking_strategy == 0 && flacparse->block_size != 0) {
if (!flacparse->strategy_checked) {
if (block_size == sample_number) {
GST_WARNING_OBJECT (flacparse, "This file claims fixed block size, "
"but seems to be lying: assuming variable block size");
flacparse->force_variable_block_size = TRUE;
blocking_strategy = 1;
}
flacparse->strategy_checked = TRUE;
}
}
/*

View file

@ -74,6 +74,7 @@ struct _GstFlacParse {
guint8 blocking_strategy;
guint16 block_size;
guint64 sample_number;
gboolean strategy_checked;
GstTagList *tags;

View file

@ -784,11 +784,11 @@ static void
gst_flv_demux_update_resync (GstFlvDemux * demux, guint32 pts, gboolean discont,
guint32 * last, GstClockTime * offset)
{
if (!discont && ABS (pts - *last) >= RESYNC_THRESHOLD) {
gint32 dpts = pts - *last;
if (!discont && ABS (dpts) >= RESYNC_THRESHOLD) {
/* Theoretically, we should use substract the duration of the last buffer,
but this demuxer sends no durations on buffers, not sure if it cannot
know, or just does not care to calculate. */
gint32 dpts = pts - *last;
*offset -= dpts * GST_MSECOND;
GST_WARNING_OBJECT (demux,
"Large pts gap (%" G_GINT32_FORMAT " ms), assuming resync, offset now %"

View file

@ -2487,6 +2487,11 @@ static void
gst_matroska_parse_accumulate_streamheader (GstMatroskaParse * parse,
GstBuffer * buffer)
{
if (parse->pushed_headers) {
GST_WARNING_OBJECT (parse,
"Accumulating headers, but headers are already pushed");
}
if (parse->streamheader) {
GstBuffer *buf;
@ -2742,7 +2747,7 @@ gst_matroska_parse_parse_id (GstMatroskaParse * parse, guint32 id,
GST_READ_CHECK (gst_matroska_parse_take (parse, read, &ebml));
ret = gst_matroska_read_common_parse_metadata (&parse->common,
GST_ELEMENT_CAST (parse), &ebml);
gst_matroska_parse_output (parse, ebml.buf, FALSE);
gst_matroska_parse_accumulate_streamheader (parse, ebml.buf);
break;
case GST_MATROSKA_ID_CHAPTERS:
GST_READ_CHECK (gst_matroska_parse_take (parse, read, &ebml));

View file

@ -52,6 +52,19 @@ G_BEGIN_DECLS
typedef struct _GstMultiFileSink GstMultiFileSink;
typedef struct _GstMultiFileSinkClass GstMultiFileSinkClass;
/**
* GstMultiFileSinkNext:
* @GST_MULTI_FILE_SINK_NEXT_BUFFER: New file for each buffer
* @GST_MULTI_FILE_SINK_NEXT_DISCONT: New file after each discontinuity
* @GST_MULTI_FILE_SINK_NEXT_KEY_FRAME: New file at each key frame
* (Useful for MPEG-TS segmenting)
* @GST_MULTI_FILE_SINK_NEXT_KEY_UNIT_EVENT: New file after a force key unit
* event (Since: 0.10.31)
* @GST_MULTI_FILE_SINK_NEXT_MAX_SIZE: New file when the configured maximum file
* size would be exceeded with the next buffer or buffer list (Since: 0.10.31)
*
* File splitting modes.
*/
typedef enum {
GST_MULTI_FILE_SINK_NEXT_BUFFER,
GST_MULTI_FILE_SINK_NEXT_DISCONT,

View file

@ -310,13 +310,13 @@ gst_rtp_jpeg_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
if (height <= 0 || height > 2040)
goto invalid_dimension;
}
pay->height = height / 8;
pay->height = GST_ROUND_UP_8 (height) / 8;
if (gst_structure_get_int (caps_structure, "width", &width)) {
if (width <= 0 || width > 2040)
goto invalid_dimension;
}
pay->width = width / 8;
pay->width = GST_ROUND_UP_8 (width) / 8;
gst_rtp_base_payload_set_options (basepayload, "video", TRUE, "JPEG", 90000);
res = gst_rtp_base_payload_set_outcaps (basepayload, NULL);
@ -455,8 +455,8 @@ gst_rtp_jpeg_pay_read_sof (GstRtpJPEGPay * pay, const guint8 * data,
if (width == 0 || width > 2040)
goto invalid_dimension;
pay->height = height / 8;
pay->width = width / 8;
pay->height = GST_ROUND_UP_8 (height) / 8;
pay->width = GST_ROUND_UP_8 (width) / 8;
/* we only support 3 components */
if (data[off++] != 3)

View file

@ -933,6 +933,8 @@ gst_v4l2_object_get_format_from_fourcc (GstV4l2Object * v4l2object,
/* complete made up ranking, the values themselves are meaningless */
/* These ranks MUST be X such that X<<15 fits on a signed int - see
the comment at the end of gst_v4l2_object_format_get_rank. */
#define YUV_BASE_RANK 1000
#define JPEG_BASE_RANK 500
#define DV_BASE_RANK 200
@ -1670,7 +1672,7 @@ gst_v4l2_object_probe_caps_for_format_and_size (GstV4l2Object * v4l2object,
num, denom);
gst_value_set_fraction (&step, -num, denom);
while (gst_value_compare (&min, &max) <= 0) {
while (gst_value_compare (&min, &max) != GST_VALUE_GREATER_THAN) {
GValue rate = { 0, };
num = gst_value_get_fraction_numerator (&min);
@ -1840,7 +1842,7 @@ gst_v4l2_object_probe_caps_for_format (GstV4l2Object * v4l2object,
size.stepwise.step_height);
for (w = size.stepwise.min_width, h = size.stepwise.min_height;
w < size.stepwise.max_width && h < size.stepwise.max_height;
w <= size.stepwise.max_width && h <= size.stepwise.max_height;
w += size.stepwise.step_width, h += size.stepwise.step_height) {
if (w == 0 || h == 0)
continue;