diff --git a/configure.ac b/configure.ac index 401068f..e470dd5 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl when going to/from release please set the nano (fourth number) right ! dnl releases only do Wall, git and prerelease does Werror too dnl AC_INIT([GstShark], - [0.5.5.1], + [0.6.0.1], [https://github.com/RidgeRun/gst-shark], [gst-shark], [https://github.com/RidgeRun/gst-shark]) @@ -217,6 +217,11 @@ AG_GST_CHECK_GST([$GST_REQ_MAJMIN], [$GST_REQ_MINVER], [yes]) AG_GST_CHECK_GST_BASE([$GST_REQ_MAJMIN], [$GST_REQ_MINVER], [yes]) AG_GST_CHECK_GST_CHECK([$GST_REQ_MAJMIN], [$GST_REQ_MINVER], [yes]) +dnl Tracers require GStreamer debug support +AG_GST_CHECK_GST_DEBUG_DISABLED([ + AC_MSG_ERROR([Tracers require GStreamer debug support. Rebuild GStreamer core with --enable-gst-debug.]) +]) + GST_REQ_STABLE=1.8.1 PKG_CHECK_MODULES(GSTREAMER, [ gstreamer-1.0 >= $GST_REQ_STABLE diff --git a/gst-shark.doap.in b/gst-shark.doap.in index 67093fc..1bdfa13 100644 --- a/gst-shark.doap.in +++ b/gst-shark.doap.in @@ -170,6 +170,16 @@ + + + 0.6.0 + release/v0.6.0 + + 2019-02-11 + + + + Michael Gruner diff --git a/plugins/tracers/gstgraphic.c b/plugins/tracers/gstgraphic.c index e032957..780bb75 100644 --- a/plugins/tracers/gstgraphic.c +++ b/plugins/tracers/gstgraphic.c @@ -44,23 +44,11 @@ struct _GstGraphicTracer G_DEFINE_TYPE_WITH_CODE (GstGraphicTracer, gst_graphic_tracer, GST_SHARK_TYPE_TRACER, _do_init); -static void log_graphic (GstDebugCategory * cat, const gchar * fmt, ...); static void do_element_change_state_post (GstGraphicTracer * self, guint64 ts, GstElement * element, GstStateChange transition, GstStateChangeReturn result); static void gst_graphic_tracer_finalize (GObject * obj); -static void -log_graphic (GstDebugCategory * cat, const gchar * fmt, ...) -{ - va_list var_args; - - va_start (var_args, fmt); - gst_debug_log_valist (cat, GST_LEVEL_TRACE, "", "", 0, NULL, fmt, var_args); - va_end (var_args); - -} - static void do_element_change_state_post (GstGraphicTracer * self, guint64 ts, GstElement * element, GstStateChange transition, @@ -72,7 +60,7 @@ do_element_change_state_post (GstGraphicTracer * self, guint64 ts, if (GST_IS_PIPELINE (element) && (transition == GST_STATE_CHANGE_PAUSED_TO_PLAYING)) { /* Logging the change of state in which the pipeline graphic is being done */ - log_graphic (GST_CAT_STATES, + GST_CAT_TRACE (GST_CAT_STATES, "%" GST_TIME_FORMAT ", element=%" GST_PTR_FORMAT ", change=%d, res=%d", GST_TIME_ARGS (ts), element, (gint) transition, (gint) result); diff --git a/scripts/graphics/gstshark-plot.m b/scripts/graphics/gstshark-plot.m index 3de6776..9c3a113 100755 --- a/scripts/graphics/gstshark-plot.m +++ b/scripts/graphics/gstshark-plot.m @@ -4,6 +4,7 @@ GSTSHARK_SAVEFIG_FORMAT = 'pdf'; GSTSHARK_LEGEND = 'northeast'; TRUE = 1; +graphics_toolkit("gnuplot"); arg_list = argv (); diff --git a/scripts/graphics/plot_tracer.m b/scripts/graphics/plot_tracer.m index ef251c9..7d3359d 100644 --- a/scripts/graphics/plot_tracer.m +++ b/scripts/graphics/plot_tracer.m @@ -28,11 +28,12 @@ function plot_tracer(tracer,savefig,format,legend_location) # Calculate the greatest time value timestamp_max = max(max(tracer.cpuusage.timestamp_mat)); + timestamp_min = min(min(tracer.cpuusage.timestamp_mat)); title('CPU usage','fontsize',FONTSIZE) xlabel('time (seconds)','fontsize',FONTSIZE) ylabel('Usage (%)','fontsize',FONTSIZE) - xlim([0,timestamp_max]) + xlim([timestamp_min,timestamp_max]) if (0 == strcmp(legend_location,'extern')) switch CPU_USAGE_AVERAGE case 0 @@ -77,13 +78,14 @@ function plot_tracer(tracer,savefig,format,legend_location) if (1 == isfield(tracer,'framerate')) # Calculate the greatest time value timestamp_max = max(max(tracer.framerate.timestamp_mat)); + timestamp_min = min(min(tracer.framerate.timestamp_mat)); figure('Name','Frame rate') plot(tracer.framerate.timestamp_mat',tracer.framerate.fps_mat','linewidth',LINEWIDTH) title('Frame rate','fontsize',FONTSIZE) xlabel('time (seconds)','fontsize',FONTSIZE) ylabel('Frame per second','fontsize',FONTSIZE) - xlim([0,timestamp_max]) + xlim([timestamp_min,timestamp_max]) if (0 == strcmp(legend_location,'extern')) legend(str2latex(tracer.framerate.element_name_list),'Location',legend_location) end @@ -109,13 +111,14 @@ function plot_tracer(tracer,savefig,format,legend_location) if (1 == isfield(tracer,'interlatency')) # Calculate the greatest time value timestamp_max = max(max(tracer.interlatency.timestamp_mat)); + timestamp_min = min(min(tracer.interlatency.timestamp_mat)); figure('Name','Interlatency') plot(tracer.interlatency.timestamp_mat',tracer.interlatency.time_mat','linewidth',LINEWIDTH) title('Interlatency','fontsize',FONTSIZE) xlabel('time (seconds)','fontsize',FONTSIZE) ylabel('time (nanoseconds)','fontsize',FONTSIZE) - xlim([0,timestamp_max]) + xlim([timestamp_min,timestamp_max]) if (0 == strcmp(legend_location,'extern')) legend(str2latex(tracer.interlatency.pad_name_list),'Location',legend_location) end @@ -141,13 +144,14 @@ function plot_tracer(tracer,savefig,format,legend_location) if (1 == isfield(tracer,'proctime')) # Calculate the greatest time value timestamp_max = max(max(tracer.proctime.timestamp_mat)); + timestamp_min = min(min(tracer.proctime.timestamp_mat)); figure('Name','Processing time') plot(tracer.proctime.timestamp_mat',tracer.proctime.time_mat','linewidth',LINEWIDTH) title('Processing time','fontsize',FONTSIZE) xlabel('time (seconds)','fontsize',FONTSIZE) ylabel('time (nanoseconds)','fontsize',FONTSIZE) - xlim([0,timestamp_max]) + xlim([timestamp_min,timestamp_max]) if (0 == strcmp(legend_location,'extern')) legend(str2latex(tracer.proctime.element_name_list),'Location',legend_location) end @@ -173,13 +177,14 @@ function plot_tracer(tracer,savefig,format,legend_location) if (1 == isfield(tracer,'scheduling')) # Calculate the greatest time value timestamp_max = max(max(tracer.scheduling.timestamp_mat)); + timestamp_min = min(min(tracer.scheduling.timestamp_mat)); figure('Name','Schedule') plot(tracer.scheduling.timestamp_mat',tracer.scheduling.time_mat','linewidth',LINEWIDTH) title('Schedule','fontsize',FONTSIZE) xlabel('time (seconds)','fontsize',FONTSIZE) ylabel('time (nanoseconds)','fontsize',FONTSIZE) - xlim([0,timestamp_max]) + xlim([timestamp_min,timestamp_max]) if (0 == strcmp(legend_location,'extern')) legend(str2latex(tracer.scheduling.pad_name_list),'Location',legend_location) end @@ -205,13 +210,14 @@ function plot_tracer(tracer,savefig,format,legend_location) if (1 == isfield(tracer,'bitrate')) # Calculate the greatest time value timestamp_max = max(max(tracer.bitrate.timestamp_mat)); + timestamp_min = min(min(tracer.bitrate.timestamp_mat)); figure('Name','Bitrate') plot(tracer.bitrate.timestamp_mat',tracer.bitrate.bitrate_mat','linewidth',LINEWIDTH) title('Bitrate','fontsize',FONTSIZE) xlabel('time (seconds)','fontsize',FONTSIZE) ylabel('time (nanoseconds)','fontsize',FONTSIZE) - xlim([0,timestamp_max]) + xlim([timestamp_min,timestamp_max]) if (0 == strcmp(legend_location,'extern')) legend(str2latex(tracer.bitrate.pad_name_list),'Location',legend_location) end @@ -237,13 +243,14 @@ function plot_tracer(tracer,savefig,format,legend_location) if (1 == isfield(tracer,'queuelevel')) # Calculate the greatest time value timestamp_max = max(max(tracer.queuelevel.timestamp_mat)); + timestamp_min = min(min(tracer.queuelevel.timestamp_mat)); figure('Name','Queuelevel') plot(tracer.queuelevel.timestamp_mat',tracer.queuelevel.size_buffers_mat','linewidth',LINEWIDTH) title('Queuelevel','fontsize',FONTSIZE) xlabel('time (seconds)','fontsize',FONTSIZE) ylabel('Number of Buffers','fontsize',FONTSIZE) - xlim([0,timestamp_max]) + xlim([timestamp_min,timestamp_max]) if (0 == strcmp(legend_location,'extern')) legend(str2latex(tracer.queuelevel.element_name_list),'Location',legend_location) end @@ -272,6 +279,7 @@ function plot_tracer(tracer,savefig,format,legend_location) legend_list{end+1} = tracer.cpuusage.cpu_name_list{1}; timestamp_max = max(max(max(tracer.framerate.timestamp_mat)),max(tracer.cpuusage.timestamp_mat(:,1))); + timestamp_min = min(min(min(tracer.framerate.timestamp_mat)),min(tracer.cpuusage.timestamp_mat(:,1))); figure('Name','Frame rate and CPU usage') [hAx,hLine1,hLine2] = plotyy(tracer.framerate.timestamp_mat',tracer.framerate.fps_mat',tracer.cpuusage.timestamp_mat(:,1),tracer.cpuusage.cpu_mat(:,1)); @@ -283,7 +291,7 @@ function plot_tracer(tracer,savefig,format,legend_location) xlabel('time (seconds)','fontsize',FONTSIZE) ylabel(hAx(1),'FPS','fontsize',FONTSIZE) ylabel(hAx(2),'CPU usage (%)','fontsize',FONTSIZE) - xlim([0,timestamp_max]) + xlim([timestamp_min,timestamp_max]) if (TRUE == savefig) disp('Save cpuusage vs framerate figure...')