diff options
author | David Seikel | 2011-03-20 17:02:40 +1000 |
---|---|---|
committer | David Seikel | 2011-03-20 17:02:40 +1000 |
commit | 8c15fcec590c68337b8aa05d17793cd3c2a48068 (patch) | |
tree | e233ecfa79c6fe22f47dc0eba44c0300dc0daa71 /linden/indra/media_plugins/gstreamer010 | |
parent | The half arsed IRC support was broken. It's still not working, though it wor... (diff) | |
parent | Merge remote-tracking branch 'jacek/exp' into exp (diff) | |
download | meta-impy-8c15fcec590c68337b8aa05d17793cd3c2a48068.zip meta-impy-8c15fcec590c68337b8aa05d17793cd3c2a48068.tar.gz meta-impy-8c15fcec590c68337b8aa05d17793cd3c2a48068.tar.bz2 meta-impy-8c15fcec590c68337b8aa05d17793cd3c2a48068.tar.xz |
Merge remote-tracking branch 'mccabe/exp' into weekly
Conflicts: (Keeping these around as a record, there was some strangeness.
.gitignore
linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
linden/indra/newview/llfloaterregioninfo.cpp
linden/indra/newview/llfloatertos.cpp
linden/indra/newview/llpanellogin.cpp
linden/indra/newview/skins/default/html/en-us/loading-error/index.html
linden/indra/newview/skins/default/html/en-us/loading/loading.html
linden/indra/newview/skins/default/xui/en-us/floater_about.xml
linden/install.xml
Diffstat (limited to 'linden/indra/media_plugins/gstreamer010')
-rwxr-xr-x | linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp index 6a44887..6835d0f 100755 --- a/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp +++ b/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp | |||
@@ -84,7 +84,7 @@ public: | |||
84 | GstMessage *message); | 84 | GstMessage *message); |
85 | 85 | ||
86 | // basic log file writing | 86 | // basic log file writing |
87 | static bool writeToLog(char* str, ...); | 87 | static bool writeToLog(const char* str, ...); |
88 | 88 | ||
89 | private: | 89 | private: |
90 | std::string getVersion(); | 90 | std::string getVersion(); |
@@ -181,7 +181,7 @@ MediaPluginGStreamer010::MediaPluginGStreamer010( | |||
181 | mVideoSink ( NULL ), | 181 | mVideoSink ( NULL ), |
182 | mCommand ( COMMAND_NONE ) | 182 | mCommand ( COMMAND_NONE ) |
183 | { | 183 | { |
184 | writeToLog("MediaPluginGStreamer010 PID=%u", U32(LL_GETPID())); | 184 | writeToLog((char*)"MediaPluginGStreamer010 PID=%u", U32(LL_GETPID())); |
185 | } | 185 | } |
186 | 186 | ||
187 | /////////////////////////////////////////////////////////////////////////////// | 187 | /////////////////////////////////////////////////////////////////////////////// |
@@ -202,7 +202,7 @@ static char* get_gst_state_name(GstState state) | |||
202 | #endif // LL_GST_REPORT_STATE_CHANGES | 202 | #endif // LL_GST_REPORT_STATE_CHANGES |
203 | 203 | ||
204 | // static | 204 | // static |
205 | bool MediaPluginGStreamer010::writeToLog(char* str, ...) | 205 | bool MediaPluginGStreamer010::writeToLog(const char* str, ...) |
206 | { | 206 | { |
207 | LLFILE* fp = LLFile::fopen("media_plugin_gstreamer010.log", "a"); | 207 | LLFILE* fp = LLFile::fopen("media_plugin_gstreamer010.log", "a"); |
208 | 208 | ||
@@ -236,7 +236,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, | |||
236 | GST_MESSAGE_TYPE(message) != GST_MESSAGE_BUFFERING && | 236 | GST_MESSAGE_TYPE(message) != GST_MESSAGE_BUFFERING && |
237 | GST_MESSAGE_TYPE(message) != GST_MESSAGE_TAG) | 237 | GST_MESSAGE_TYPE(message) != GST_MESSAGE_TAG) |
238 | { | 238 | { |
239 | writeToLog("Got GST message type: %s", GST_MESSAGE_TYPE_NAME (message)); | 239 | writeToLog((char*)"Got GST message type: %s", GST_MESSAGE_TYPE_NAME (message)); |
240 | } | 240 | } |
241 | 241 | ||
242 | switch (GST_MESSAGE_TYPE (message)) | 242 | switch (GST_MESSAGE_TYPE (message)) |
@@ -246,7 +246,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, | |||
246 | // NEEDS GST 0.10.11+ and America discovered by C.Columbus | 246 | // NEEDS GST 0.10.11+ and America discovered by C.Columbus |
247 | gint percent = 0; | 247 | gint percent = 0; |
248 | gst_message_parse_buffering(message, &percent); | 248 | gst_message_parse_buffering(message, &percent); |
249 | writeToLog("GST buffering: %d%%", percent); | 249 | writeToLog((char*)"GST buffering: %d%%", percent); |
250 | 250 | ||
251 | break; | 251 | break; |
252 | } | 252 | } |
@@ -260,7 +260,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, | |||
260 | &pending_state); | 260 | &pending_state); |
261 | #ifdef LL_GST_REPORT_STATE_CHANGES | 261 | #ifdef LL_GST_REPORT_STATE_CHANGES |
262 | // not generally very useful, and rather spammy. | 262 | // not generally very useful, and rather spammy. |
263 | writeToLog("state change (old,<new>,pending): %s,<%s>,%s", | 263 | writeToLog((char*)"state change (old,<new>,pending): %s,<%s>,%s", |
264 | get_gst_state_name(old_state), | 264 | get_gst_state_name(old_state), |
265 | get_gst_state_name(new_state), | 265 | get_gst_state_name(new_state), |
266 | get_gst_state_name(pending_state)); | 266 | get_gst_state_name(pending_state)); |
@@ -290,7 +290,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, | |||
290 | gchar *debug = NULL; | 290 | gchar *debug = NULL; |
291 | 291 | ||
292 | gst_message_parse_error (message, &err, &debug); | 292 | gst_message_parse_error (message, &err, &debug); |
293 | writeToLog("GST error: %s", err?err->message:"(unknown)"); | 293 | writeToLog((char*)"GST error: %s", err?err->message:"(unknown)"); |
294 | if (err) | 294 | if (err) |
295 | g_error_free (err); | 295 | g_error_free (err); |
296 | g_free (debug); | 296 | g_free (debug); |
@@ -307,7 +307,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, | |||
307 | gchar *debug = NULL; | 307 | gchar *debug = NULL; |
308 | 308 | ||
309 | gst_message_parse_info (message, &err, &debug); | 309 | gst_message_parse_info (message, &err, &debug); |
310 | writeToLog("GST info: %s", err?err->message:"(unknown)"); | 310 | writeToLog((char*)"GST info: %s", err?err->message:"(unknown)"); |
311 | if (err) | 311 | if (err) |
312 | g_error_free (err); | 312 | g_error_free (err); |
313 | g_free (debug); | 313 | g_free (debug); |
@@ -320,7 +320,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, | |||
320 | gchar *debug = NULL; | 320 | gchar *debug = NULL; |
321 | 321 | ||
322 | gst_message_parse_warning (message, &err, &debug); | 322 | gst_message_parse_warning (message, &err, &debug); |
323 | writeToLog("GST warning: %s", err?err->message:"(unknown)"); | 323 | writeToLog((char*)"GST warning: %s", err?err->message:"(unknown)"); |
324 | if (err) | 324 | if (err) |
325 | g_error_free (err); | 325 | g_error_free (err); |
326 | g_free (debug); | 326 | g_free (debug); |
@@ -337,7 +337,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, | |||
337 | 337 | ||
338 | if ( gst_tag_list_get_string(new_tags, GST_TAG_TITLE, &title) ) | 338 | if ( gst_tag_list_get_string(new_tags, GST_TAG_TITLE, &title) ) |
339 | { | 339 | { |
340 | //writeToLog("Title: %s", title); | 340 | //writeToLog((char*)"Title: %s", title); |
341 | std::string newtitle(title); | 341 | std::string newtitle(title); |
342 | gst_tag_list_free(new_tags); | 342 | gst_tag_list_free(new_tags); |
343 | 343 | ||
@@ -356,10 +356,10 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, | |||
356 | case GST_MESSAGE_EOS: | 356 | case GST_MESSAGE_EOS: |
357 | { | 357 | { |
358 | /* end-of-stream */ | 358 | /* end-of-stream */ |
359 | writeToLog("GST end-of-stream."); | 359 | writeToLog((char*)"GST end-of-stream."); |
360 | if (mIsLooping) | 360 | if (mIsLooping) |
361 | { | 361 | { |
362 | //writeToLog("looping media..."); | 362 | //writeToLog((char*)"looping media..."); |
363 | double eos_pos_sec = 0.0F; | 363 | double eos_pos_sec = 0.0F; |
364 | bool got_eos_position = getTimePos(eos_pos_sec); | 364 | bool got_eos_position = getTimePos(eos_pos_sec); |
365 | 365 | ||
@@ -368,7 +368,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, | |||
368 | // if we know that the movie is really short, don't | 368 | // if we know that the movie is really short, don't |
369 | // loop it else it can easily become a time-hog | 369 | // loop it else it can easily become a time-hog |
370 | // because of GStreamer spin-up overhead | 370 | // because of GStreamer spin-up overhead |
371 | writeToLog("really short movie (%0.3fsec) - not gonna loop this, pausing instead.", eos_pos_sec); | 371 | writeToLog((char*)"really short movie (%0.3fsec) - not gonna loop this, pausing instead.", eos_pos_sec); |
372 | // inject a COMMAND_PAUSE | 372 | // inject a COMMAND_PAUSE |
373 | mCommand = COMMAND_PAUSE; | 373 | mCommand = COMMAND_PAUSE; |
374 | } | 374 | } |
@@ -387,7 +387,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, | |||
387 | else | 387 | else |
388 | #endif // LLGST_LOOP_BY_SEEKING | 388 | #endif // LLGST_LOOP_BY_SEEKING |
389 | { // use clumsy stop-start to loop | 389 | { // use clumsy stop-start to loop |
390 | writeToLog("didn't loop by rewinding - stopping and starting instead..."); | 390 | writeToLog((char*)"didn't loop by rewinding - stopping and starting instead..."); |
391 | stop(); | 391 | stop(); |
392 | play(1.0); | 392 | play(1.0); |
393 | } | 393 | } |
@@ -433,7 +433,7 @@ MediaPluginGStreamer010::navigateTo ( const std::string urlIn ) | |||
433 | 433 | ||
434 | setStatus(STATUS_LOADING); | 434 | setStatus(STATUS_LOADING); |
435 | 435 | ||
436 | writeToLog("Setting media URI: %s", urlIn.c_str()); | 436 | writeToLog((char*)"Setting media URI: %s", urlIn.c_str()); |
437 | 437 | ||
438 | mSeekWanted = false; | 438 | mSeekWanted = false; |
439 | 439 | ||
@@ -461,13 +461,13 @@ MediaPluginGStreamer010::update(int milliseconds) | |||
461 | if (!mDoneInit) | 461 | if (!mDoneInit) |
462 | return false; // error | 462 | return false; // error |
463 | 463 | ||
464 | //writeToLog("updating media..."); | 464 | //writeToLog((char*)"updating media..."); |
465 | 465 | ||
466 | // sanity check | 466 | // sanity check |
467 | if (NULL == mPump || | 467 | if (NULL == mPump || |
468 | NULL == mPlaybin) | 468 | NULL == mPlaybin) |
469 | { | 469 | { |
470 | writeToLog("dead media..."); | 470 | writeToLog((char*)"dead media..."); |
471 | return false; | 471 | return false; |
472 | } | 472 | } |
473 | 473 | ||
@@ -497,7 +497,7 @@ MediaPluginGStreamer010::update(int milliseconds) | |||
497 | GST_OBJECT_LOCK(mVideoSink); | 497 | GST_OBJECT_LOCK(mVideoSink); |
498 | if (mVideoSink->retained_frame_ready) | 498 | if (mVideoSink->retained_frame_ready) |
499 | { | 499 | { |
500 | writeToLog("NEW FRAME READY"); | 500 | writeToLog((char*)"NEW FRAME READY"); |
501 | 501 | ||
502 | if (mVideoSink->retained_frame_width != mCurrentWidth || | 502 | if (mVideoSink->retained_frame_width != mCurrentWidth || |
503 | mVideoSink->retained_frame_height != mCurrentHeight) | 503 | mVideoSink->retained_frame_height != mCurrentHeight) |
@@ -528,7 +528,7 @@ MediaPluginGStreamer010::update(int milliseconds) | |||
528 | GST_OBJECT_UNLOCK(mVideoSink); | 528 | GST_OBJECT_UNLOCK(mVideoSink); |
529 | 529 | ||
530 | mCurrentRowbytes = neww * newd; | 530 | mCurrentRowbytes = neww * newd; |
531 | writeToLog("video container resized to %dx%d", | 531 | writeToLog((char*)"video container resized to %dx%d", |
532 | neww, newh); | 532 | neww, newh); |
533 | 533 | ||
534 | mDepth = newd; | 534 | mDepth = newd; |
@@ -556,7 +556,7 @@ MediaPluginGStreamer010::update(int milliseconds) | |||
556 | } | 556 | } |
557 | 557 | ||
558 | GST_OBJECT_UNLOCK(mVideoSink); | 558 | GST_OBJECT_UNLOCK(mVideoSink); |
559 | writeToLog("NEW FRAME REALLY TRULY CONSUMED, TELLING HOST"); | 559 | writeToLog((char*)"NEW FRAME REALLY TRULY CONSUMED, TELLING HOST"); |
560 | 560 | ||
561 | setDirty(0,0,mCurrentWidth,mCurrentHeight); | 561 | setDirty(0,0,mCurrentWidth,mCurrentHeight); |
562 | } | 562 | } |
@@ -567,7 +567,7 @@ MediaPluginGStreamer010::update(int milliseconds) | |||
567 | 567 | ||
568 | GST_OBJECT_UNLOCK(mVideoSink); | 568 | GST_OBJECT_UNLOCK(mVideoSink); |
569 | 569 | ||
570 | writeToLog("NEW FRAME not consumed, still waiting for a shm segment and/or shm resize"); | 570 | writeToLog((char*)"NEW FRAME not consumed, still waiting for a shm segment and/or shm resize"); |
571 | } | 571 | } |
572 | 572 | ||
573 | return true; | 573 | return true; |
@@ -606,7 +606,7 @@ MediaPluginGStreamer010::mouseMove( int x, int y ) | |||
606 | bool | 606 | bool |
607 | MediaPluginGStreamer010::pause() | 607 | MediaPluginGStreamer010::pause() |
608 | { | 608 | { |
609 | writeToLog("pausing media..."); | 609 | writeToLog((char*)"pausing media..."); |
610 | // todo: error-check this? | 610 | // todo: error-check this? |
611 | gst_element_set_state(mPlaybin, GST_STATE_PAUSED); | 611 | gst_element_set_state(mPlaybin, GST_STATE_PAUSED); |
612 | return true; | 612 | return true; |
@@ -615,7 +615,7 @@ MediaPluginGStreamer010::pause() | |||
615 | bool | 615 | bool |
616 | MediaPluginGStreamer010::stop() | 616 | MediaPluginGStreamer010::stop() |
617 | { | 617 | { |
618 | writeToLog("stopping media..."); | 618 | writeToLog((char*)"stopping media..."); |
619 | // todo: error-check this? | 619 | // todo: error-check this? |
620 | gst_element_set_state(mPlaybin, GST_STATE_READY); | 620 | gst_element_set_state(mPlaybin, GST_STATE_READY); |
621 | return true; | 621 | return true; |
@@ -625,7 +625,7 @@ bool | |||
625 | MediaPluginGStreamer010::play(double rate) | 625 | MediaPluginGStreamer010::play(double rate) |
626 | { | 626 | { |
627 | // NOTE: we don't actually support non-natural rate. | 627 | // NOTE: we don't actually support non-natural rate. |
628 | writeToLog("playing media... rate=%f", rate); | 628 | writeToLog((char*)"playing media... rate=%f", rate); |
629 | // todo: error-check this? | 629 | // todo: error-check this? |
630 | gst_element_set_state(mPlaybin, GST_STATE_PLAYING); | 630 | gst_element_set_state(mPlaybin, GST_STATE_PLAYING); |
631 | return true; | 631 | return true; |
@@ -662,7 +662,7 @@ MediaPluginGStreamer010::seek(double time_sec) | |||
662 | GST_SEEK_TYPE_SET, gint64(time_sec*GST_SECOND), | 662 | GST_SEEK_TYPE_SET, gint64(time_sec*GST_SECOND), |
663 | GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); | 663 | GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); |
664 | } | 664 | } |
665 | writeToLog("MEDIA SEEK REQUEST to %f sec result was %d", | 665 | writeToLog((char*)"MEDIA SEEK REQUEST to %f sec result was %d", |
666 | float(time_sec), int(success)); | 666 | float(time_sec), int(success)); |
667 | return success; | 667 | return success; |
668 | } | 668 | } |
@@ -716,7 +716,7 @@ MediaPluginGStreamer010::load() | |||
716 | 716 | ||
717 | setStatus(STATUS_LOADING); | 717 | setStatus(STATUS_LOADING); |
718 | 718 | ||
719 | writeToLog("setting up media..."); | 719 | writeToLog((char*)"setting up media..."); |
720 | 720 | ||
721 | mIsLooping = false; | 721 | mIsLooping = false; |
722 | mVolume = (float) 0.1234567; // minor hack to force an initial volume update | 722 | mVolume = (float) 0.1234567; // minor hack to force an initial volume update |
@@ -755,7 +755,7 @@ MediaPluginGStreamer010::load() | |||
755 | GST_SLVIDEO(gst_element_factory_make ("private-slvideo", "slvideo")); | 755 | GST_SLVIDEO(gst_element_factory_make ("private-slvideo", "slvideo")); |
756 | if (!mVideoSink) | 756 | if (!mVideoSink) |
757 | { | 757 | { |
758 | writeToLog("Could not instantiate private-slvideo element."); | 758 | writeToLog((char*)"Could not instantiate private-slvideo element."); |
759 | // todo: cleanup. | 759 | // todo: cleanup. |
760 | setStatus(STATUS_ERROR); | 760 | setStatus(STATUS_ERROR); |
761 | return false; // error | 761 | return false; // error |
@@ -774,7 +774,7 @@ MediaPluginGStreamer010::unload () | |||
774 | if (!mDoneInit) | 774 | if (!mDoneInit) |
775 | return false; // error | 775 | return false; // error |
776 | 776 | ||
777 | writeToLog("unloading media..."); | 777 | writeToLog((char*)"unloading media..."); |
778 | 778 | ||
779 | // stop getting callbacks for this bus | 779 | // stop getting callbacks for this bus |
780 | g_source_remove(mBusWatchID); | 780 | g_source_remove(mBusWatchID); |
@@ -832,7 +832,7 @@ MediaPluginGStreamer010::startup() | |||
832 | "libgstvideo-0.10.so.0") ) | 832 | "libgstvideo-0.10.so.0") ) |
833 | #endif | 833 | #endif |
834 | { | 834 | { |
835 | writeToLog("Couldn't find suitable GStreamer 0.10 support on this system - video playback disabled."); | 835 | writeToLog((char*)"Couldn't find suitable GStreamer 0.10 support on this system - video playback disabled."); |
836 | return false; | 836 | return false; |
837 | } | 837 | } |
838 | */ | 838 | */ |
@@ -842,7 +842,7 @@ MediaPluginGStreamer010::startup() | |||
842 | // } | 842 | // } |
843 | // else | 843 | // else |
844 | // { | 844 | // { |
845 | // writeToLog("gst_segtrap_set_enabled() is not available; plugin crashes won't be caught."); | 845 | // writeToLog((char*)"gst_segtrap_set_enabled() is not available; plugin crashes won't be caught."); |
846 | // } | 846 | // } |
847 | /* | 847 | /* |
848 | #if LL_LINUX | 848 | #if LL_LINUX |
@@ -885,12 +885,12 @@ MediaPluginGStreamer010::startup() | |||
885 | { | 885 | { |
886 | if (err) | 886 | if (err) |
887 | { | 887 | { |
888 | writeToLog("GST init failed: %s", err->message); | 888 | writeToLog((char*)"GST init failed: %s", err->message); |
889 | g_error_free(err); | 889 | g_error_free(err); |
890 | } | 890 | } |
891 | else | 891 | else |
892 | { | 892 | { |
893 | writeToLog("GST init failed for unspecified reason."); | 893 | writeToLog((char*)"GST init failed for unspecified reason."); |
894 | } | 894 | } |
895 | return false; | 895 | return false; |
896 | } | 896 | } |
@@ -903,7 +903,7 @@ MediaPluginGStreamer010::startup() | |||
903 | gst_slvideo_init_class(); | 903 | gst_slvideo_init_class(); |
904 | 904 | ||
905 | // List the plugins GStreamer can find | 905 | // List the plugins GStreamer can find |
906 | writeToLog("Found GStreamer plugins:"); | 906 | writeToLog((char*)"Found GStreamer plugins:"); |
907 | GList *list; | 907 | GList *list; |
908 | GstRegistry *registry = gst_registry_get_default(); | 908 | GstRegistry *registry = gst_registry_get_default(); |
909 | std::string loaded = "No"; | 909 | std::string loaded = "No"; |
@@ -913,7 +913,7 @@ MediaPluginGStreamer010::startup() | |||
913 | { | 913 | { |
914 | GstPlugin *list_plugin = (GstPlugin *)list->data; | 914 | GstPlugin *list_plugin = (GstPlugin *)list->data; |
915 | if (gst_plugin_is_loaded(list_plugin)) loaded = "Yes"; | 915 | if (gst_plugin_is_loaded(list_plugin)) loaded = "Yes"; |
916 | writeToLog("%s, loaded? %s", gst_plugin_get_name(list_plugin), loaded.c_str()); | 916 | writeToLog((char*)"%s, loaded? %s", gst_plugin_get_name(list_plugin), loaded.c_str()); |
917 | } | 917 | } |
918 | gst_plugin_list_free(list); | 918 | gst_plugin_list_free(list); |
919 | 919 | ||
@@ -960,11 +960,11 @@ void MediaPluginGStreamer010::set_gst_plugin_path() | |||
960 | 960 | ||
961 | if( imp_dir == "" ) | 961 | if( imp_dir == "" ) |
962 | { | 962 | { |
963 | writeToLog("Could not get application directory, not setting GST_PLUGIN_PATH."); | 963 | writeToLog((char*)"Could not get application directory, not setting GST_PLUGIN_PATH."); |
964 | return; | 964 | return; |
965 | } | 965 | } |
966 | 966 | ||
967 | writeToLog("meta-impy is installed at %s", imp_dir.c_str()); | 967 | writeToLog((char*)"meta-impy is installed at %s", imp_dir.c_str()); |
968 | 968 | ||
969 | // ":" on Mac and 'Nix, ";" on Windows | 969 | // ":" on Mac and 'Nix, ";" on Windows |
970 | std::string separator = G_SEARCHPATH_SEPARATOR_S; | 970 | std::string separator = G_SEARCHPATH_SEPARATOR_S; |
@@ -974,7 +974,7 @@ void MediaPluginGStreamer010::set_gst_plugin_path() | |||
974 | char *old_path = getenv("GST_PLUGIN_PATH"); | 974 | char *old_path = getenv("GST_PLUGIN_PATH"); |
975 | if(old_path == NULL) | 975 | if(old_path == NULL) |
976 | { | 976 | { |
977 | writeToLog("Did not find user-set GST_PLUGIN_PATH."); | 977 | writeToLog((char*)"Did not find user-set GST_PLUGIN_PATH."); |
978 | } | 978 | } |
979 | else | 979 | else |
980 | { | 980 | { |
@@ -1005,11 +1005,11 @@ void MediaPluginGStreamer010::set_gst_plugin_path() | |||
1005 | 1005 | ||
1006 | if( put_result == -1 ) | 1006 | if( put_result == -1 ) |
1007 | { | 1007 | { |
1008 | writeToLog("Setting GST_PLUGIN_PATH failed!"); | 1008 | writeToLog((char*)"Setting GST_PLUGIN_PATH failed!"); |
1009 | } | 1009 | } |
1010 | else | 1010 | else |
1011 | { | 1011 | { |
1012 | writeToLog("GST_PLUGIN_PATH set to %s", getenv("GST_PLUGIN_PATH")); | 1012 | writeToLog((char*)"GST_PLUGIN_PATH set to %s", getenv("GST_PLUGIN_PATH")); |
1013 | } | 1013 | } |
1014 | 1014 | ||
1015 | // Don't load system plugins. We only want to use ours, to avoid conflicts. | 1015 | // Don't load system plugins. We only want to use ours, to avoid conflicts. |
@@ -1021,7 +1021,7 @@ void MediaPluginGStreamer010::set_gst_plugin_path() | |||
1021 | 1021 | ||
1022 | if( put_result == -1 ) | 1022 | if( put_result == -1 ) |
1023 | { | 1023 | { |
1024 | writeToLog("Setting GST_PLUGIN_SYSTEM_PATH=\"\" failed!"); | 1024 | writeToLog((char*)"Setting GST_PLUGIN_SYSTEM_PATH=\"\" failed!"); |
1025 | } | 1025 | } |
1026 | 1026 | ||
1027 | #endif // LL_WINDOWS || LL_DARWIN | 1027 | #endif // LL_WINDOWS || LL_DARWIN |
@@ -1039,7 +1039,7 @@ MediaPluginGStreamer010::sizeChanged() | |||
1039 | { | 1039 | { |
1040 | mNaturalWidth = mCurrentWidth; | 1040 | mNaturalWidth = mCurrentWidth; |
1041 | mNaturalHeight = mCurrentHeight; | 1041 | mNaturalHeight = mCurrentHeight; |
1042 | writeToLog("Media NATURAL size better detected as %dx%d", | 1042 | writeToLog((char*)"Media NATURAL size better detected as %dx%d", |
1043 | mNaturalWidth, mNaturalHeight); | 1043 | mNaturalWidth, mNaturalHeight); |
1044 | } | 1044 | } |
1045 | 1045 | ||
@@ -1054,7 +1054,7 @@ MediaPluginGStreamer010::sizeChanged() | |||
1054 | message.setValue("name", mTextureSegmentName); | 1054 | message.setValue("name", mTextureSegmentName); |
1055 | message.setValueS32("width", mNaturalWidth); | 1055 | message.setValueS32("width", mNaturalWidth); |
1056 | message.setValueS32("height", mNaturalHeight); | 1056 | message.setValueS32("height", mNaturalHeight); |
1057 | writeToLog("<--- Sending size change request to application with name: '%s' - natural size is %d x %d", mTextureSegmentName.c_str(), mNaturalWidth, mNaturalHeight); | 1057 | writeToLog((char*)"<--- Sending size change request to application with name: '%s' - natural size is %d x %d", mTextureSegmentName.c_str(), mNaturalWidth, mNaturalHeight); |
1058 | sendMessage(message); | 1058 | sendMessage(message); |
1059 | } | 1059 | } |
1060 | } | 1060 | } |
@@ -1077,11 +1077,11 @@ MediaPluginGStreamer010::closedown() | |||
1077 | 1077 | ||
1078 | MediaPluginGStreamer010::~MediaPluginGStreamer010() | 1078 | MediaPluginGStreamer010::~MediaPluginGStreamer010() |
1079 | { | 1079 | { |
1080 | //writeToLog("MediaPluginGStreamer010 destructor"); | 1080 | //writeToLog((char*)"MediaPluginGStreamer010 destructor"); |
1081 | 1081 | ||
1082 | closedown(); | 1082 | closedown(); |
1083 | 1083 | ||
1084 | writeToLog("GStreamer010 closing down"); | 1084 | writeToLog((char*)"GStreamer010 closing down"); |
1085 | } | 1085 | } |
1086 | 1086 | ||
1087 | 1087 | ||
@@ -1125,11 +1125,11 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) | |||
1125 | 1125 | ||
1126 | if ( load() ) | 1126 | if ( load() ) |
1127 | { | 1127 | { |
1128 | writeToLog("GStreamer010 media instance set up"); | 1128 | writeToLog((char*)"GStreamer010 media instance set up"); |
1129 | } | 1129 | } |
1130 | else | 1130 | else |
1131 | { | 1131 | { |
1132 | writeToLog("GStreamer010 media instance failed to set up"); | 1132 | writeToLog((char*)"GStreamer010 media instance failed to set up"); |
1133 | } | 1133 | } |
1134 | 1134 | ||
1135 | message.setValue("plugin_version", getVersion()); | 1135 | message.setValue("plugin_version", getVersion()); |
@@ -1156,7 +1156,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) | |||
1156 | std::string name = message_in.getValue("name"); | 1156 | std::string name = message_in.getValue("name"); |
1157 | 1157 | ||
1158 | std::ostringstream str; | 1158 | std::ostringstream str; |
1159 | writeToLog("MediaPluginGStreamer010::receiveMessage: shared memory added, name: %s, size: %d, address: %p", name.c_str(), int(info.mSize), info.mAddress); | 1159 | writeToLog((char*)"MediaPluginGStreamer010::receiveMessage: shared memory added, name: %s, size: %d, address: %p", name.c_str(), int(info.mSize), info.mAddress); |
1160 | 1160 | ||
1161 | mSharedSegments.insert(SharedSegmentMap::value_type(name, info)); | 1161 | mSharedSegments.insert(SharedSegmentMap::value_type(name, info)); |
1162 | } | 1162 | } |
@@ -1164,7 +1164,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) | |||
1164 | { | 1164 | { |
1165 | std::string name = message_in.getValue("name"); | 1165 | std::string name = message_in.getValue("name"); |
1166 | 1166 | ||
1167 | writeToLog("MediaPluginGStreamer010::receiveMessage: shared memory remove, name = %s", name.c_str()); | 1167 | writeToLog((char*)"MediaPluginGStreamer010::receiveMessage: shared memory remove, name = %s", name.c_str()); |
1168 | 1168 | ||
1169 | SharedSegmentMap::iterator iter = mSharedSegments.find(name); | 1169 | SharedSegmentMap::iterator iter = mSharedSegments.find(name); |
1170 | if(iter != mSharedSegments.end()) | 1170 | if(iter != mSharedSegments.end()) |
@@ -1182,7 +1182,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) | |||
1182 | } | 1182 | } |
1183 | else | 1183 | else |
1184 | { | 1184 | { |
1185 | writeToLog("MediaPluginGStreamer010::receiveMessage: unknown shared memory region!"); | 1185 | writeToLog((char*)"MediaPluginGStreamer010::receiveMessage: unknown shared memory region!"); |
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | // Send the response so it can be cleaned up. | 1188 | // Send the response so it can be cleaned up. |
@@ -1193,7 +1193,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) | |||
1193 | else | 1193 | else |
1194 | { | 1194 | { |
1195 | std::ostringstream str; | 1195 | std::ostringstream str; |
1196 | writeToLog("MediaPluginGStreamer010::receiveMessage: unknown base message: %s", message_name.c_str()); | 1196 | writeToLog((char*)"MediaPluginGStreamer010::receiveMessage: unknown base message: %s", message_name.c_str()); |
1197 | } | 1197 | } |
1198 | } | 1198 | } |
1199 | else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA) | 1199 | else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA) |
@@ -1236,7 +1236,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) | |||
1236 | S32 texture_height = message_in.getValueS32("texture_height"); | 1236 | S32 texture_height = message_in.getValueS32("texture_height"); |
1237 | 1237 | ||
1238 | std::ostringstream str; | 1238 | std::ostringstream str; |
1239 | writeToLog("---->Got size change instruction from application with shm name: %s - size is %d x %d", name.c_str(), width, height); | 1239 | writeToLog((char*)"---->Got size change instruction from application with shm name: %s - size is %d x %d", name.c_str(), width, height); |
1240 | 1240 | ||
1241 | LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response"); | 1241 | LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response"); |
1242 | message.setValue("name", name); | 1242 | message.setValue("name", name); |
@@ -1252,8 +1252,8 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) | |||
1252 | SharedSegmentMap::iterator iter = mSharedSegments.find(name); | 1252 | SharedSegmentMap::iterator iter = mSharedSegments.find(name); |
1253 | if(iter != mSharedSegments.end()) | 1253 | if(iter != mSharedSegments.end()) |
1254 | { | 1254 | { |
1255 | writeToLog("*** Got size change with matching shm, new size is %d x %d", width, height); | 1255 | writeToLog((char*)"*** Got size change with matching shm, new size is %d x %d", width, height); |
1256 | writeToLog("*** Got size change with matching shm, texture size size is %d x %d", texture_width, texture_height); | 1256 | writeToLog((char*)"*** Got size change with matching shm, texture size size is %d x %d", texture_width, texture_height); |
1257 | 1257 | ||
1258 | mPixels = (unsigned char*)iter->second.mAddress; | 1258 | mPixels = (unsigned char*)iter->second.mAddress; |
1259 | mTextureSegmentName = name; | 1259 | mTextureSegmentName = name; |
@@ -1263,7 +1263,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) | |||
1263 | if (texture_width > 1 || | 1263 | if (texture_width > 1 || |
1264 | texture_height > 1) // not a dummy size from the app, a real explicit forced size | 1264 | texture_height > 1) // not a dummy size from the app, a real explicit forced size |
1265 | { | 1265 | { |
1266 | writeToLog("**** = REAL RESIZE REQUEST FROM APP"); | 1266 | writeToLog((char*)"**** = REAL RESIZE REQUEST FROM APP"); |
1267 | 1267 | ||
1268 | GST_OBJECT_LOCK(mVideoSink); | 1268 | GST_OBJECT_LOCK(mVideoSink); |
1269 | mVideoSink->resize_forced_always = true; | 1269 | mVideoSink->resize_forced_always = true; |
@@ -1345,7 +1345,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) | |||
1345 | } | 1345 | } |
1346 | else | 1346 | else |
1347 | { | 1347 | { |
1348 | writeToLog("MediaPluginGStreamer010::receiveMessage: unknown message class: %s", message_class.c_str()); | 1348 | writeToLog((char*)"MediaPluginGStreamer010::receiveMessage: unknown message class: %s", message_class.c_str()); |
1349 | } | 1349 | } |
1350 | } | 1350 | } |
1351 | } | 1351 | } |