Make use of our new debugging system. Very handy for performance measuring.
This commit is contained in:
parent
73d5814343
commit
94472a8f23
1 changed files with 15 additions and 0 deletions
|
@ -33,6 +33,9 @@
|
||||||
#include "configure.h"
|
#include "configure.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEBUG_PREFIX "GstreamerPlayer"
|
||||||
|
#include "LiveSupport/Core/Debug.h"
|
||||||
|
|
||||||
#include "LiveSupport/Core/TimeConversion.h"
|
#include "LiveSupport/Core/TimeConversion.h"
|
||||||
#include "LiveSupport/GstreamerElements/autoplug.h"
|
#include "LiveSupport/GstreamerElements/autoplug.h"
|
||||||
#include "GstreamerPlayer.h"
|
#include "GstreamerPlayer.h"
|
||||||
|
@ -71,6 +74,8 @@ GstreamerPlayer :: configure(const xmlpp::Element & element)
|
||||||
throw (std::invalid_argument,
|
throw (std::invalid_argument,
|
||||||
std::logic_error)
|
std::logic_error)
|
||||||
{
|
{
|
||||||
|
DEBUG_FUNC_INFO
|
||||||
|
|
||||||
if (element.get_name() != configElementNameStr) {
|
if (element.get_name() != configElementNameStr) {
|
||||||
std::string eMsg = "Bad configuration element ";
|
std::string eMsg = "Bad configuration element ";
|
||||||
eMsg += element.get_name();
|
eMsg += element.get_name();
|
||||||
|
@ -91,6 +96,8 @@ GstreamerPlayer :: configure(const xmlpp::Element & element)
|
||||||
void
|
void
|
||||||
GstreamerPlayer :: initialize(void) throw (std::exception)
|
GstreamerPlayer :: initialize(void) throw (std::exception)
|
||||||
{
|
{
|
||||||
|
DEBUG_FUNC_INFO
|
||||||
|
|
||||||
if (initialized) {
|
if (initialized) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -143,6 +150,8 @@ GstreamerPlayer :: errorHandler(GstElement * pipeline,
|
||||||
void
|
void
|
||||||
GstreamerPlayer :: deInitialize(void) throw ()
|
GstreamerPlayer :: deInitialize(void) throw ()
|
||||||
{
|
{
|
||||||
|
DEBUG_FUNC_INFO
|
||||||
|
|
||||||
if (initialized) {
|
if (initialized) {
|
||||||
gst_element_set_state(pipeline, GST_STATE_NULL);
|
gst_element_set_state(pipeline, GST_STATE_NULL);
|
||||||
gst_bin_sync_children_state(GST_BIN(pipeline));
|
gst_bin_sync_children_state(GST_BIN(pipeline));
|
||||||
|
@ -233,6 +242,8 @@ GstreamerPlayer :: open(const std::string fileUrl)
|
||||||
throw (std::invalid_argument,
|
throw (std::invalid_argument,
|
||||||
std::runtime_error)
|
std::runtime_error)
|
||||||
{
|
{
|
||||||
|
DEBUG_BLOCK
|
||||||
|
|
||||||
std::string filePath;
|
std::string filePath;
|
||||||
GstElement * pipe;
|
GstElement * pipe;
|
||||||
GstElement * fakesink;
|
GstElement * fakesink;
|
||||||
|
@ -451,6 +462,8 @@ GstreamerPlayer :: stop(void) throw (std::logic_error)
|
||||||
void
|
void
|
||||||
GstreamerPlayer :: close(void) throw (std::logic_error)
|
GstreamerPlayer :: close(void) throw (std::logic_error)
|
||||||
{
|
{
|
||||||
|
DEBUG_FUNC_INFO
|
||||||
|
|
||||||
if (isPlaying()) {
|
if (isPlaying()) {
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
@ -523,6 +536,8 @@ bool
|
||||||
GstreamerPlayer :: setAudioDevice(const std::string &deviceName)
|
GstreamerPlayer :: setAudioDevice(const std::string &deviceName)
|
||||||
throw ()
|
throw ()
|
||||||
{
|
{
|
||||||
|
DEBUG_FUNC_INFO
|
||||||
|
|
||||||
const bool oss = deviceName.find("/dev") == 0;
|
const bool oss = deviceName.find("/dev") == 0;
|
||||||
bool relink = false;
|
bool relink = false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue