mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
media: dvb: dvb-core: Expose API for section filtering
Expose API from dvb_demux that performs only section filtering without handling PES and Recording for cases where PES/Recording is handled in HW while section filtering is done in SW Change-Id: I46cd0f778a63ef1a3230d230e24c578441428e19 Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
This commit is contained in:
parent
669e9398c0
commit
bdf616e652
2 changed files with 48 additions and 0 deletions
|
@ -685,6 +685,52 @@ static void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf)
|
|||
}
|
||||
}
|
||||
|
||||
void dvb_dmx_swfilter_section_packets(struct dvb_demux *demux, const u8 *buf,
|
||||
size_t count)
|
||||
{
|
||||
struct dvb_demux_feed *feed;
|
||||
u16 pid = ts_pid(buf);
|
||||
struct timespec pre_time;
|
||||
|
||||
if (dvb_demux_performancecheck)
|
||||
pre_time = current_kernel_time();
|
||||
|
||||
spin_lock(&demux->lock);
|
||||
|
||||
demux->sw_filter_abort = 0;
|
||||
|
||||
while (count--) {
|
||||
if (buf[0] != 0x47) {
|
||||
buf += 188;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (demux->playback_mode == DMX_PB_MODE_PULL)
|
||||
if (dvb_dmx_swfilter_buffer_check(demux, pid) < 0)
|
||||
break;
|
||||
|
||||
list_for_each_entry(feed, &demux->feed_list, list_head) {
|
||||
if (feed->pid != pid)
|
||||
continue;
|
||||
|
||||
if (!feed->feed.sec.is_filtering)
|
||||
continue;
|
||||
|
||||
if (dvb_dmx_swfilter_section_packet(feed, buf) < 0) {
|
||||
feed->feed.sec.seclen = 0;
|
||||
feed->feed.sec.secbufp = 0;
|
||||
}
|
||||
}
|
||||
buf += 188;
|
||||
}
|
||||
|
||||
spin_unlock(&demux->lock);
|
||||
|
||||
if (dvb_demux_performancecheck)
|
||||
demux->total_process_time += dvb_dmx_calc_time_delta(pre_time);
|
||||
}
|
||||
EXPORT_SYMBOL(dvb_dmx_swfilter_section_packets);
|
||||
|
||||
void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf,
|
||||
size_t count)
|
||||
{
|
||||
|
|
|
@ -179,6 +179,8 @@ struct dvb_demux {
|
|||
|
||||
int dvb_dmx_init(struct dvb_demux *dvbdemux);
|
||||
void dvb_dmx_release(struct dvb_demux *dvbdemux);
|
||||
void dvb_dmx_swfilter_section_packets(struct dvb_demux *demux, const u8 *buf,
|
||||
size_t count);
|
||||
void dvb_dmx_swfilter_packets(struct dvb_demux *dvbdmx, const u8 *buf,
|
||||
size_t count);
|
||||
void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count);
|
||||
|
|
Loading…
Reference in a new issue