PageRenderTime 51ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/GstUtils.h

https://github.com/sofian/spike-gstreamer-dataflow
C Header | 40 lines | 14 code | 7 blank | 19 comment | 0 complexity | 9d6f106e9e9e662199bf97191e59169e MD5 | raw file
  1. /*
  2. * GstUtils.h
  3. *
  4. * (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef GSTUTILS_H_
  20. #define GSTUTILS_H_
  21. #include <gst/gst.h>
  22. #include "error.h"
  23. #include "Engine.h"
  24. class GstUtils {
  25. public:
  26. static void safeAddElement(GstPipeline* pipeline, GstElement* element);
  27. static void safeRemoveElement(GstPipeline* pipeline, GstElement* element);
  28. static void safeConnect(GstPad* src, GstPad* sink, gulong* blockingProbeId=0);
  29. // Puts a push blocking pad probe on #src# and returns its id.
  30. static void safeDisconnect(GstPad* src, GstPad* sink, gulong* blockingProbeId=0);
  31. static GstPadProbeReturn padProbeCallback (GstPad * src, GstPadProbeInfo * info, gpointer data);
  32. };
  33. #endif /* GSTUTILS_H_ */