36 switch (GST_MESSAGE_TYPE(msg)) {
37 case GST_MESSAGE_ERROR:
61 g_object_get(orig, pspec->name, &video->
appsrc, NULL);
63 g_signal_connect(video->
appsrc,
"need-data",
65 g_signal_connect(video->
appsrc,
"enough-data",
96 video->
playbin = gst_element_factory_make(
"playbin2", NULL);
102 bus = gst_pipeline_get_bus(GST_PIPELINE(video->
playbin));
104 gst_object_unref(bus);
106 g_object_set(video->
playbin,
"uri",
"appsrc://", NULL);
107 g_signal_connect(video->
playbin,
"deep-notify::source",
112 gst_element_set_state(video->
playbin, GST_STATE_PLAYING);
126 buffer = gst_buffer_new();
127 GST_BUFFER_DATA(
buffer) = (guint8 *) data;
131 g_signal_emit_by_name(video->
appsrc,
"push-buffer",
buffer, &ret);
133 return ret == GST_FLOW_OK;
142 g_signal_emit_by_name(video->
appsrc,
"end-of-stream", &ret);
146 return ret == GST_FLOW_OK;
153 gst_element_set_state(video->
playbin, GST_STATE_NULL);
154 gst_object_unref(video->
playbin);
static osspriteop_area * buffer
The buffer characteristics.
nserror content__init(struct content *c, const content_handler *handler, lwc_string *imime_type, const struct http_parameter *params, llcache_handle *llcache, const char *fallback_charset, bool quirks)
Protected interface to Content handling.
content_type
The type of a content.
@ CONTENT_IMAGE
All images.
nserror
Enumeration of error codes.
@ NSERROR_NOMEM
Memory exhaustion.
@ NSERROR_CLONE_FAILED
Failed to clone handle.
static struct llcache_s * llcache
low level cache state
nserror llcache_handle_force_stream(llcache_handle *handle)
Force a low-level cache handle into streaming mode.
Content operation function table.
nserror(* create)(const struct content_handler *handler, lwc_string *imime_type, const struct http_parameter *params, struct llcache_handle *llcache, const char *fallback_charset, bool quirks, struct content **c)
parameters to content redraw
Content which corresponds to a single URL.
bool quirks
Content is in quirks mode.
char * fallback_charset
Fallback charset, or NULL.
const struct content_handler * handler
Handler for content.
struct textsearch_context * context
unsigned int size
Estimated size of all data associated with this content.
Representation of an HTTP parameter.
Handle to low-level cache object.
static void nsvideo_need_data_event(GstElement *playbin, guint size, nsvideo_content *video)
struct nsvideo_content nsvideo_content
static const content_handler nsvideo_content_handler
static void * nsvideo_get_internal(const struct content *c, void *context)
static bool nsvideo_redraw(struct content *c, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx)
static gboolean nsvideo_bus_call(GstBus *bus, GstMessage *msg, nsvideo_content *video)
static void nsvideo_destroy(struct content *c)
static void nsvideo_enough_data_event(GstElement *playbin, nsvideo_content *video)
CONTENT_FACTORY_REGISTER_TYPES(nsvideo, nsvideo_types, nsvideo_content_handler)
static content_type nsvideo_type(void)
static nserror nsvideo_create(const content_handler *handler, lwc_string *imime_type, const http_parameter *params, llcache_handle *llcache, const char *fallback_charset, bool quirks, struct content **c)
static nserror nsvideo_clone(const struct content *old, struct content **newc)
static const char * nsvideo_types[]
static bool nsvideo_process_data(struct content *c, const char *data, unsigned int size)
static void nsvideo_source_event(GObject *object, GObject *orig, GParamSpec *pspec, nsvideo_content *video)
static bool nsvideo_convert(struct content *c)
static nserror clip(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.