Merge branch 'master' into 0.11

This commit is contained in:
Wim Taymans 2011-11-02 10:31:24 +01:00
commit 769a9791a4
5 changed files with 58 additions and 16 deletions

View File

@ -1203,7 +1203,7 @@ AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
if test "x$mpeg2enc_headers_ok" = "xyes"; then if test "x$mpeg2enc_headers_ok" = "xyes"; then
HAVE_MPEG2ENC="yes" HAVE_MPEG2ENC="yes"
fi fi
CPP_FLAGS="$CPPFLAGS_GOOD" CPPFLAGS="$CPPFLAGS_GOOD"
AC_SUBST(MPEG2ENC_CFLAGS) AC_SUBST(MPEG2ENC_CFLAGS)
AC_SUBST(MPEG2ENC_LIBS) AC_SUBST(MPEG2ENC_LIBS)
], [ ], [
@ -1231,10 +1231,14 @@ AG_GST_CHECK_FEATURE(MPLEX, [mplex], mplex, [
dnl and mpeg2enc, we check for mplex on its own, too. dnl and mpeg2enc, we check for mplex on its own, too.
dnl libmplex < 1.9rc? has fuzzy ABI, valgrind and other problems dnl libmplex < 1.9rc? has fuzzy ABI, valgrind and other problems
PKG_CHECK_MODULES(MPLEX, mjpegtools >= 1.9.0, [ PKG_CHECK_MODULES(MPLEX, mjpegtools >= 1.9.0, [
dnl HACK because mplex 2.0.0 header files have a spurious 'include config.h'
touch config.h
dnl switch over to c++ to test things dnl switch over to c++ to test things
AC_LANG_CPLUSPLUS AC_LANG_CPLUSPLUS
OLD_CPPFLAGS="$CPPFLAGS" OLD_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $MPLEX_CFLAGS" dnl HACK as above
CPPFLAGS_GOOD="$CPPFLAGS $MPLEX_CFLAGS"
CPPFLAGS="$CPPFLAGS_GOOD -I."
AC_CHECK_HEADER(interact.hpp, [ AC_CHECK_HEADER(interact.hpp, [
MPLEX_LIBS="$MPLEX_LIBS -lmplex2 $LIBM" MPLEX_LIBS="$MPLEX_LIBS -lmplex2 $LIBM"
OLD_LIBS="$LIBS" OLD_LIBS="$LIBS"
@ -1271,6 +1275,7 @@ main (int argc,
} }
],[ ],[
HAVE_MPLEX="yes" HAVE_MPLEX="yes"
CPPFLAGS="$CPPFLAGS_GOOD"
AC_SUBST(MPLEX_CFLAGS) AC_SUBST(MPLEX_CFLAGS)
AC_SUBST(MPLEX_LIBS) AC_SUBST(MPLEX_LIBS)
AC_SUBST(MPLEX_LDFLAGS) AC_SUBST(MPLEX_LDFLAGS)

View File

@ -953,7 +953,7 @@ gst_h264_parser_parse_buffering_period (GstH264NalParser * nalparser,
GST_DEBUG ("parsing \"Buffering period\""); GST_DEBUG ("parsing \"Buffering period\"");
READ_UE_ALLOWED (nr, sps_id, 0, GST_H264_MAX_SPS_COUNT); READ_UE_ALLOWED (nr, sps_id, 0, GST_H264_MAX_SPS_COUNT - 1);
sps = gst_h264_parser_get_sps (nalparser, sps_id); sps = gst_h264_parser_get_sps (nalparser, sps_id);
if (!sps) { if (!sps) {
GST_WARNING ("couldn't find associated sequence parameter set with id: %d", GST_WARNING ("couldn't find associated sequence parameter set with id: %d",
@ -1372,7 +1372,7 @@ gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps,
READ_UINT8 (&nr, sps->level_idc, 8); READ_UINT8 (&nr, sps->level_idc, 8);
READ_UE_ALLOWED (&nr, sps->id, 0, GST_H264_MAX_SPS_COUNT); READ_UE_ALLOWED (&nr, sps->id, 0, GST_H264_MAX_SPS_COUNT - 1);
if (sps->profile_idc == 100 || sps->profile_idc == 110 || if (sps->profile_idc == 100 || sps->profile_idc == 110 ||
sps->profile_idc == 122 || sps->profile_idc == 244 || sps->profile_idc == 122 || sps->profile_idc == 244 ||
@ -1468,7 +1468,10 @@ gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps,
sps->width = width; sps->width = width;
sps->height = height; sps->height = height;
if (vui) { sps->fps_num = 0;
sps->fps_den = 1;
if (vui && vui->timing_info_present_flag) {
/* derive framerate */ /* derive framerate */
/* FIXME verify / also handle other cases */ /* FIXME verify / also handle other cases */
GST_LOG ("Framerate: %u %u %u %u", parse_vui_params, GST_LOG ("Framerate: %u %u %u %u", parse_vui_params,
@ -1484,8 +1487,6 @@ gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps,
GST_LOG ("framerate %d/%d", sps->fps_num, sps->fps_den); GST_LOG ("framerate %d/%d", sps->fps_num, sps->fps_den);
} }
} else { } else {
sps->fps_num = 0;
sps->fps_den = 1;
GST_LOG ("No VUI, unknown framerate"); GST_LOG ("No VUI, unknown framerate");
} }
@ -1523,8 +1524,8 @@ gst_h264_parse_pps (GstH264NalParser * nalparser, GstH264NalUnit * nalu,
nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size - 1); nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size - 1);
READ_UE_ALLOWED (&nr, pps->id, 0, GST_H264_MAX_PPS_COUNT); READ_UE_ALLOWED (&nr, pps->id, 0, GST_H264_MAX_PPS_COUNT - 1);
READ_UE_ALLOWED (&nr, sps_id, 0, GST_H264_MAX_SPS_COUNT); READ_UE_ALLOWED (&nr, sps_id, 0, GST_H264_MAX_SPS_COUNT - 1);
sps = gst_h264_parser_get_sps (nalparser, sps_id); sps = gst_h264_parser_get_sps (nalparser, sps_id);
if (!sps) { if (!sps) {

View File

@ -377,6 +377,11 @@ gst_camera_bin_start_capture (GstCameraBin2 * camerabin)
GST_CAMERA_BIN2_PROCESSING_INC (camerabin); GST_CAMERA_BIN2_PROCESSING_INC (camerabin);
if (camerabin->post_previews) {
/* Count processing of preview images too */
GST_CAMERA_BIN2_PROCESSING_INC (camerabin);
}
if (camerabin->location) if (camerabin->location)
location = g_strdup_printf (camerabin->location, capture_index); location = g_strdup_printf (camerabin->location, capture_index);
@ -928,6 +933,26 @@ gst_video_capture_bin_post_video_done (GstCameraBin2 * camera)
GST_WARNING_OBJECT (camera, "Failed to post video-done message"); GST_WARNING_OBJECT (camera, "Failed to post video-done message");
} }
static void
gst_camera_bin_skip_next_preview (GstCameraBin2 * camerabin)
{
gchar *location;
g_mutex_lock (camerabin->preview_list_mutex);
if (camerabin->preview_location_list) {
location = camerabin->preview_location_list->data;
GST_DEBUG_OBJECT (camerabin, "Skipping preview for %s", location);
g_free (location);
camerabin->preview_location_list =
g_slist_delete_link (camerabin->preview_location_list,
camerabin->preview_location_list);
GST_CAMERA_BIN2_PROCESSING_DEC (camerabin);
} else {
GST_WARNING_OBJECT (camerabin, "No previews to skip");
}
g_mutex_unlock (camerabin->preview_list_mutex);
}
static void static void
gst_camera_bin_handle_message (GstBin * bin, GstMessage * message) gst_camera_bin_handle_message (GstBin * bin, GstMessage * message)
{ {
@ -974,6 +999,9 @@ gst_camera_bin_handle_message (GstBin * bin, GstMessage * message)
gst_structure_take_value ((GstStructure *) structure, "location", gst_structure_take_value ((GstStructure *) structure, "location",
value); value);
} }
GST_LOG_OBJECT (bin, "received preview-image message");
GST_CAMERA_BIN2_PROCESSING_DEC (GST_CAMERA_BIN2_CAST (bin));
} }
} }
break; break;
@ -987,6 +1015,9 @@ gst_camera_bin_handle_message (GstBin * bin, GstMessage * message)
GST_WARNING_OBJECT (bin, "Capture failed, reason: %s - %s", GST_WARNING_OBJECT (bin, "Capture failed, reason: %s - %s",
err->message, debug); err->message, debug);
GST_CAMERA_BIN2_PROCESSING_DEC (GST_CAMERA_BIN2_CAST (bin)); GST_CAMERA_BIN2_PROCESSING_DEC (GST_CAMERA_BIN2_CAST (bin));
if (camerabin->post_previews) {
gst_camera_bin_skip_next_preview (camerabin);
}
} }
} }
break; break;

View File

@ -313,9 +313,8 @@ static guint64 block_score_for_row_5_tap (GstFieldAnalysis * filter,
static gfloat opposite_parity_windowed_comb (GstFieldAnalysis * filter, static gfloat opposite_parity_windowed_comb (GstFieldAnalysis * filter,
FieldAnalysisFields * fields); FieldAnalysisFields * fields);
static void static void
gst_field_analysis_reset (GstFieldAnalysis * filter) gst_field_analysis_empty_queue (GstFieldAnalysis * filter)
{ {
if (filter->frames) { if (filter->frames) {
guint length = g_queue_get_length (filter->frames); guint length = g_queue_get_length (filter->frames);
@ -327,6 +326,12 @@ gst_field_analysis_reset (GstFieldAnalysis * filter)
length--; length--;
} }
} }
}
static void
gst_field_analysis_reset (GstFieldAnalysis * filter)
{
gst_field_analysis_empty_queue (filter);
GST_DEBUG_OBJECT (filter, "Resetting context"); GST_DEBUG_OBJECT (filter, "Resetting context");
memset (filter->results, 0, 2 * sizeof (FieldAnalysis)); memset (filter->results, 0, 2 * sizeof (FieldAnalysis));
filter->is_telecine = FALSE; filter->is_telecine = FALSE;
@ -1711,7 +1716,7 @@ gst_field_analysis_chain (GstPad * pad, GstBuffer * buf)
} }
} }
gst_field_analysis_reset (filter); gst_field_analysis_empty_queue (filter);
if (ret != GST_FLOW_OK) { if (ret != GST_FLOW_OK) {
GST_DEBUG_OBJECT (filter, GST_DEBUG_OBJECT (filter,

View File

@ -328,7 +328,7 @@ h264parse_packetized_suite (void)
int int
main (int argc, char **argv) main (int argc, char **argv)
{ {
int nf; int nf = 0;
Suite *s; Suite *s;
SRunner *sr; SRunner *sr;
@ -354,7 +354,7 @@ main (int argc, char **argv)
s = h264parse_suite (); s = h264parse_suite ();
sr = srunner_create (s); sr = srunner_create (s);
srunner_run_all (sr, CK_NORMAL); srunner_run_all (sr, CK_NORMAL);
nf = srunner_ntests_failed (sr); nf += srunner_ntests_failed (sr);
srunner_free (sr); srunner_free (sr);
/* setup and tweak to handle avc au output */ /* setup and tweak to handle avc au output */
@ -366,7 +366,7 @@ main (int argc, char **argv)
s = h264parse_suite (); s = h264parse_suite ();
sr = srunner_create (s); sr = srunner_create (s);
srunner_run_all (sr, CK_NORMAL); srunner_run_all (sr, CK_NORMAL);
nf = srunner_ntests_failed (sr); nf += srunner_ntests_failed (sr);
srunner_free (sr); srunner_free (sr);
/* setup and tweak to handle avc packetized input */ /* setup and tweak to handle avc packetized input */
@ -386,7 +386,7 @@ main (int argc, char **argv)
s = h264parse_packetized_suite (); s = h264parse_packetized_suite ();
sr = srunner_create (s); sr = srunner_create (s);
srunner_run_all (sr, CK_NORMAL); srunner_run_all (sr, CK_NORMAL);
nf = srunner_ntests_failed (sr); nf += srunner_ntests_failed (sr);
srunner_free (sr); srunner_free (sr);
return nf; return nf;