PageRenderTime 70ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llviewerparcelmedia.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 97 lines | 40 code | 20 blank | 37 comment | 0 complexity | 38c8b30630643b2e628c5841f2ae7621 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llviewerparcelmedia.h
  3. * @brief Handlers for multimedia on a per-parcel basis
  4. *
  5. * $LicenseInfo:firstyear=2007&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LLVIEWERPARCELMEDIA_H
  27. #define LLVIEWERPARCELMEDIA_H
  28. #include "llviewermedia.h"
  29. class LLMessageSystem;
  30. class LLParcel;
  31. class LLViewerParcelMediaNavigationObserver;
  32. // This class understands land parcels, network traffic, LSL media
  33. // transport commands, and talks to the LLViewerMedia class to actually
  34. // do playback. It allows us to remove code from LLViewerParcelMgr.
  35. class LLViewerParcelMedia : public LLViewerMediaObserver
  36. {
  37. LOG_CLASS(LLViewerParcelMedia);
  38. public:
  39. static void initClass();
  40. static void cleanupClass();
  41. static void update(LLParcel* parcel);
  42. // called when the agent's parcel has a new URL, or the agent has
  43. // walked on to a new parcel with media
  44. static void play(LLParcel* parcel);
  45. // user clicked play button in media transport controls
  46. static void stop();
  47. // user clicked stop button in media transport controls
  48. static void pause();
  49. static void start();
  50. // restart after pause - no need for all the setup
  51. static void focus(bool focus);
  52. static void seek(F32 time);
  53. // jump to timecode time
  54. static LLPluginClassMediaOwner::EMediaStatus getStatus();
  55. static std::string getMimeType();
  56. static std::string getURL();
  57. static std::string getName();
  58. static viewer_media_t getParcelMedia();
  59. static void processParcelMediaCommandMessage( LLMessageSystem *msg, void ** );
  60. static void processParcelMediaUpdate( LLMessageSystem *msg, void ** );
  61. static void sendMediaNavigateMessage(const std::string& url);
  62. // inherited from LLViewerMediaObserver
  63. virtual void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
  64. public:
  65. static S32 sMediaParcelLocalID;
  66. static LLUUID sMediaRegionID;
  67. // HACK: this will change with Media on a Prim
  68. static viewer_media_t sMediaImpl;
  69. };
  70. class LLViewerParcelMediaNavigationObserver
  71. {
  72. public:
  73. std::string mCurrentURL;
  74. bool mFromMessage;
  75. // void onNavigateComplete( const EventType& event_in );
  76. };
  77. #endif