root/branches/streaming-rework/src/libstreaming/AmdtpSlaveStreamProcessor.h

Revision 435, 2.8 kB (checked in by pieterpalmers, 15 years ago)

src/devicemanager:
- start OSC server for the device manager

src/devicemanager,
src/iavdevice,
src/libieee1394/configrom:
- inherit from OscNode? to become Osc'able

src/bounce,
src/libstreaming/AmdtpStreamProcessor,
src/libstreaming/AmdtpSlaveStreamProcessor:
- fixed bounce device implementation, now working

src/bebob:
- fixed midi bug

General:
- removed 'intermediate XML'
- removed obsolete tests
- removed obsolete files
- removed obsolete API calls

Line 
1 /* $Id$ */
2
3 /*
4  *   FreeBob Streaming API
5  *   FreeBob = Firewire (pro-)audio for linux
6  *
7  *   http://freebob.sf.net
8  *
9  *   Copyright (C) 2005,2006,2007 Pieter Palmers <pieterpalmers@users.sourceforge.net>
10  *
11  *   This program is free software {} you can redistribute it and/or modify
12  *   it under the terms of the GNU General Public License as published by
13  *   the Free Software Foundation {} either version 2 of the License, or
14  *   (at your option) any later version.
15  *
16  *   This program is distributed in the hope that it will be useful,
17  *   but WITHOUT ANY WARRANTY {} without even the implied warranty of
18  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *   GNU General Public License for more details.
20  *
21  *   You should have received a copy of the GNU General Public License
22  *   along with this program {} if not, write to the Free Software
23  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  *
25  *
26  *
27  */
28 #ifndef __FREEBOB_AMDTPSLAVESTREAMPROCESSOR__
29 #define __FREEBOB_AMDTPSLAVESTREAMPROCESSOR__
30
31 /**
32  * This class implements IEC61883-6 / AM824 / AMDTP based streaming
33  */
34 #include "AmdtpStreamProcessor.h"
35
36 #include "../debugmodule/debugmodule.h"
37
38 #include "cip.h"
39 #include <libiec61883/iec61883.h>
40 #include <pthread.h>
41
42 #define AMDTP_MAX_PACKET_SIZE 2048
43
44 #define IEC61883_STREAM_TYPE_MIDI   0x0D
45 #define IEC61883_STREAM_TYPE_SPDIF  0x00
46 #define IEC61883_STREAM_TYPE_MBLA   0x06
47
48 #define IEC61883_AM824_LABEL_MASK                       0xFF000000
49 #define IEC61883_AM824_GET_LABEL(x)             (((x) & 0xFF000000) >> 24)
50 #define IEC61883_AM824_SET_LABEL(x,y)           ((x) | ((y)<<24))
51
52 #define IEC61883_AM824_LABEL_MIDI_NO_DATA       0x80
53 #define IEC61883_AM824_LABEL_MIDI_1X            0x81
54 #define IEC61883_AM824_LABEL_MIDI_2X            0x82
55 #define IEC61883_AM824_LABEL_MIDI_3X            0x83
56
57 namespace Streaming {
58
59 class AmdtpSlaveReceiveStreamProcessor;
60
61 class AmdtpSlaveTransmitStreamProcessor
62     : public AmdtpTransmitStreamProcessor
63 {
64
65 public:
66     AmdtpSlaveTransmitStreamProcessor(int port, int framerate, int dimension);
67
68     virtual ~AmdtpSlaveTransmitStreamProcessor();
69
70     enum raw1394_iso_disposition
71             getPacket(unsigned char *data, unsigned int *length,
72                     unsigned char *tag, unsigned char *sy,
73                     int cycle, unsigned int dropped, unsigned int max_length);
74
75 };
76
77 class AmdtpSlaveReceiveStreamProcessor
78     : public AmdtpReceiveStreamProcessor
79 {
80
81 public:
82     AmdtpSlaveReceiveStreamProcessor(int port, int framerate, int dimension);
83
84     virtual ~AmdtpSlaveReceiveStreamProcessor();
85
86     enum raw1394_iso_disposition putPacket(unsigned char *data, unsigned int length,
87                     unsigned char channel, unsigned char tag, unsigned char sy,
88                     unsigned int cycle, unsigned int dropped);
89
90 };
91
92
93 } // end of namespace Streaming
94
95 #endif /* __FREEBOB_AMDTPSLAVESTREAMPROCESSOR__ */
96
Note: See TracBrowser for help on using the browser.