1 // NodeHarnessWin.h 2 3 #ifndef NodeHarnessWin_H 4 #define NodeHarnessWin_H 1 5 6 #include <interface/Window.h> 7 #include <media/MediaNode.h> 8 9 class BButton; 10 class LoggingConsumer; 11 12 // A handy encapsulation of a Media Kit connection, including all 13 // information necessary to do any post-Connect() actions. 14 struct Connection 15 { 16 media_node producer, consumer; 17 media_source source; 18 media_destination destination; 19 media_format format; 20 }; 21 22 // The window that runs our simple test application 23 class NodeHarnessWin : public BWindow 24 { 25 public: 26 NodeHarnessWin(BRect frame, const char* title); 27 ~NodeHarnessWin(); 28 29 void Quit(); 30 void MessageReceived(BMessage* msg); 31 32 LoggingConsumer* GetLoggingNode() const { return mLogNode; } 33 34 private: 35 void StopNodes(); 36 37 BButton* mConnectButton; 38 BButton* mStartButton; 39 BButton* mStopButton; 40 41 Connection mConnection; 42 LoggingConsumer* mLogNode; 43 bool mIsConnected; 44 bool mIsRunning; 45 media_node mTimeSource; 46 }; 47 48 #endif 49