[haiku-commits] haiku: hrev44492 - src/apps/soundrecorder src/kits/media headers/private/media

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 7 Aug 2012 23:44:12 +0200 (CEST)

hrev44492 adds 1 changeset to branch 'master'
old head: d96e68765247f837b3787879cfcde72d3311d4d2
new head: 59b4be8cc188ed5c61c58433673d2a57dcc1618d

----------------------------------------------------------------------------

59b4be8: Move SoundConsumer to libmedia in the BPrivate namespace
  
  Signed-off-by: Jérôme Duval <jerome.duval@xxxxxxxxx>

                                    [ Hamish Morrison <hamish@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44492
Commit:      59b4be8cc188ed5c61c58433673d2a57dcc1618d
URL:         http://cgit.haiku-os.org/haiku/commit/?id=59b4be8
Author:      Hamish Morrison <hamish@xxxxxxxxxxx>
Date:        Sat Aug  4 02:05:05 2012 UTC
Committer:   Jérôme Duval <jerome.duval@xxxxxxxxx>
Commit-Date: Tue Aug  7 21:38:37 2012 UTC

----------------------------------------------------------------------------

8 files changed, 46 insertions(+), 47 deletions(-)
.../private/media}/SoundConsumer.h                 |    6 ++-
.../private/media}/SoundUtils.h                    |    0
src/apps/soundrecorder/Jamfile                     |    4 +-
src/apps/soundrecorder/RecorderWindow.h            |   10 +++-
src/apps/soundrecorder/SoundPrivate.h              |   41 ----------------
src/kits/media/Jamfile                             |    2 +
.../soundrecorder => kits/media}/SoundConsumer.cpp |   30 ++++++++++-
.../soundrecorder => kits/media}/SoundUtils.cpp    |    0

----------------------------------------------------------------------------

diff --git a/src/apps/soundrecorder/SoundConsumer.h 
b/headers/private/media/SoundConsumer.h
similarity index 99%
rename from src/apps/soundrecorder/SoundConsumer.h
rename to headers/private/media/SoundConsumer.h
index 28dcaae..c51dcc3 100644
--- a/src/apps/soundrecorder/SoundConsumer.h
+++ b/headers/private/media/SoundConsumer.h
@@ -31,6 +31,8 @@
 #include <BufferConsumer.h>
 #include "SoundUtils.h"
 
+namespace BPrivate {
+
 
 class SoundConsumer : public BBufferConsumer {
 public:
@@ -143,5 +145,7 @@ private:
 };
 
 
-#endif // SOUND_CONSUMER_H
+}
 
+
+#endif // SOUND_CONSUMER_H
diff --git a/src/apps/soundrecorder/SoundUtils.h 
b/headers/private/media/SoundUtils.h
similarity index 100%
rename from src/apps/soundrecorder/SoundUtils.h
rename to headers/private/media/SoundUtils.h
diff --git a/src/apps/soundrecorder/Jamfile b/src/apps/soundrecorder/Jamfile
index 5c798f5..49966af 100644
--- a/src/apps/soundrecorder/Jamfile
+++ b/src/apps/soundrecorder/Jamfile
@@ -2,7 +2,7 @@ SubDir HAIKU_TOP src apps soundrecorder ;
 
 SetSubDirSupportedPlatformsBeOSCompatible ;
 
-UsePrivateHeaders shared ;
+UsePrivateHeaders shared media ;
 
 Application SoundRecorder :
        DrawButton.cpp
@@ -11,9 +11,7 @@ Application SoundRecorder :
        RecorderApp.cpp
        RecorderWindow.cpp
        ScopeView.cpp
-       SoundConsumer.cpp
        SoundListView.cpp
-       SoundUtils.cpp
        TrackSlider.cpp
        TransportButton.cpp
        UpDownButton.cpp
diff --git a/src/apps/soundrecorder/RecorderWindow.h 
b/src/apps/soundrecorder/RecorderWindow.h
index 63f6b01..1688334 100644
--- a/src/apps/soundrecorder/RecorderWindow.h
+++ b/src/apps/soundrecorder/RecorderWindow.h
@@ -29,17 +29,25 @@
 #include "VolumeSlider.h"
 #include "VUView.h"
 
+
 class BMediaRoster;
 class BBox;
 class BButton;
 class BCheckBox;
 class BMenuField;
-class SoundConsumer;
 class SoundListView;
 class BScrollView;
 class BSlider;
 class BStringView;
 
+namespace BPrivate {
+class SoundConsumer;
+}
+
+
+using BPrivate::SoundConsumer;
+
+
 class RecorderWindow : public BWindow {
 public:
                RecorderWindow();
diff --git a/src/apps/soundrecorder/SoundPrivate.h 
b/src/apps/soundrecorder/SoundPrivate.h
deleted file mode 100644
index a50a8b6..0000000
--- a/src/apps/soundrecorder/SoundPrivate.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
-/
-/      File:                   SoundPrivate.h
-/
-/   Description:       Implementation headers for SoundConsumer and 
SoundProducer.
-/
-/      Copyright 1998-1999, Be Incorporated, All Rights Reserved
-/
-*******************************************************************************/
-
-#if ! defined( _SoundPrivate_h )
-#define _SoundPrivate_h
-
-//     The following are implementation details that we don't
-//     want to expose to the world at large.
-
-#include "SoundUtils.h"
-
-//     This structure is the body of a request that we use to
-//     implement SetHooks().
-struct set_hooks_q {
-       port_id reply;
-       void * cookie;
-       SoundProcessFunc process;
-       SoundNotifyFunc notify;
-};
-
-//     All incoming buffers and Media Kit requests arrive at a
-//     media node in the form of messages (which are generally
-//     dispatched for you by your superclasses' HandleMessage
-//     implementations). Each message has a 'type' which is
-//     analagous to a BMessage's 'what' field. We'll define our
-//     own private message types for our SoundConsumer and
-//     SoundProducer to use. The BeOS reserves a range,
-//     0x60000000 to 0x7fffffff, for us to use.
-enum {
-       MSG_QUIT_NOW = 0x60000000L,
-       MSG_CHANGE_HOOKS
-};
-
-#endif /* _SoundPrivate_h */
diff --git a/src/kits/media/Jamfile b/src/kits/media/Jamfile
index 0510eab..610e3f1 100644
--- a/src/kits/media/Jamfile
+++ b/src/kits/media/Jamfile
@@ -16,6 +16,7 @@ if $(CHECK_MALLOC) {
 SharedLibrary libmedia.so :
        # Private Media Kit
        !missing_symbols.cpp
+       SoundConsumer.cpp
 
        # Public Media Kit
        Buffer.cpp
@@ -59,6 +60,7 @@ SharedLibrary libmedia.so :
        TimeSourceObject.cpp
        TimeSourceObjectManager.cpp
        SoundPlayNode.cpp
+       SoundUtils.cpp
 
        # Old (R3) Media Kit (built only for GCC2)
        OldAudioModule.cpp
diff --git a/src/apps/soundrecorder/SoundConsumer.cpp 
b/src/kits/media/SoundConsumer.cpp
similarity index 96%
rename from src/apps/soundrecorder/SoundConsumer.cpp
rename to src/kits/media/SoundConsumer.cpp
index c518402..41c49b5 100644
--- a/src/apps/soundrecorder/SoundConsumer.cpp
+++ b/src/kits/media/SoundConsumer.cpp
@@ -18,12 +18,14 @@
 #include <TimeSource.h>
 
 #include "AutoDeleter.h"
-#include "SoundPrivate.h"
 
 
 using std::nothrow;
 
 
+namespace BPrivate {
+
+
 //     If we don't mind the format changing to another format while
 //     running, we can define this to 1. Look for the symbol down in the 
source.
 #define ACCEPT_ANY_FORMAT_CHANGE 0
@@ -51,6 +53,30 @@ using std::nothrow;
 #endif
 
 
+//     This structure is the body of a request that we use to
+//     implement SetHooks().
+struct set_hooks_q {
+       port_id reply;
+       void * cookie;
+       SoundProcessFunc process;
+       SoundNotifyFunc notify;
+};
+
+
+//     All incoming buffers and Media Kit requests arrive at a
+//     media node in the form of messages (which are generally
+//     dispatched for you by your superclasses' HandleMessage
+//     implementations). Each message has a 'type' which is
+//     analagous to a BMessage's 'what' field. We'll define our
+//     own private message types for our SoundConsumer and
+//     SoundProducer to use. The BeOS reserves a range,
+//     0x60000000 to 0x7fffffff, for us to use.
+enum {
+       MSG_QUIT_NOW = 0x60000000L,
+       MSG_CHANGE_HOOKS
+};
+
+
 SoundConsumer::SoundConsumer(
        const char * name,
        SoundProcessFunc recordFunc,
@@ -672,3 +698,5 @@ SoundConsumer::Notify(int32 /*cause*/, ...)
        //      If there is no notification hook installed, we instead call this
        //      function for giving notification of various events.
 }
+
+}
diff --git a/src/apps/soundrecorder/SoundUtils.cpp 
b/src/kits/media/SoundUtils.cpp
similarity index 100%
rename from src/apps/soundrecorder/SoundUtils.cpp
rename to src/kits/media/SoundUtils.cpp


Other related posts:

  • » [haiku-commits] haiku: hrev44492 - src/apps/soundrecorder src/kits/media headers/private/media - korli