File: MyCocoaFilesReader.h

package info (click to toggle)
lynkeos.app 3.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,740 kB
  • sloc: objc: 40,528; ansic: 811; cpp: 150; sh: 68; makefile: 27
file content (92 lines) | stat: -rw-r--r-- 2,961 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//
//  Lynkeos
//  $Id$
//
//  Created by Jean-Etienne LAMIAUD on Fri Mar 03 2005.
//  Copyright (c) 2005-2018. Jean-Etienne LAMIAUD
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// 

/*!
 * @header
 * @abstract Classes that read file formats directly supported by Cocoa.
 * @discussion These classes are bridges between the application and 
 *   NSImage or NSMovie.
 */
#ifndef __MYCOCOAFILEREADER_H
#define __MYCOCOAFILEREADER_H

#if !defined GNUSTEP
#include <AVFoundation/AVFoundation.h>
#include <AvailabilityMacros.h>
#ifndef AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
#error "Pas defini"
#endif
#endif

#include "LynkeosCommon.h"
#include "LynkeosFileReader.h"

/*!
 * @class MyCocoaImageReader
 * @abstract Class for reading every Cocoa image file format.
 * @ingroup FileAccess
 */
@interface MyCocoaImageReader : NSObject <LynkeosImageFileReader>
{
@private
   NSString*          _path;            //!< Image file path
   LynkeosIntegerSize _size;            //!< Image frame size
}
@end

#if !defined GNUSTEP
typedef enum
{
   integer8,
   integer16,
   integer32,
   integer64,
   float32,
   float64
} PixelType_t;

/*!
 * @class MyQuickTimeReader
 * @abstract Class for reading QuickTime movie files.
 * @ingroup FileAccess
 */
@interface MyQuickTimeReader : NSObject <LynkeosMovieFileReader>
{
@private
   AVAsset               *_movie;           //!< The movie being read
   AVAssetImageGenerator *_imageGenerator;  //!< Movie image extractor
   CMTime                *_times;           //!< Time for each image in the movie
   u_long                 _imageNumber;     //!< Number of images in the movie
   u_long                 _currentImage;    //!< Last decoded image
   u_short                _nPlanes;         //!< Number of planes
   PixelType_t            _pixelType;       //!< Bit resolution of the movie
   BOOL                   _cgBigEndian;     //!< Endianness
   u_short                _skipFirst;       //!< Bytes to skip before the pixels
   u_short                _bytesPerPixel;   //!< Total number of bytes for all planes
   NSLock                *_avLock;          //!< Multithreading protection
   LynkeosIntegerSize     _size;            //!< Movie frame size
   NSString              *_url;             //!< Used for cache key
}
@end
#endif

#endif