~ubuntu-branches/ubuntu/karmic/mpeg4ip/karmic

« back to all changes in this revision

Viewing changes to player/src/qtime_file.h

  • Committer: Bazaar Package Importer
  • Author(s): Mario Limonciello
  • Date: 2008-01-12 15:59:56 UTC
  • Revision ID: james.westby@ubuntu.com-20080112155956-1vznw5njidvrh649
Tags: upstream-1.6dfsg
ImportĀ upstreamĀ versionĀ 1.6dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * The contents of this file are subject to the Mozilla Public
 
3
 * License Version 1.1 (the "License"); you may not use this file
 
4
 * except in compliance with the License. You may obtain a copy of
 
5
 * the License at http://www.mozilla.org/MPL/
 
6
 * 
 
7
 * Software distributed under the License is distributed on an "AS
 
8
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
9
 * implied. See the License for the specific language governing
 
10
 * rights and limitations under the License.
 
11
 * 
 
12
 * The Original Code is MPEG4IP.
 
13
 * 
 
14
 * The Initial Developer of the Original Code is Cisco Systems Inc.
 
15
 * Portions created by Cisco Systems Inc. are
 
16
 * Copyright (C) Cisco Systems Inc. 2000, 2001.  All Rights Reserved.
 
17
 * 
 
18
 * Contributor(s): 
 
19
 *              Bill May        wmay@cisco.com
 
20
 */
 
21
/*
 
22
 * qtime_file.h - contains interfacing to quick time files for local playback
 
23
 */
 
24
#ifndef __QTIME_FILE_H__
 
25
#define __QTIME_FILE_H__ 1
 
26
#include "mp4/quicktime.h"
 
27
#include "mpeg4ip_sdl_includes.h"
 
28
 
 
29
class CPlayerSession;
 
30
 
 
31
int create_media_for_qtime_file (CPlayerSession *psptr,
 
32
                                 const char *name,
 
33
                                 int have_audio_driver);
 
34
 
 
35
/*
 
36
 * CQtimeFile contains access information for the quicktime bytestream
 
37
 * classes.  It will provide mutual exclusion, so bytestreams in different
 
38
 * threads don't overlap
 
39
 */
 
40
class CQtimeFile {
 
41
 public:
 
42
  CQtimeFile(const char *name);
 
43
  ~CQtimeFile();
 
44
  void lock_file_mutex (void) { SDL_mutexP(m_file_mutex); };
 
45
  void unlock_file_mutex (void) { SDL_mutexV(m_file_mutex); };
 
46
  int create_audio (CPlayerSession *psptr);
 
47
  int create_video (CPlayerSession *psptr);
 
48
  quicktime_t *get_file(void) {return m_qtfile; };
 
49
  int get_audio_tracks (void) { return m_audio_tracks; };
 
50
  int get_video_tracks (void) { return m_video_tracks; };
 
51
 private:
 
52
  char *m_name;
 
53
  quicktime_t *m_qtfile;
 
54
  SDL_mutex *m_file_mutex;
 
55
  int m_video_tracks;
 
56
  int m_audio_tracks;
 
57
};
 
58
 
 
59
 
 
60
#endif