Coverage Report

Created: 2026-02-14 06:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/gstreamer/subprojects/gstreamer/gst/gstcompat.h
Line
Count
Source
1
/* GStreamer
2
 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3
 *                    2004 Wim Taymans <wim@fluendo.com>
4
 *
5
 * gstcompat.h: backwards compatibility stuff
6
 *
7
 * This library is free software; you can redistribute it and/or
8
 * modify it under the terms of the GNU Library General Public
9
 * License as published by the Free Software Foundation; either
10
 * version 2 of the License, or (at your option) any later version.
11
 *
12
 * This library is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 * Library General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Library General Public
18
 * License along with this library; if not, write to the
19
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20
 * Boston, MA 02110-1301, USA.
21
 */
22
23
/* API compatibility stuff */
24
#ifndef __GSTCOMPAT_H__
25
#define __GSTCOMPAT_H__
26
/**
27
 * SECTION:gstcompat
28
 * @title: GstCompat
29
 * @short_description: Deprecated API entries
30
 *
31
 * Please do not use these in new code.
32
 * These symbols are only available by defining GST_DISABLE_DEPRECATED.
33
 * This can be done in CFLAGS for compiling old code.
34
 */
35
36
#include <glib.h>
37
#include <gst/gstpad.h>
38
39
40
G_BEGIN_DECLS
41
42
2
#define gst_buffer_new_and_alloc(s)            gst_buffer_new_allocate(NULL, s, NULL)
43
44
0
#define GST_BUFFER_TIMESTAMP          GST_BUFFER_PTS
45
0
#define GST_BUFFER_TIMESTAMP_IS_VALID GST_BUFFER_PTS_IS_VALID
46
47
static inline gboolean
48
gst_pad_set_caps (GstPad * pad, GstCaps * caps)
49
68
{
50
68
  GstEvent *event;
51
68
  gboolean res = TRUE;
52
53
68
  g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
54
68
  g_return_val_if_fail (caps != NULL && gst_caps_is_fixed (caps), FALSE);
55
56
68
  event = gst_event_new_caps (caps);
57
58
68
  if (GST_PAD_IS_SRC (pad))
59
68
    res = gst_pad_push_event (pad, event);
60
0
  else
61
0
    res = gst_pad_send_event (pad, event);
62
63
68
  return res;
64
68
}
Unexecuted instantiation: typefind.c:gst_pad_set_caps
Unexecuted instantiation: gst-discoverer.c:gst_pad_set_caps
Unexecuted instantiation: gstenumtypes.c:gst_pad_set_caps
Unexecuted instantiation: grammar.tab.c:gst_pad_set_caps
Unexecuted instantiation: gst.c:gst_pad_set_caps
Unexecuted instantiation: gstbin.c:gst_pad_set_caps
Unexecuted instantiation: gstcaps.c:gst_pad_set_caps
Unexecuted instantiation: gstcapsfeatures.c:gst_pad_set_caps
Unexecuted instantiation: gstchildproxy.c:gst_pad_set_caps
Unexecuted instantiation: gstcontrolbinding.c:gst_pad_set_caps
Unexecuted instantiation: gstcontrolsource.c:gst_pad_set_caps
Unexecuted instantiation: gstdeviceproviderfactory.c:gst_pad_set_caps
Unexecuted instantiation: gstdynamictypefactory.c:gst_pad_set_caps
Unexecuted instantiation: gstelementfactory.c:gst_pad_set_caps
Unexecuted instantiation: gsterror.c:gst_pad_set_caps
Unexecuted instantiation: gstghostpad.c:gst_pad_set_caps
Unexecuted instantiation: gstatomicqueue.c:gst_pad_set_caps
Unexecuted instantiation: gstplugin.c:gst_pad_set_caps
Unexecuted instantiation: gstpreset.c:gst_pad_set_caps
Unexecuted instantiation: gstprotection.c:gst_pad_set_caps
Unexecuted instantiation: gstregistry.c:gst_pad_set_caps
Unexecuted instantiation: gstpromise.c:gst_pad_set_caps
Unexecuted instantiation: gststructure.c:gst_pad_set_caps
Unexecuted instantiation: gsttagsetter.c:gst_pad_set_caps
Unexecuted instantiation: gsttocsetter.c:gst_pad_set_caps
Unexecuted instantiation: gsturi.c:gst_pad_set_caps
Unexecuted instantiation: gstvalue.c:gst_pad_set_caps
Unexecuted instantiation: gstvecdeque.c:gst_pad_set_caps
Unexecuted instantiation: pbutils-enumtypes.c:gst_pad_set_caps
Unexecuted instantiation: gstpluginsbaseversion.c:gst_pad_set_caps
Unexecuted instantiation: pbutils.c:gst_pad_set_caps
Unexecuted instantiation: codec-utils.c:gst_pad_set_caps
Unexecuted instantiation: descriptions.c:gst_pad_set_caps
Unexecuted instantiation: encoding-profile.c:gst_pad_set_caps
Unexecuted instantiation: encoding-target.c:gst_pad_set_caps
Unexecuted instantiation: install-plugins.c:gst_pad_set_caps
Unexecuted instantiation: missing-plugins.c:gst_pad_set_caps
Unexecuted instantiation: gstaudiovisualizer.c:gst_pad_set_caps
Unexecuted instantiation: gstdiscoverer.c:gst_pad_set_caps
Unexecuted instantiation: gstdiscoverer-types.c:gst_pad_set_caps
Unexecuted instantiation: video-enumtypes.c:gst_pad_set_caps
Unexecuted instantiation: colorbalance.c:gst_pad_set_caps
Unexecuted instantiation: colorbalancechannel.c:gst_pad_set_caps
Unexecuted instantiation: convertframe.c:gst_pad_set_caps
Unexecuted instantiation: gstvideoaffinetransformationmeta.c:gst_pad_set_caps
Unexecuted instantiation: gstvideocodecalphameta.c:gst_pad_set_caps
Unexecuted instantiation: gstvideoaggregator.c:gst_pad_set_caps
Unexecuted instantiation: gstvideodecoder.c:gst_pad_set_caps
Unexecuted instantiation: gstvideodmabufpool.c:gst_pad_set_caps
Unexecuted instantiation: gstvideoencoder.c:gst_pad_set_caps
Unexecuted instantiation: gstvideofilter.c:gst_pad_set_caps
Unexecuted instantiation: gstvideometa.c:gst_pad_set_caps
Unexecuted instantiation: gstvideopool.c:gst_pad_set_caps
Unexecuted instantiation: gstvideosink.c:gst_pad_set_caps
Unexecuted instantiation: gstvideotimecode.c:gst_pad_set_caps
Unexecuted instantiation: gstvideoutils.c:gst_pad_set_caps
Unexecuted instantiation: gstvideoutilsprivate.c:gst_pad_set_caps
Unexecuted instantiation: navigation.c:gst_pad_set_caps
Unexecuted instantiation: video.c:gst_pad_set_caps
Unexecuted instantiation: video-anc.c:gst_pad_set_caps
Unexecuted instantiation: video-blend.c:gst_pad_set_caps
Unexecuted instantiation: video-chroma.c:gst_pad_set_caps
Unexecuted instantiation: video-color.c:gst_pad_set_caps
Unexecuted instantiation: video-converter.c:gst_pad_set_caps
Unexecuted instantiation: video-dither.c:gst_pad_set_caps
Unexecuted instantiation: video-event.c:gst_pad_set_caps
Unexecuted instantiation: video-format.c:gst_pad_set_caps
Unexecuted instantiation: video-frame.c:gst_pad_set_caps
Unexecuted instantiation: video-hdr.c:gst_pad_set_caps
Unexecuted instantiation: video-info.c:gst_pad_set_caps
Unexecuted instantiation: video-info-dma.c:gst_pad_set_caps
Unexecuted instantiation: video-multiview.c:gst_pad_set_caps
Unexecuted instantiation: video-resampler.c:gst_pad_set_caps
Unexecuted instantiation: video-scaler.c:gst_pad_set_caps
Unexecuted instantiation: video-sei.c:gst_pad_set_caps
Unexecuted instantiation: video-tile.c:gst_pad_set_caps
Unexecuted instantiation: video-overlay-composition.c:gst_pad_set_caps
Unexecuted instantiation: videodirection.c:gst_pad_set_caps
Unexecuted instantiation: videoorientation.c:gst_pad_set_caps
Unexecuted instantiation: videooverlay.c:gst_pad_set_caps
Unexecuted instantiation: gstdrmdumb.c:gst_pad_set_caps
Unexecuted instantiation: gstdmabuf.c:gst_pad_set_caps
Unexecuted instantiation: gstfdmemory.c:gst_pad_set_caps
Unexecuted instantiation: gstphysmemory.c:gst_pad_set_caps
Unexecuted instantiation: gstshmallocator.c:gst_pad_set_caps
Unexecuted instantiation: gstudmabufallocator.c:gst_pad_set_caps
Unexecuted instantiation: gstadapter.c:gst_pad_set_caps
Unexecuted instantiation: gstaggregator.c:gst_pad_set_caps
Unexecuted instantiation: gstbaseparse.c:gst_pad_set_caps
Unexecuted instantiation: gstbasesink.c:gst_pad_set_caps
Unexecuted instantiation: gstbasesrc.c:gst_pad_set_caps
Unexecuted instantiation: gstbasetransform.c:gst_pad_set_caps
Unexecuted instantiation: gstbitreader.c:gst_pad_set_caps
Unexecuted instantiation: gstbitwriter.c:gst_pad_set_caps
Unexecuted instantiation: gstbytereader.c:gst_pad_set_caps
Unexecuted instantiation: gstbytewriter.c:gst_pad_set_caps
Unexecuted instantiation: gstcollectpads.c:gst_pad_set_caps
Unexecuted instantiation: gstdataqueue.c:gst_pad_set_caps
Unexecuted instantiation: gstflowcombiner.c:gst_pad_set_caps
Unexecuted instantiation: gstpushsrc.c:gst_pad_set_caps
Unexecuted instantiation: gstqueuearray.c:gst_pad_set_caps
Unexecuted instantiation: gsttypefindhelper.c:gst_pad_set_caps
Unexecuted instantiation: audio-enumtypes.c:gst_pad_set_caps
Unexecuted instantiation: audio.c:gst_pad_set_caps
Unexecuted instantiation: audio-buffer.c:gst_pad_set_caps
Unexecuted instantiation: audio-channel-mixer.c:gst_pad_set_caps
Unexecuted instantiation: audio-channels.c:gst_pad_set_caps
Unexecuted instantiation: audio-converter.c:gst_pad_set_caps
Unexecuted instantiation: audio-format.c:gst_pad_set_caps
Unexecuted instantiation: audio-info.c:gst_pad_set_caps
Unexecuted instantiation: audio-quantize.c:gst_pad_set_caps
Unexecuted instantiation: audio-resampler.c:gst_pad_set_caps
Unexecuted instantiation: gstaudioaggregator.c:gst_pad_set_caps
Unexecuted instantiation: gstaudiobasesink.c:gst_pad_set_caps
Unexecuted instantiation: gstaudiobasesrc.c:gst_pad_set_caps
Unexecuted instantiation: gstaudiocdsrc.c:gst_pad_set_caps
Unexecuted instantiation: gstaudioclock.c:gst_pad_set_caps
gstaudiodecoder.c:gst_pad_set_caps
Line
Count
Source
49
68
{
50
68
  GstEvent *event;
51
68
  gboolean res = TRUE;
52
53
68
  g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
54
68
  g_return_val_if_fail (caps != NULL && gst_caps_is_fixed (caps), FALSE);
55
56
68
  event = gst_event_new_caps (caps);
57
58
68
  if (GST_PAD_IS_SRC (pad))
59
68
    res = gst_pad_push_event (pad, event);
60
0
  else
61
0
    res = gst_pad_send_event (pad, event);
62
63
68
  return res;
64
68
}
Unexecuted instantiation: gstaudioencoder.c:gst_pad_set_caps
Unexecuted instantiation: gstaudiofilter.c:gst_pad_set_caps
Unexecuted instantiation: gstaudioiec61937.c:gst_pad_set_caps
Unexecuted instantiation: gstaudiometa.c:gst_pad_set_caps
Unexecuted instantiation: gstaudioringbuffer.c:gst_pad_set_caps
Unexecuted instantiation: gstaudiosink.c:gst_pad_set_caps
Unexecuted instantiation: gstaudiosrc.c:gst_pad_set_caps
Unexecuted instantiation: gstaudioutilsprivate.c:gst_pad_set_caps
Unexecuted instantiation: streamvolume.c:gst_pad_set_caps
Unexecuted instantiation: gstaudiostreamalign.c:gst_pad_set_caps
Unexecuted instantiation: gstdsd.c:gst_pad_set_caps
Unexecuted instantiation: gstdsdformat.c:gst_pad_set_caps
Unexecuted instantiation: audio-resampler-x86-sse.c:gst_pad_set_caps
Unexecuted instantiation: audio-resampler-x86-sse2.c:gst_pad_set_caps
Unexecuted instantiation: audio-resampler-x86-sse41.c:gst_pad_set_caps
Unexecuted instantiation: tag-enumtypes.c:gst_pad_set_caps
Unexecuted instantiation: gstvorbistag.c:gst_pad_set_caps
Unexecuted instantiation: gstid3tag.c:gst_pad_set_caps
Unexecuted instantiation: gstxmptag.c:gst_pad_set_caps
Unexecuted instantiation: gstexiftag.c:gst_pad_set_caps
Unexecuted instantiation: lang.c:gst_pad_set_caps
Unexecuted instantiation: licenses.c:gst_pad_set_caps
Unexecuted instantiation: tags.c:gst_pad_set_caps
Unexecuted instantiation: gsttagdemux.c:gst_pad_set_caps
Unexecuted instantiation: gsttagmux.c:gst_pad_set_caps
Unexecuted instantiation: gsttageditingprivate.c:gst_pad_set_caps
Unexecuted instantiation: id3v2.c:gst_pad_set_caps
Unexecuted instantiation: id3v2frames.c:gst_pad_set_caps
Unexecuted instantiation: xmpwriter.c:gst_pad_set_caps
65
66
67
#ifndef GST_DISABLE_DEPRECATED
68
69
/* added to ease the transition to 0.11 */
70
#define gst_element_class_set_details_simple  gst_element_class_set_metadata
71
72
#define gst_element_factory_get_longname(f)    gst_element_factory_get_metadata(f, GST_ELEMENT_METADATA_LONGNAME)
73
#define gst_element_factory_get_klass(f)       gst_element_factory_get_metadata(f, GST_ELEMENT_METADATA_KLASS)
74
#define gst_element_factory_get_description(f) gst_element_factory_get_metadata(f, GST_ELEMENT_METADATA_DESCRIPTION)
75
#define gst_element_factory_get_author(f)      gst_element_factory_get_metadata(f, GST_ELEMENT_METADATA_AUTHOR)
76
#define gst_element_factory_get_documentation_uri(f)  gst_element_factory_get_metadata(f, GST_ELEMENT_METADATA_DOC_URI)
77
#define gst_element_factory_get_icon_name(f)   gst_element_factory_get_metadata(f, GST_ELEMENT_METADATA_ICON_NAME)
78
79
#define gst_pad_get_caps_reffed(p)             gst_pad_get_caps(p)
80
#define gst_pad_peer_get_caps_reffed(p)        gst_pad_peer_get_caps(p)
81
82
#define gst_adapter_prev_timestamp    gst_adapter_prev_pts
83
84
#define gst_tag_list_free(taglist)    gst_tag_list_unref(taglist)
85
86
#define GST_MESSAGE_DURATION GST_MESSAGE_DURATION_CHANGED
87
#define gst_message_new_duration(src,fmt,dur) \
88
    gst_message_new_duration_changed(src)
89
#define gst_message_parse_duration(msg,fmt,dur) \
90
G_STMT_START { \
91
  GstFormat *p_fmt = fmt; \
92
  gint64 *p_dur = dur; \
93
  if (p_fmt) \
94
    *p_fmt = GST_FORMAT_TIME; \
95
  if (p_dur) \
96
    *p_dur = GST_CLOCK_TIME_NONE; \
97
} G_STMT_END
98
99
#endif /* not GST_DISABLE_DEPRECATED */
100
101
G_END_DECLS
102
103
#endif /* __GSTCOMPAT_H__ */