OLD | NEW |
1 // Copyright 2010 Google Inc. | 1 // Copyright 2010 Google Inc. |
2 // | 2 // |
3 // This code is licensed under the same terms as WebM: | 3 // This code is licensed under the same terms as WebM: |
4 // Software License Agreement: http://www.webmproject.org/license/software/ | 4 // Software License Agreement: http://www.webmproject.org/license/software/ |
5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/ | 5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/ |
6 // ----------------------------------------------------------------------------- | 6 // ----------------------------------------------------------------------------- |
7 // | 7 // |
8 // main entry for the decoder | 8 // main entry for the decoder |
9 // | 9 // |
10 // Author: Skal (pascal.massimino@gmail.com) | 10 // Author: Skal (pascal.massimino@gmail.com) |
(...skipping 28 matching lines...) Expand all Loading... |
39 } | 39 } |
40 return 1; | 40 return 1; |
41 } | 41 } |
42 | 42 |
43 VP8Decoder* VP8New(void) { | 43 VP8Decoder* VP8New(void) { |
44 VP8Decoder* dec = (VP8Decoder*)calloc(1, sizeof(VP8Decoder)); | 44 VP8Decoder* dec = (VP8Decoder*)calloc(1, sizeof(VP8Decoder)); |
45 if (dec) { | 45 if (dec) { |
46 SetOk(dec); | 46 SetOk(dec); |
47 WebPWorkerInit(&dec->worker_); | 47 WebPWorkerInit(&dec->worker_); |
48 dec->ready_ = 0; | 48 dec->ready_ = 0; |
| 49 dec->num_parts_ = 1; |
49 } | 50 } |
50 return dec; | 51 return dec; |
51 } | 52 } |
52 | 53 |
53 VP8StatusCode VP8Status(VP8Decoder* const dec) { | 54 VP8StatusCode VP8Status(VP8Decoder* const dec) { |
54 if (!dec) return VP8_STATUS_INVALID_PARAM; | 55 if (!dec) return VP8_STATUS_INVALID_PARAM; |
55 return dec->status_; | 56 return dec->status_; |
56 } | 57 } |
57 | 58 |
58 const char* VP8StatusMessage(VP8Decoder* const dec) { | 59 const char* VP8StatusMessage(VP8Decoder* const dec) { |
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 dec->mem_size_ = 0; | 766 dec->mem_size_ = 0; |
766 memset(&dec->br_, 0, sizeof(dec->br_)); | 767 memset(&dec->br_, 0, sizeof(dec->br_)); |
767 dec->ready_ = 0; | 768 dec->ready_ = 0; |
768 } | 769 } |
769 | 770 |
770 //------------------------------------------------------------------------------ | 771 //------------------------------------------------------------------------------ |
771 | 772 |
772 #if defined(__cplusplus) || defined(c_plusplus) | 773 #if defined(__cplusplus) || defined(c_plusplus) |
773 } // extern "C" | 774 } // extern "C" |
774 #endif | 775 #endif |
OLD | NEW |