root/trunk/freebob/src/avmusicstatusdescriptor.cpp

Revision 21, 2.1 kB (checked in by pieterpalmers, 19 years ago)

- Fixed some bugs in AvDescriptor? and AvDevice?
- Added more tests of the new classes to ieee1394service
- Modified the debuglevel to hide low level AVC transactions by AvDevice?
- Added AvMusicIdentifierDescriptor? and AvMusicStatusDescriptor? as a first

attempt at parsing device info.

- Added AvInfoBlock? to handle infoblocks (still very embryonal)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /* avmusicstatusdescriptor.cpp
2  * Copyright (C) 2004 by Pieter Palmers
3  *
4  * This file is part of FreeBob.
5  *
6  * FreeBob is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * FreeBob is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with FreeBob; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18  * MA 02111-1307 USA.
19  */
20
21 #include "avdevice.h"
22 #include "avdescriptor.h"
23 #include "avmusicstatusdescriptor.h"
24
25 AvMusicStatusDescriptor::AvMusicStatusDescriptor(AvDevice *parent) : AvDescriptor(parent, AVC1394_SUBUNIT_TYPE_MUSIC | AVC1394_SUBUNIT_ID_0,0x80) {
26
27 }
28
29 AvMusicStatusDescriptor::~AvMusicStatusDescriptor()  {
30
31 }
32
33 void AvMusicStatusDescriptor::printCapabilities() {
34         if (!(this->AvDescriptor::isPresent())) {
35                 fprintf(stderr,"AvMusicStatusDescriptor: Descriptor not present!\n");
36                 return;
37         }
38        
39         if (!(this->AvDescriptor::isOpen())) {
40                 fprintf(stderr,"AvMusicStatusDescriptor: Opening descriptor...\n");
41                 this->AvDescriptor::OpenReadOnly();
42                 if (!(this->AvDescriptor::isOpen()) ) {
43                         fprintf(stderr,"AvMusicStatusDescriptor:   Failed!\n");
44                         return;
45                 }
46         }
47        
48         if (!(this->AvDescriptor::isLoaded())) {
49                 fprintf(stderr,"AvMusicStatusDescriptor: Loading descriptor...\n");
50                 this->AvDescriptor::Load();
51                 if (!(this->AvDescriptor::isLoaded())) {
52                         fprintf(stderr,"AvMusicStatusDescriptor:   Failed!\n");
53                         return;
54                 }
55         }
56        
57         fprintf(stderr,"AvMusicStatusDescriptor: \n");
58         // PP: calculate the offset to accomodate for the presence of root lists [not implemented]
59        
60         int offset=2; // update offset when beginning at a new table in the specs for easy reading
61        
62         // start parsing the optional capability stuff
63        
64 }
Note: See TracBrowser for help on using the browser.