diff options
author | Armin Weatherwax | 2010-09-07 10:26:01 +0200 |
---|---|---|
committer | Armin Weatherwax | 2010-09-23 15:38:26 +0200 |
commit | 9d37fb4eeb15f7ac35ebaa3fd7c5cc11e5b1a1dc (patch) | |
tree | fd86b97c3603d8c8f678b4c1be4de9b45f2555e6 /linden/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp | |
parent | lost in merge: 1 debug setting, some member variables from llpanellandmedia (diff) | |
download | meta-impy-9d37fb4eeb15f7ac35ebaa3fd7c5cc11e5b1a1dc.zip meta-impy-9d37fb4eeb15f7ac35ebaa3fd7c5cc11e5b1a1dc.tar.gz meta-impy-9d37fb4eeb15f7ac35ebaa3fd7c5cc11e5b1a1dc.tar.bz2 meta-impy-9d37fb4eeb15f7ac35ebaa3fd7c5cc11e5b1a1dc.tar.xz |
First LL update of plugins, mainly documentation
Diffstat (limited to 'linden/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp')
-rw-r--r-- | linden/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/linden/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp b/linden/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp index 25e96d4..ef8ff58 100644 --- a/linden/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp +++ b/linden/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp | |||
@@ -52,7 +52,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_slvideo_debug); | |||
52 | #define SLV_ALLCAPS GST_VIDEO_CAPS_RGBx SLV_SIZECAPS | 52 | #define SLV_ALLCAPS GST_VIDEO_CAPS_RGBx SLV_SIZECAPS |
53 | 53 | ||
54 | static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ( | 54 | static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ( |
55 | (gchar*)"sink", | 55 | "sink", |
56 | GST_PAD_SINK, | 56 | GST_PAD_SINK, |
57 | GST_PAD_ALWAYS, | 57 | GST_PAD_ALWAYS, |
58 | GST_STATIC_CAPS (SLV_ALLCAPS) | 58 | GST_STATIC_CAPS (SLV_ALLCAPS) |
@@ -106,11 +106,10 @@ gst_slvideo_show_frame (GstBaseSink * bsink, GstBuffer * buf) | |||
106 | 106 | ||
107 | slvideo = GST_SLVIDEO(bsink); | 107 | slvideo = GST_SLVIDEO(bsink); |
108 | 108 | ||
109 | #if 0 | 109 | DEBUGMSG("transferring a frame of %dx%d <- %p (%d)", |
110 | fprintf(stderr, "\n\ntransferring a frame of %dx%d <- %p (%d)\n\n", | 110 | slvideo->width, slvideo->height, GST_BUFFER_DATA(buf), |
111 | slvideo->width, slvideo->height, GST_BUFFER_DATA(buf), | 111 | slvideo->format); |
112 | slvideo->format); | 112 | |
113 | #endif | ||
114 | if (GST_BUFFER_DATA(buf)) | 113 | if (GST_BUFFER_DATA(buf)) |
115 | { | 114 | { |
116 | // copy frame and frame info into neutral territory | 115 | // copy frame and frame info into neutral territory |
@@ -335,7 +334,7 @@ gst_slvideo_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size, | |||
335 | #define MAXDEPTHHACK 4 | 334 | #define MAXDEPTHHACK 4 |
336 | 335 | ||
337 | GST_OBJECT_LOCK(slvideo); | 336 | GST_OBJECT_LOCK(slvideo); |
338 | if (slvideo->resize_forced) | 337 | if (slvideo->resize_forced_always) // app is giving us a fixed size to work with |
339 | { | 338 | { |
340 | gint slwantwidth, slwantheight; | 339 | gint slwantwidth, slwantheight; |
341 | slwantwidth = slvideo->resize_try_width; | 340 | slwantwidth = slvideo->resize_try_width; |
@@ -384,6 +383,8 @@ gst_slvideo_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size, | |||
384 | } | 383 | } |
385 | } | 384 | } |
386 | 385 | ||
386 | GST_OBJECT_UNLOCK(slvideo); | ||
387 | |||
387 | if (!made_bufferdata_ptr) // need to fallback to malloc at original size | 388 | if (!made_bufferdata_ptr) // need to fallback to malloc at original size |
388 | { | 389 | { |
389 | GST_BUFFER_SIZE(newbuf) = width * height * MAXDEPTHHACK; | 390 | GST_BUFFER_SIZE(newbuf) = width * height * MAXDEPTHHACK; |
@@ -392,8 +393,6 @@ gst_slvideo_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size, | |||
392 | llgst_buffer_set_caps (GST_BUFFER_CAST(newbuf), caps); | 393 | llgst_buffer_set_caps (GST_BUFFER_CAST(newbuf), caps); |
393 | } | 394 | } |
394 | 395 | ||
395 | GST_OBJECT_UNLOCK(slvideo); | ||
396 | |||
397 | *buf = GST_BUFFER_CAST(newbuf); | 396 | *buf = GST_BUFFER_CAST(newbuf); |
398 | 397 | ||
399 | return GST_FLOW_OK; | 398 | return GST_FLOW_OK; |
@@ -457,7 +456,7 @@ gst_slvideo_init (GstSLVideo * filter, | |||
457 | filter->retained_frame_format = SLV_PF_UNKNOWN; | 456 | filter->retained_frame_format = SLV_PF_UNKNOWN; |
458 | GstCaps *caps = llgst_caps_from_string (SLV_ALLCAPS); | 457 | GstCaps *caps = llgst_caps_from_string (SLV_ALLCAPS); |
459 | llgst_caps_replace (&filter->caps, caps); | 458 | llgst_caps_replace (&filter->caps, caps); |
460 | filter->resize_forced = false; | 459 | filter->resize_forced_always = false; |
461 | filter->resize_try_width = -1; | 460 | filter->resize_try_width = -1; |
462 | filter->resize_try_height = -1; | 461 | filter->resize_try_height = -1; |
463 | GST_OBJECT_UNLOCK(filter); | 462 | GST_OBJECT_UNLOCK(filter); |
@@ -498,12 +497,12 @@ gst_slvideo_get_property (GObject * object, guint prop_id, | |||
498 | static gboolean | 497 | static gboolean |
499 | plugin_init (GstPlugin * plugin) | 498 | plugin_init (GstPlugin * plugin) |
500 | { | 499 | { |
501 | DEBUGMSG("\n\n\nPLUGIN INIT\n\n\n"); | 500 | DEBUGMSG("PLUGIN INIT"); |
502 | 501 | ||
503 | GST_DEBUG_CATEGORY_INIT (gst_slvideo_debug, (gchar*)"private-slvideo-plugin", | 502 | GST_DEBUG_CATEGORY_INIT (gst_slvideo_debug, (gchar*)"private-slvideo-plugin", |
504 | 0, (gchar*)"Second Life Video Sink"); | 503 | 0, (gchar*)"Second Life Video Sink"); |
505 | 504 | ||
506 | return llgst_element_register (plugin, (gchar*)"private-slvideo", | 505 | return llgst_element_register (plugin, "private-slvideo", |
507 | GST_RANK_NONE, GST_TYPE_SLVIDEO); | 506 | GST_RANK_NONE, GST_TYPE_SLVIDEO); |
508 | } | 507 | } |
509 | 508 | ||
@@ -519,14 +518,14 @@ void gst_slvideo_init_class (void) | |||
519 | // this macro quietly refers to PACKAGE internally | 518 | // this macro quietly refers to PACKAGE internally |
520 | static GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, | 519 | static GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, |
521 | GST_VERSION_MINOR, | 520 | GST_VERSION_MINOR, |
522 | (gchar*)"private-slvideoplugin", | 521 | "private-slvideoplugin", |
523 | (gchar*)"SL Video sink plugin", | 522 | "SL Video sink plugin", |
524 | plugin_init, (gchar*)"0.1", (gchar*)GST_LICENSE_UNKNOWN, | 523 | plugin_init, "0.1", GST_LICENSE_UNKNOWN, |
525 | (gchar*)"Second Life", | 524 | "Second Life", |
526 | (gchar*)"http://www.secondlife.com/"); | 525 | "http://www.secondlife.com/"); |
527 | #undef PACKAGE | 526 | #undef PACKAGE |
528 | ll_gst_plugin_register_static (&gst_plugin_desc); | 527 | ll_gst_plugin_register_static (&gst_plugin_desc); |
529 | DEBUGMSG(stderr, "\n\n\nCLASS INIT\n\n\n"); | 528 | DEBUGMSG("CLASS INIT"); |
530 | } | 529 | } |
531 | 530 | ||
532 | #endif // LL_GSTREAMER010_ENABLED | 531 | #endif // LL_GSTREAMER010_ENABLED |