~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/third_party/BaseClasses/mtype.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//------------------------------------------------------------------------------
2
 
// File: MtType.h
3
 
//
4
 
// Desc: DirectShow base classes - defines a class that holds and manages
5
 
//       media type information.
6
 
//
7
 
// Copyright (c) 1992-2001 Microsoft Corporation.  All rights reserved.
8
 
//------------------------------------------------------------------------------
9
 
 
10
 
 
11
 
#ifndef __MTYPE__
12
 
#define __MTYPE__
13
 
 
14
 
/* Helper class that derived pin objects can use to compare media
15
 
   types etc. Has same data members as the struct AM_MEDIA_TYPE defined
16
 
   in the streams IDL file, but also has (non-virtual) functions */
17
 
 
18
 
class CMediaType : public _AMMediaType {
19
 
 
20
 
public:
21
 
 
22
 
    ~CMediaType();
23
 
    CMediaType();
24
 
    CMediaType(const GUID * majortype);
25
 
    CMediaType(const AM_MEDIA_TYPE&, __out_opt HRESULT* phr = NULL);
26
 
    CMediaType(const CMediaType&, __out_opt HRESULT* phr = NULL);
27
 
 
28
 
    CMediaType& operator=(const CMediaType&);
29
 
    CMediaType& operator=(const AM_MEDIA_TYPE&);
30
 
 
31
 
    BOOL operator == (const CMediaType&) const;
32
 
    BOOL operator != (const CMediaType&) const;
33
 
 
34
 
    HRESULT Set(const CMediaType& rt);
35
 
    HRESULT Set(const AM_MEDIA_TYPE& rt);
36
 
 
37
 
    BOOL IsValid() const;
38
 
 
39
 
    const GUID *Type() const { return &majortype;} ;
40
 
    void SetType(const GUID *);
41
 
    const GUID *Subtype() const { return &subtype;} ;
42
 
    void SetSubtype(const GUID *);
43
 
 
44
 
    BOOL IsFixedSize() const {return bFixedSizeSamples; };
45
 
    BOOL IsTemporalCompressed() const {return bTemporalCompression; };
46
 
    ULONG GetSampleSize() const;
47
 
 
48
 
    void SetSampleSize(ULONG sz);
49
 
    void SetVariableSize();
50
 
    void SetTemporalCompression(BOOL bCompressed);
51
 
 
52
 
    // read/write pointer to format - can't change length without
53
 
    // calling SetFormat, AllocFormatBuffer or ReallocFormatBuffer
54
 
 
55
 
    BYTE*   Format() const {return pbFormat; };
56
 
    ULONG   FormatLength() const { return cbFormat; };
57
 
 
58
 
    void SetFormatType(const GUID *);
59
 
    const GUID *FormatType() const {return &formattype; };
60
 
    BOOL SetFormat(__in_bcount(length) BYTE *pFormat, ULONG length);
61
 
    void ResetFormatBuffer();
62
 
    BYTE* AllocFormatBuffer(ULONG length);
63
 
    BYTE* ReallocFormatBuffer(ULONG length);
64
 
 
65
 
    void InitMediaType();
66
 
 
67
 
    BOOL MatchesPartial(const CMediaType* ppartial) const;
68
 
    BOOL IsPartiallySpecified(void) const;
69
 
};
70
 
 
71
 
 
72
 
/* General purpose functions to copy and delete a task allocated AM_MEDIA_TYPE
73
 
   structure which is useful when using the IEnumMediaFormats interface as
74
 
   the implementation allocates the structures which you must later delete */
75
 
 
76
 
void WINAPI DeleteMediaType(__inout_opt AM_MEDIA_TYPE *pmt);
77
 
AM_MEDIA_TYPE * WINAPI CreateMediaType(AM_MEDIA_TYPE const *pSrc);
78
 
HRESULT WINAPI CopyMediaType(__out AM_MEDIA_TYPE *pmtTarget, const AM_MEDIA_TYPE *pmtSource);
79
 
void WINAPI FreeMediaType(__inout AM_MEDIA_TYPE& mt);
80
 
 
81
 
//  Initialize a media type from a WAVEFORMATEX
82
 
 
83
 
STDAPI CreateAudioMediaType(
84
 
    const WAVEFORMATEX *pwfx,
85
 
    __out AM_MEDIA_TYPE *pmt,
86
 
    BOOL bSetFormat);
87
 
 
88
 
#endif /* __MTYPE__ */