Skip to content

Commit

Permalink
Merge branch 'release/v0.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgruner committed Feb 12, 2019
2 parents 44bc323 + 3712acb commit c62b8ab
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 22 deletions.
7 changes: 6 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions gst-shark.doap.in
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@
</Version>
</release>

<release>
<Version>
<revision>0.6.0</revision>
<branch>release/v0.6.0</branch>
<name></name>
<created>2019-02-11</created>
<file-release rdf:resource="" />
</Version>
</release>

<maintainer>
<foaf:Person>
<foaf:name>Michael Gruner</foaf:name>
Expand Down
14 changes: 1 addition & 13 deletions plugins/tracers/gstgraphic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);

Expand Down
1 change: 1 addition & 0 deletions scripts/graphics/gstshark-plot.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
GSTSHARK_SAVEFIG_FORMAT = 'pdf';
GSTSHARK_LEGEND = 'northeast';
TRUE = 1;
graphics_toolkit("gnuplot");

arg_list = argv ();

Expand Down
24 changes: 16 additions & 8 deletions scripts/graphics/plot_tracer.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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));
Expand All @@ -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...')
Expand Down

0 comments on commit c62b8ab

Please sign in to comment.