3
Copyright (C) 2000 Stefan Westerfeld
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Library General Public
8
License as published by the Free Software Foundation; either
9
version 2 of the License, or (at your option) any later version.
11
This library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Library General Public License for more details.
16
You should have received a copy of the GNU Library General Public License
17
along with this library; see the file COPYING.LIB. If not, write to
18
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
Boston, MA 02111-1307, USA.
23
/*===========================================================================*
25
Experimental aRts video support stuff:
27
This video support stuff will eventually go to kdelibs/arts if it works.
28
There are a two things that are important for that reason
31
- do *not* use Qt in Videocodecs, VideoFrame class, ...
33
Besides this, here the current state of the art. mcopidl supports now, with
34
a hack, to define custom packet types. So you can define streams of
35
AVideoFrames with some flags (-P AVideoFrame defines a new custom packet
36
type for asynchronous streaming and -C "avideoframe.h" tells mcopidl to
37
include this header file, so that the classes are defined).
39
So what games can we play with this:
40
- implement more of the AVideoFrame class
41
- implement some of the interfaces specified in the artsvideo.idl file
42
- connect stuff together, and use it using connect() and start()
43
- try to find an optimal rendering strategy
44
- write the marshalling functions and laugh how slooow it is over network ;)
46
Issues that need work (but are not even touched yet):
47
- threading (people at least told me that they want threads for video)
48
- trading (how to find a codec that supports mimetype xyz)
49
- tighter communication between native classes and mcop typed stuff
50
(i.e. how do I tell my renderer a QWidget to render to)
51
- stream format (should the format be more than just "VideoFrame"?
52
should it be possible to "see" before connecting which resolution
53
and which colorspace a stream is using)
54
- using shared memory for efficient IPC when running locally
55
- audio, audio/video synchronization
57
*===========================================================================*/
59
#include "asyncstream.h"
60
#include "datapacket.h"
65
/* put video data, format, colorspace and similar for one frame in here */
73
class AVideoFrameAsyncStream : public Arts::AsyncStream<AVideoFrame>
76
Arts::DataPacket<AVideoFrame> *allocPacket(int capacity);
77
Arts::GenericAsyncStream *createNewStream();
81
class AVideoFrameDataPacket : public Arts::DataPacket<AVideoFrame> {
83
AVideoFrameDataPacket(int capacity, Arts::GenericDataChannel *channel)
84
: Arts::DataPacket<AVideoFrame>(capacity, channel)
88
void read(Arts::Buffer& stream);
89
void write(Arts::Buffer& stream);