Skip to content

Commit

Permalink
lib: Emit error if cannot create gstreamer player for media
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlivio committed May 22, 2018
1 parent 09c97eb commit 90120f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/PlayerVideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ PlayerVideo::PlayerVideo (Formatter *formatter, Media *media)

_playbin = gst_element_factory_make ("playbin", "playbin");
g_assert_nonnull (_playbin);

//g_object_set (G_OBJECT (_playbin), "connection-speed", 56, nullptr);

bus = gst_pipeline_get_bus (GST_PIPELINE (_playbin));
Expand Down Expand Up @@ -158,7 +158,7 @@ PlayerVideo::PlayerVideo (Formatter *formatter, Media *media)
_callbacks.new_sample = cb_NewSample;
gst_app_sink_set_callbacks (GST_APP_SINK (_video.sink), &_callbacks, this,
nullptr);

g_signal_connect (G_OBJECT (_playbin), "about-to-finish", (GCallback) cb_EOS,
this);

Expand Down Expand Up @@ -593,7 +593,7 @@ PlayerVideo::getPipelineState ()

if (unlikely (ret == GST_STATE_CHANGE_FAILURE))
{
return nullptr;
ERROR("cannot create PlayerVideo for %s", Player::_prop.uri.c_str ());
}
return gst_element_state_get_name (curr);
}
Expand Down Expand Up @@ -622,7 +622,7 @@ PlayerVideo::cb_Bus (GstBus *bus, GstMessage *msg, PlayerVideo *player)
{
gst_message_parse_error (msg, &error, nullptr);
g_assert_nonnull (error);

string advice = "";
switch (error->code)
{
Expand Down

0 comments on commit 90120f9

Please sign in to comment.