Don't call publisher without sample

Actually when you push samples into a pipeline, and the publishers don't
care of this sample, the publisher is called with a empty array of
samples.

This cause to send unuseful rpc/udp message.

With this change, the publisher is called only when it is needed.

Change-Id: I5811ead70808825e56cf9224b4db888c39034e35
Merge "Don't call publisher without sample"