~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to mpeglib/lib/frame/frame.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  base class for frames
 
3
  Copyright (C) 2001  Martin Vogt
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU Library General Public License as published by
 
7
  the Free Software Foundation.
 
8
 
 
9
  For more information look at the file COPYRIGHT in this package
 
10
 
 
11
 */
 
12
 
 
13
 
 
14
 
 
15
#include "frame.h"
 
16
 
 
17
 
 
18
Frame::Frame() {
 
19
  type=_FRAME_UNK;
 
20
}
 
21
 
 
22
 
 
23
Frame::~Frame() {
 
24
}
 
25
 
 
26
 
 
27
const char* Frame::getMajorFrameName(int type) {
 
28
  int majorID=type >> 12;
 
29
  switch(majorID) {
 
30
  case _FRAME_UNK:
 
31
    return "_FRAME_UNK";
 
32
  case _FRAME_RAW:
 
33
    return "_FRAME_RAW";
 
34
  case _FRAME_AUDIO:
 
35
    return "_FRAME_AUDIO";
 
36
  case _FRAME_VIDEO:
 
37
    return "_FRAME_VIDEO";
 
38
  case _FRAME_PAKET:
 
39
    return "_FRAME_PAKET";
 
40
  default:
 
41
    return "unknown major frameType";
 
42
  }
 
43
  return "never happens Frame::getMajorFrameName";
 
44
}
 
45
 
 
46
    
 
47
 
 
48
const char* Frame::getFrameName(int type) {
 
49
  switch(type) {
 
50
    // Raw
 
51
  case _FRAME_RAW_BASE:
 
52
    return "_FRAME_RAW_BASE";
 
53
  case _FRAME_RAW_OGG:
 
54
    return "_FRAME_RAW_OGG";
 
55
 
 
56
 
 
57
    // Audio
 
58
  case _FRAME_AUDIO_BASE:
 
59
    return "_FRAME_AUDIO_BASE";
 
60
  case _FRAME_AUDIO_PCM:
 
61
    return "_FRAME_AUDIO_PCM";
 
62
  case _FRAME_AUDIO_FLOAT:
 
63
    return "_FRAME_AUDIO_FLOAT";
 
64
 
 
65
 
 
66
 
 
67
    // Rest
 
68
  default:
 
69
    return "cannot find name";
 
70
  }
 
71
  return "never happens Frame::getFrameName";
 
72
}
 
73