type
stringclasses
5 values
content
stringlengths
9
163k
defines
#define DEFAULT_FRAGMENTS_CACHE 3
defines
#define DEFAULT_FAILED_COUNT 3
defines
#define DEFAULT_BITRATE_LIMIT 0.8
defines
#define DEFAULT_CONNECTION_SPEED 0
functions
void _do_init (GType type) { GST_DEBUG_CATEGORY_INIT (gst_hls_demux_debug, "hlsdemux", 0, "hlsdemux element"); }
functions
void gst_hls_demux_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); gst_element_class_add_static_pad_template (element_class, &srctemplate); gst_element_class_add_static_pad_template (element_class, &sinktemplate); gst_element_class_set_details_simple (element_clas...
functions
void gst_hls_demux_dispose (GObject * obj) { GstHLSDemux *demux = GST_HLS_DEMUX (obj); if (demux->stream_task) { if (GST_TASK_STATE (demux->stream_task) != GST_TASK_STOPPED) { GST_DEBUG_OBJECT (demux, "Leaving streaming task"); gst_task_stop (demux->stream_task); g_static_rec_mutex_lock (&dem...
functions
void gst_hls_demux_class_init (GstHLSDemuxClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gobject_class->set_property = gst_hls_demux_set_property; gobject_class->get_property = gst_hls_d...
functions
void gst_hls_demux_init (GstHLSDemux * demux, GstHLSDemuxClass * klass) { /* sink pad */ demux->sinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink"); gst_pad_set_chain_function (demux->sinkpad, GST_DEBUG_FUNCPTR (gst_hls_demux_chain)); gst_pad_set_event_function (demux->sinkpad, GST_DE...
functions
void gst_hls_demux_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstHLSDemux *demux = GST_HLS_DEMUX (object); switch (prop_id) { case PROP_FRAGMENTS_CACHE: demux->fragments_cache = g_value_get_uint (value); break; case PROP_BITRATE_LIMIT: d...
functions
void gst_hls_demux_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstHLSDemux *demux = GST_HLS_DEMUX (object); switch (prop_id) { case PROP_FRAGMENTS_CACHE: g_value_set_uint (value, demux->fragments_cache); break; case PROP_BITRATE_LIMIT: g_value_...
functions
GstStateChangeReturn gst_hls_demux_change_state (GstElement * element, GstStateChange transition) { GstStateChangeReturn ret; GstHLSDemux *demux = GST_HLS_DEMUX (element); switch (transition) { case GST_STATE_CHANGE_READY_TO_PAUSED: gst_hls_demux_reset (demux, FALSE); break; case GST_STATE_CH...
functions
gboolean gst_hls_demux_src_event (GstPad * pad, GstEvent * event) { GstHLSDemux *demux; demux = GST_HLS_DEMUX (gst_pad_get_element_private (pad)); switch (event->type) { case GST_EVENT_SEEK: { gdouble rate; GstFormat format; GstSeekFlags flags; GstSeekType start_type, stop_type; ...
functions
gboolean gst_hls_demux_sink_event (GstPad * pad, GstEvent * event) { GstHLSDemux *demux; GstQuery *query; gboolean ret; gchar *uri; demux = GST_HLS_DEMUX (gst_pad_get_parent (pad)); switch (event->type) { case GST_EVENT_EOS:{ gchar *playlist = NULL; if (demux->playlist == NULL) { ...
functions
gboolean gst_hls_demux_src_query (GstPad * pad, GstQuery * query) { GstHLSDemux *hlsdemux; gboolean ret = FALSE; if (query == NULL) return FALSE; hlsdemux = GST_HLS_DEMUX (gst_pad_get_element_private (pad)); switch (query->type) { case GST_QUERY_DURATION:{ GstClockTime duration = -1; Gs...
functions
GstFlowReturn gst_hls_demux_chain (GstPad * pad, GstBuffer * buf) { GstHLSDemux *demux = GST_HLS_DEMUX (gst_pad_get_parent (pad)); if (demux->playlist == NULL) demux->playlist = buf; else demux->playlist = gst_buffer_join (demux->playlist, buf); gst_object_unref (demux); return GST_FLOW_OK; }
functions
void gst_hls_demux_pause_tasks (GstHLSDemux * demux, gboolean caching) { if (GST_TASK_STATE (demux->updates_task) != GST_TASK_STOPPED) { demux->cancelled = TRUE; gst_uri_downloader_cancel (demux->downloader); gst_task_pause (demux->updates_task); if (!caching) g_mutex_lock (demux->updates_timed_...
functions
void gst_hls_demux_stop (GstHLSDemux * demux) { gst_uri_downloader_cancel (demux->downloader); if (GST_TASK_STATE (demux->updates_task) != GST_TASK_STOPPED) { demux->cancelled = TRUE; gst_uri_downloader_cancel (demux->downloader); gst_task_stop (demux->updates_task); g_mutex_lock (demux->updates_ti...
functions
void switch_pads (GstHLSDemux * demux, GstCaps * newcaps) { GstPad *oldpad = demux->srcpad; GST_DEBUG ("Switching pads (oldpad:%p) with caps: %" GST_PTR_FORMAT, oldpad, newcaps); /* FIXME: This is a workaround for a bug in playsink. * If we're switching from an audio-only or video-only fragment * to...
functions
void gst_hls_demux_stream_loop (GstHLSDemux * demux) { GstFragment *fragment; GstBufferList *buffer_list; GstBuffer *buf; GstFlowReturn ret; /* Loop for the source pad task. The task is started when we have * received the main playlist from the source element. It tries first to * cache the first fragme...
functions
void gst_hls_demux_reset (GstHLSDemux * demux, gboolean dispose) { demux->need_cache = TRUE; demux->end_of_playlist = FALSE; demux->cancelled = FALSE; demux->do_typefind = TRUE; if (demux->input_caps) { gst_caps_unref (demux->input_caps); demux->input_caps = NULL; }
functions
gboolean gst_hls_demux_set_location (GstHLSDemux * demux, const gchar * uri) { if (demux->client) gst_m3u8_client_free (demux->client); demux->client = gst_m3u8_client_new (uri); GST_INFO_OBJECT (demux, "Changed location: %s", uri); return TRUE; }
functions
void gst_hls_demux_updates_loop (GstHLSDemux * demux) { /* Loop for the updates. It's started when the first fragments are cached and * schedules the next update of the playlist (for lives sources) and the next * update of fragments. When a new fragment is downloaded, it compares the * download time with the...
functions
else if (!demux->end_of_playlist && !demux->cancelled) { demux->client->update_failed_count++; if (demux->client->update_failed_count < DEFAULT_FAILED_COUNT) { GST_WARNING_OBJECT (demux, "Could not fetch the next fragment"); continue; }
functions
gboolean gst_hls_demux_cache_fragments (GstHLSDemux * demux) { gint i; /* If this playlist is a variant playlist, select the first one * and update it */ if (gst_m3u8_client_has_variant_playlist (demux->client)) { GstM3U8 *child = NULL; if (demux->connection_speed == 0) { GST_M3U8_CLIENT_LOCK ...
functions
gboolean gst_hls_demux_update_playlist (GstHLSDemux * demux, gboolean update) { GstFragment *download; GstBufferListIterator *it; GstBuffer *buf; gchar *playlist; gboolean updated = FALSE; const gchar *uri = gst_m3u8_client_get_current_uri (demux->client); download = gst_uri_downloader_fetch_uri (demux-...
functions
gboolean gst_hls_demux_change_playlist (GstHLSDemux * demux, guint max_bitrate) { GList *previous_variant, *current_variant; gint old_bandwidth, new_bandwidth; /* If user specifies a connection speed never use a playlist with a bandwidth * superior than it */ if (demux->connection_speed != 0 && max_bitrate ...
functions
gboolean gst_hls_demux_schedule (GstHLSDemux * demux) { gfloat update_factor; gint count; /* As defined in §6.3.4. Reloading the Playlist file: * "If the client reloads a Playlist file and finds that it has not * changed then it MUST wait for a period of time before retrying. The * minimum delay is a m...
functions
gboolean gst_hls_demux_switch_playlist (GstHLSDemux * demux) { GTimeVal now; GstClockTime diff; gsize size; gint bitrate; GstFragment *fragment = g_queue_peek_tail (demux->queue); GST_M3U8_CLIENT_LOCK (demux->client); if (!demux->client->main->lists) { GST_M3U8_CLIENT_UNLOCK (demux->client); retu...
functions
gboolean gst_hls_demux_get_next_fragment (GstHLSDemux * demux, gboolean caching) { GstFragment *download; const gchar *next_fragment_uri; GstClockTime duration; GstClockTime timestamp; GstBufferList *buffer_list; GstBuffer *buf; gboolean discont; if (!gst_m3u8_client_get_next_fragment (demux->client, &...
includes
#include <linux/config.h>
includes
#include <linux/module.h>
includes
#include <linux/ip.h>
includes
#include <linux/tcp.h>
includes
#include <net/tcp.h>
includes
#include <linux/netfilter_ipv4/ip_nat.h>
includes
#include <linux/netfilter_ipv4/ip_nat_rule.h>
includes
#include <linux/netfilter_ipv4/ip_nat_helper.h>
includes
#include <linux/netfilter_ipv4/ip_nat_pptp.h>
includes
#include <linux/netfilter_ipv4/ip_conntrack_core.h>
includes
#include <linux/netfilter_ipv4/ip_conntrack_helper.h>
includes
#include <linux/netfilter_ipv4/ip_conntrack_proto_gre.h>
includes
#include <linux/netfilter_ipv4/ip_conntrack_pptp.h>
defines
#define IP_NAT_PPTP_VERSION "3.0"
defines
#define REQ_CID(req, off) (*(u_int16_t *)((char *)(req) + (off)))
defines
#define DEBUGP(format, args...) printk(KERN_DEBUG "%s:%s: " format, __FILE__, \
defines
#define DEBUGP(format, args...)
functions
void pptp_nat_expected(struct ip_conntrack *ct, struct ip_conntrack_expect *exp) { struct ip_conntrack *master = ct->master; struct ip_conntrack_expect *other_exp; struct ip_conntrack_tuple t; struct ip_ct_pptp_master *ct_pptp_info; struct ip_nat_pptp *nat_pptp_info; struct ip_nat_range range; ct_pptp_...
functions
int pptp_outbound_pkt(struct sk_buff **pskb, struct ip_conntrack *ct, enum ip_conntrack_info ctinfo, struct PptpControlHeader *ctlh, union pptp_ctrl_union *pptpReq) { struct ip_ct_pptp_master *ct_pptp_info = &ct->help.ct_pptp_info; struct ip_nat_pptp *nat_pptp_info = &ct->nat.help.nat_pptp_info; u_i...
functions
int pptp_exp_gre(struct ip_conntrack_expect *expect_orig, struct ip_conntrack_expect *expect_reply) { struct ip_ct_pptp_master *ct_pptp_info = &expect_orig->master->help.ct_pptp_info; struct ip_nat_pptp *nat_pptp_info = &expect_orig->master->nat.help.nat_pptp_info; struct ip_conntrack *ct = expect_o...
functions
int pptp_inbound_pkt(struct sk_buff **pskb, struct ip_conntrack *ct, enum ip_conntrack_info ctinfo, struct PptpControlHeader *ctlh, union pptp_ctrl_union *pptpReq) { struct ip_nat_pptp *nat_pptp_info = &ct->nat.help.nat_pptp_info; u_int16_t msg, new_cid = 0, new_pcid; unsigned int pcid_off, cid_off = 0; ...
functions
__init ip_nat_helper_pptp_init(void) { int ret; DEBUGP("%s: registering NAT helper\n", __FILE__); ret = ip_nat_proto_gre_init(); if (ret < 0) return ret; BUG_ON(ip_nat_pptp_hook_outbound); ip_nat_pptp_hook_outbound = &pptp_outbound_pkt; BUG_ON(ip_nat_pptp_hook_inbound); ip_nat_pptp_hook_inbound = &pptp_in...
functions
__exit ip_nat_helper_pptp_fini(void) { DEBUGP("cleanup_module\n" ); ip_nat_pptp_hook_expectfn = NULL; ip_nat_pptp_hook_exp_gre = NULL; ip_nat_pptp_hook_inbound = NULL; ip_nat_pptp_hook_outbound = NULL; ip_nat_proto_gre_fini(); /* Make sure noone calls it, meanwhile */ synchronize_net(); printk("ip_nat_pptp ...
includes
#include <linux/kernel.h>
includes
#include <linux/bitops.h>
includes
#include <linux/interrupt.h>
includes
#include <linux/irq.h>
includes
#include <linux/irqchip.h>
includes
#include <linux/io.h>
includes
#include <linux/device.h>
includes
#include <linux/gpio.h>
includes
#include <clocksource/samsung_pwm.h>
includes
#include <linux/sched.h>
includes
#include <linux/serial_core.h>
includes
#include <linux/of.h>
includes
#include <linux/of_fdt.h>
includes
#include <linux/of_irq.h>
includes
#include <linux/of_platform.h>
includes
#include <linux/pm_domain.h>
includes
#include <linux/export.h>
includes
#include <linux/irqdomain.h>
includes
#include <linux/of_address.h>
includes
#include <linux/irqchip/arm-gic.h>
includes
#include <linux/irqchip/chained_irq.h>
includes
#include <linux/platform_device.h>
includes
#include <asm/proc-fns.h>
includes
#include <asm/exception.h>
includes
#include <asm/hardware/cache-l2x0.h>
includes
#include <asm/mach/map.h>
includes
#include <asm/mach/irq.h>
includes
#include <asm/cacheflush.h>
includes
#include <plat/cpu.h>
includes
#include <plat/pm.h>
includes
#include <plat/regs-serial.h>
includes
#include <asm/mach/arch.h>
includes
#include <plat/mfc.h>
functions
void exynos_restart(enum reboot_mode mode, const char *cmd) { struct device_node *np; u32 val = 0x1; void __iomem *addr = pmu_base_addr + EXYNOS_SWRESET; if (of_machine_is_compatible("samsung,exynos5440")) { u32 status; np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock"...
functions
__init exynos_sysram_init(void) { struct device_node *node; for_each_compatible_node(node, NULL, "samsung,exynos4210-sysram") { if (!of_device_is_available(node)) continue; sysram_base_addr = of_iomap(node, 0); break; }
functions
__init exynos_init_late(void) { if (of_machine_is_compatible("samsung,exynos5440")) /* to be supported later */ return; pm_genpd_poweroff_unused(); exynos_pm_init(); }
functions
__init exynos_fdt_map_chipid(unsigned long node, const char *uname, int depth, void *data) { struct map_desc iodesc; const __be32 *reg; unsigned long len; if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") && !of_flat_dt_is_compatible(node, "samsung,exynos5440-...
functions
__init exynos_map_io(void) { if (soc_is_exynos4()) iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc)); if (soc_is_exynos5()) iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); }
functions
__init exynos_init_io(void) { debug_ll_io_init(); of_scan_flat_dt(exynos_fdt_map_chipid, NULL); /* detect cpu id and rev. */ s5p_init_cpu(S5P_VA_CHIPID); exynos_map_io(); }
functions
void exynos_map_pmu(void) { struct device_node *np; np = of_find_matching_node(NULL, exynos_dt_pmu_match); if (np) pmu_base_addr = of_iomap(np, 0); if (!pmu_base_addr) panic("failed to find exynos pmu register\n"); }
functions
__init exynos_init_irq(void) { irqchip_init(); /* * Since platsmp.c needs pmu base address by the time * DT is not unflatten so we can't use DT APIs before * init_irq */ exynos_map_pmu(); }
functions
__init exynos_dt_machine_init(void) { struct device_node *i2c_np; const char *i2c_compat = "samsung,s3c2440-i2c"; unsigned int tmp; int id; /* * Exynos5's legacy i2c controller and new high speed i2c * controller have muxed interrupt sources. By default the * interrupts for 4-channel...
includes
#include <linux/module.h>
includes
#include <linux/errno.h>
includes
#include <linux/fs.h>
includes
#include <linux/sched.h>
includes
#include <linux/file.h>