| 
            Last change
 on this file was             2, checked in by Dmitry A. Kuminov, 17 years ago           | 
        
        
          | 
             
Initially imported qt-all-opensource-src-4.5.1 from Trolltech. 
 
           | 
        
        
          | 
            File size:
            1.6 KB
           | 
        
      
      
| Line |   | 
|---|
| 1 | /*  This file is part of the KDE project.
 | 
|---|
| 2 | 
 | 
|---|
| 3 |     Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
 | 
|---|
| 4 | 
 | 
|---|
| 5 |     This library is free software: you can redistribute it and/or modify
 | 
|---|
| 6 |     it under the terms of the GNU Lesser General Public License as published by
 | 
|---|
| 7 |     the Free Software Foundation, either version 2.1 or 3 of the License.
 | 
|---|
| 8 | 
 | 
|---|
| 9 |     This library is distributed in the hope that it will be useful,
 | 
|---|
| 10 |     but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 11 |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 12 |     GNU Lesser General Public License for more details.
 | 
|---|
| 13 | 
 | 
|---|
| 14 |     You should have received a copy of the GNU Lesser General Public License
 | 
|---|
| 15 |     along with this library.  If not, see <http://www.gnu.org/licenses/>.
 | 
|---|
| 16 | */
 | 
|---|
| 17 | 
 | 
|---|
| 18 | #include <gst/gst.h>
 | 
|---|
| 19 | 
 | 
|---|
| 20 | #include "message.h"
 | 
|---|
| 21 | 
 | 
|---|
| 22 | 
 | 
|---|
| 23 | QT_BEGIN_NAMESPACE
 | 
|---|
| 24 | 
 | 
|---|
| 25 | static int wuchi = qRegisterMetaType<Phonon::Gstreamer::Message>();
 | 
|---|
| 26 | 
 | 
|---|
| 27 | namespace Phonon
 | 
|---|
| 28 | {
 | 
|---|
| 29 | namespace Gstreamer
 | 
|---|
| 30 | {
 | 
|---|
| 31 | 
 | 
|---|
| 32 | /*!
 | 
|---|
| 33 |     \class gstreamer::Message
 | 
|---|
| 34 |     \internal
 | 
|---|
| 35 | */
 | 
|---|
| 36 | Message::Message():
 | 
|---|
| 37 |         m_message(0),
 | 
|---|
| 38 |         m_source(0)
 | 
|---|
| 39 | {}
 | 
|---|
| 40 | 
 | 
|---|
| 41 | Message::Message(GstMessage* message, MediaObject *source):
 | 
|---|
| 42 |         m_message(message),
 | 
|---|
| 43 |         m_source(source)
 | 
|---|
| 44 | {
 | 
|---|
| 45 |     Q_ASSERT(m_message);
 | 
|---|
| 46 |     gst_message_ref(m_message);
 | 
|---|
| 47 | }
 | 
|---|
| 48 | 
 | 
|---|
| 49 | Message::Message(const Message &other)
 | 
|---|
| 50 | {
 | 
|---|
| 51 |     m_message = other.m_message;
 | 
|---|
| 52 |     gst_message_ref(m_message);
 | 
|---|
| 53 |     m_source = other.m_source;
 | 
|---|
| 54 | }
 | 
|---|
| 55 | 
 | 
|---|
| 56 | Message::~Message()
 | 
|---|
| 57 | {
 | 
|---|
| 58 |     gst_message_unref(m_message);
 | 
|---|
| 59 | }
 | 
|---|
| 60 | 
 | 
|---|
| 61 | GstMessage* Message::rawMessage() const
 | 
|---|
| 62 | {
 | 
|---|
| 63 |     return m_message;
 | 
|---|
| 64 | }
 | 
|---|
| 65 | 
 | 
|---|
| 66 | MediaObject *Message::source() const
 | 
|---|
| 67 | {
 | 
|---|
| 68 |     return m_source;
 | 
|---|
| 69 | }
 | 
|---|
| 70 | 
 | 
|---|
| 71 | }   // ns gstreamer
 | 
|---|
| 72 | }   // ns phonon
 | 
|---|
| 73 | 
 | 
|---|
| 74 | QT_END_NAMESPACE
 | 
|---|
| 75 | 
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.