mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
mpegtsbase: Speed up _is_psi()
By making it inline and simplifying the bit macros
This commit is contained in:
parent
c5664dcda7
commit
a633347ed1
2 changed files with 5 additions and 5 deletions
|
@ -752,12 +752,13 @@ mpegts_base_activate_program (MpegTSBase * base, MpegTSBaseProgram * program,
|
|||
GST_DEBUG_OBJECT (base, "new pmt %" GST_PTR_FORMAT, pmt_info);
|
||||
}
|
||||
|
||||
gboolean
|
||||
static inline gboolean
|
||||
mpegts_base_is_psi (MpegTSBase * base, MpegTSPacketizerPacket * packet)
|
||||
{
|
||||
gboolean retval = FALSE;
|
||||
guint8 *data, table_id, pointer;
|
||||
int i;
|
||||
|
||||
static const guint8 si_tables[] =
|
||||
{ 0x00, 0x01, 0x02, 0x03, 0x40, 0x41, 0x42, 0x46, 0x4A,
|
||||
0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
|
||||
|
|
|
@ -176,9 +176,9 @@ struct _MpegTSBaseClass {
|
|||
void (*eit_info) (GstStructure *eit);
|
||||
};
|
||||
|
||||
#define MPEGTS_BIT_SET(field, offs) ((field)[(offs) / 8] |= (1 << ((offs) % 8)))
|
||||
#define MPEGTS_BIT_UNSET(field, offs) ((field)[(offs) / 8] &= ~(1 << ((offs) % 8)))
|
||||
#define MPEGTS_BIT_IS_SET(field, offs) ((field)[(offs) / 8] & (1 << ((offs) % 8)))
|
||||
#define MPEGTS_BIT_SET(field, offs) ((field)[(offs) >> 3] |= (1 << ((offs) & 0xf)))
|
||||
#define MPEGTS_BIT_UNSET(field, offs) ((field)[(offs) >> 3] &= ~(1 << ((offs) & 0xf)))
|
||||
#define MPEGTS_BIT_IS_SET(field, offs) ((field)[(offs) >> 3] & (1 << ((offs) & 0xf)))
|
||||
|
||||
GType mpegts_base_get_type(void);
|
||||
|
||||
|
@ -193,7 +193,6 @@ mpegts_base_handle_seek_event(MpegTSBase * base, GstPad * pad, GstEvent * event)
|
|||
|
||||
gboolean gst_mpegtsbase_plugin_init (GstPlugin * plugin);
|
||||
|
||||
gboolean mpegts_base_is_psi (MpegTSBase * base, MpegTSPacketizerPacket * packet);
|
||||
gboolean mpegts_base_handle_psi (MpegTSBase * base, MpegTSPacketizerSection * section);
|
||||
|
||||
void mpegts_base_program_remove_stream (MpegTSBase * base, MpegTSBaseProgram * program, guint16 pid);
|
||||
|
|
Loading…
Reference in a new issue