Change event listeners
This commit is contained in:
parent
30b8dacc7f
commit
bfdd93b82a
|
@ -140,12 +140,12 @@ public:
|
||||||
|
|
||||||
inline static gboolean
|
inline static gboolean
|
||||||
look_for_tag_event(GstPad *pad, GstEvent **event, gpointer data) {
|
look_for_tag_event(GstPad *pad, GstEvent **event, gpointer data) {
|
||||||
StreamerInternals &instance = *static_cast<StreamerInternals *>(data);
|
std::cout << "TAG_EVENT: "
|
||||||
// std::cout << "TAG_EVENT: "
|
<< gst_event_type_get_name(GST_EVENT_TYPE(*event)) <<
|
||||||
// << gst_event_type_get_name(GST_EVENT_TYPE(*event)) <<
|
std::endl;
|
||||||
// std::endl;
|
|
||||||
if (GST_EVENT_TYPE(*event) != GST_EVENT_TAG)
|
if (GST_EVENT_TYPE(*event) != GST_EVENT_TAG)
|
||||||
return true;
|
return true;
|
||||||
|
StreamerInternals &instance = *static_cast<StreamerInternals *>(data);
|
||||||
GstTagList *tag_list{nullptr};
|
GstTagList *tag_list{nullptr};
|
||||||
gst_event_parse_tag(*event, &tag_list);
|
gst_event_parse_tag(*event, &tag_list);
|
||||||
instance.set_current_title_from_taglist(pad, tag_list);
|
instance.set_current_title_from_taglist(pad, tag_list);
|
||||||
|
@ -201,12 +201,12 @@ public:
|
||||||
instance.id_srcpad_probe_event = gst_pad_add_probe(
|
instance.id_srcpad_probe_event = gst_pad_add_probe(
|
||||||
src_pad,
|
src_pad,
|
||||||
static_cast<GstPadProbeType>(
|
static_cast<GstPadProbeType>(
|
||||||
GST_PAD_PROBE_TYPE_EVENT_UPSTREAM | GST_PAD_PROBE_TYPE_PUSH),
|
GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM | GST_PAD_PROBE_TYPE_PUSH),
|
||||||
instance.srcpad_probecallback_event, (void *)&instance, nullptr);
|
instance.srcpad_probecallback_event, (void *)&instance, nullptr);
|
||||||
instance.id_srcpad_probe_firstbuffer = gst_pad_add_probe(
|
instance.id_srcpad_probe_firstbuffer = gst_pad_add_probe(
|
||||||
src_pad,
|
src_pad,
|
||||||
static_cast<GstPadProbeType>(
|
static_cast<GstPadProbeType>(
|
||||||
GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM),
|
GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM),
|
||||||
instance.srcpad_probecallback_firstbuffer, (void *)&instance,
|
instance.srcpad_probecallback_firstbuffer, (void *)&instance,
|
||||||
nullptr);
|
nullptr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue