| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfSoundObjectDictionary | 1 #ifndef __DEFINED__SkPdfSoundObjectDictionary |
| 2 #define __DEFINED__SkPdfSoundObjectDictionary | 2 #define __DEFINED__SkPdfSoundObjectDictionary |
| 3 | 3 |
| 4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
| 5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
| 6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
| 7 #include "SkPdfDictionary_autogen.h" | 7 #include "SkPdfDictionary_autogen.h" |
| 8 | 8 |
| 9 // Additional entries specific to a sound object | 9 // Additional entries specific to a sound object |
| 10 class SkPdfSoundObjectDictionary : public SkPdfDictionary { | 10 class SkPdfSoundObjectDictionary : public SkPdfDictionary { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 SkPdfSoundObjectDictionary& operator=(const SkPdfSoundObjectDictionary& from)
{this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return
*this;} | 526 SkPdfSoundObjectDictionary& operator=(const SkPdfSoundObjectDictionary& from)
{this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return
*this;} |
| 527 | 527 |
| 528 /** (Optional) The type of PDF object that this dictionary describes; if present
, must be | 528 /** (Optional) The type of PDF object that this dictionary describes; if present
, must be |
| 529 * Sound for a sound object. | 529 * Sound for a sound object. |
| 530 **/ | 530 **/ |
| 531 bool has_Type() const { | 531 bool has_Type() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); |
| 533 } | 533 } |
| 534 | 534 |
| 535 std::string Type() const { | 535 std::string Type() const; |
| 536 std::string ret; | |
| 537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; | |
| 538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 539 return ""; | |
| 540 } | |
| 541 | |
| 542 /** (Required) The sampling rate, in samples per second. | 536 /** (Required) The sampling rate, in samples per second. |
| 543 **/ | 537 **/ |
| 544 bool has_R() const { | 538 bool has_R() const { |
| 545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "
", NULL)); | 539 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "
", NULL)); |
| 546 } | 540 } |
| 547 | 541 |
| 548 double R() const { | 542 double R() const; |
| 549 double ret; | |
| 550 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &
ret)) return ret; | |
| 551 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 552 return 0; | |
| 553 } | |
| 554 | |
| 555 /** (Optional) The number of sound channels. Default value: 1. (See implementati
on | 543 /** (Optional) The number of sound channels. Default value: 1. (See implementati
on |
| 556 * note 101 in Appendix H.) | 544 * note 101 in Appendix H.) |
| 557 **/ | 545 **/ |
| 558 bool has_C() const { | 546 bool has_C() const { |
| 559 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", NULL)); | 547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", NULL)); |
| 560 } | 548 } |
| 561 | 549 |
| 562 long C() const { | 550 long C() const; |
| 563 long ret; | |
| 564 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &re
t)) return ret; | |
| 565 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 566 return 0; | |
| 567 } | |
| 568 | |
| 569 /** (Optional) The number of bits per sample value per channel. Default value: 8
. | 551 /** (Optional) The number of bits per sample value per channel. Default value: 8
. |
| 570 **/ | 552 **/ |
| 571 bool has_B() const { | 553 bool has_B() const { |
| 572 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "B", "
", NULL)); | 554 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "B", "
", NULL)); |
| 573 } | 555 } |
| 574 | 556 |
| 575 long B() const { | 557 long B() const; |
| 576 long ret; | |
| 577 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "B", "", &re
t)) return ret; | |
| 578 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 579 return 0; | |
| 580 } | |
| 581 | |
| 582 /** (Optional) The encoding format for the sample data: | 558 /** (Optional) The encoding format for the sample data: |
| 583 * Raw Unspecified or unsigned values in the range 0 to 2B - 1 | 559 * Raw Unspecified or unsigned values in the range 0 to 2B - 1 |
| 584 * Signed Twos-complement values | 560 * Signed Twos-complement values |
| 585 * muLaw mu-law'encoded samples | 561 * muLaw mu-law'encoded samples |
| 586 * ALaw A-law'encoded samples | 562 * ALaw A-law'encoded samples |
| 587 * Default value: Raw. | 563 * Default value: Raw. |
| 588 **/ | 564 **/ |
| 589 bool has_E() const { | 565 bool has_E() const { |
| 590 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "
", NULL)); | 566 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "
", NULL)); |
| 591 } | 567 } |
| 592 | 568 |
| 593 std::string E() const { | 569 std::string E() const; |
| 594 std::string ret; | |
| 595 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", &re
t)) return ret; | |
| 596 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 597 return ""; | |
| 598 } | |
| 599 | |
| 600 /** (Optional) The sound compression format used on the sample data. (Note that
this is | 570 /** (Optional) The sound compression format used on the sample data. (Note that
this is |
| 601 * separate from any stream compression specified by the sound object's Filter
entry; see | 571 * separate from any stream compression specified by the sound object's Filter
entry; see |
| 602 * Table 3.4 on page 38 and Section 3.3, "Filters.") If this entry is absent, t
hen no sound | 572 * Table 3.4 on page 38 and Section 3.3, "Filters.") If this entry is absent, t
hen no sound |
| 603 * compression has been used; the data contains sampled waveforms to be played
at R | 573 * compression has been used; the data contains sampled waveforms to be played
at R |
| 604 * samples per second per channel. | 574 * samples per second per channel. |
| 605 **/ | 575 **/ |
| 606 bool has_CO() const { | 576 bool has_CO() const { |
| 607 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO",
"", NULL)); | 577 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO",
"", NULL)); |
| 608 } | 578 } |
| 609 | 579 |
| 610 std::string CO() const { | 580 std::string CO() const; |
| 611 std::string ret; | |
| 612 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO", "", &r
et)) return ret; | |
| 613 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 614 return ""; | |
| 615 } | |
| 616 | |
| 617 /** (Optional) Optional parameters specific to the sound compression format used
. | 581 /** (Optional) Optional parameters specific to the sound compression format used
. |
| 618 * Note: At the time of publication, no standard values have been defined for t
he CO and CP | 582 * Note: At the time of publication, no standard values have been defined for t
he CO and CP |
| 619 * entries. | 583 * entries. |
| 620 **/ | 584 **/ |
| 621 bool has_CP() const { | 585 bool has_CP() const { |
| 622 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CP",
"", NULL)); | 586 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CP",
"", NULL)); |
| 623 } | 587 } |
| 624 | 588 |
| 625 SkPdfObject* CP() const { | 589 SkPdfObject* CP() const; |
| 626 SkPdfObject* ret; | |
| 627 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CP", "",
&ret)) return ret; | |
| 628 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 629 return NULL; | |
| 630 } | |
| 631 | |
| 632 }; | 590 }; |
| 633 | 591 |
| 634 #endif // __DEFINED__SkPdfSoundObjectDictionary | 592 #endif // __DEFINED__SkPdfSoundObjectDictionary |
| OLD | NEW |