~ubuntu-branches/ubuntu/raring/rygel/raring

« back to all changes in this revision

Viewing changes to src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.c

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2012-09-26 22:34:15 UTC
  • mfrom: (1.3.2)
  • mto: (14.1.10 sid)
  • mto: This revision was merged to the branch mainline in revision 27.
  • Revision ID: package-import@ubuntu.com-20120926223415-mem27auv86jjrj9k
ImportedĀ UpstreamĀ versionĀ 0.16.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* rygel-mediathek-mov-playlist-parser.c generated by valac 0.17.4.16-52707, the Vala compiler
 
1
/* rygel-mediathek-mov-playlist-parser.c generated by valac 0.16.1, the Vala compiler
2
2
 * generated from rygel-mediathek-mov-playlist-parser.vala, do not modify */
3
3
 
4
4
/*
98
98
RygelMediathekMovPlaylistParser* rygel_mediathek_mov_playlist_parser_construct (GType object_type, SoupSession* session) {
99
99
        RygelMediathekMovPlaylistParser * self = NULL;
100
100
        SoupSession* _tmp0_;
101
 
#line 27 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
102
101
        g_return_val_if_fail (session != NULL, NULL);
103
 
#line 28 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
104
102
        _tmp0_ = session;
105
 
#line 28 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
106
103
        self = (RygelMediathekMovPlaylistParser*) g_object_new (object_type, "session", _tmp0_, "playlist-suffix", ".mov", "mime-type", "video/mp4", NULL);
107
 
#line 27 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
108
104
        return self;
109
 
#line 110 "rygel-mediathek-mov-playlist-parser.c"
110
105
}
111
106
 
112
107
 
113
108
RygelMediathekMovPlaylistParser* rygel_mediathek_mov_playlist_parser_new (SoupSession* session) {
114
 
#line 27 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
115
109
        return rygel_mediathek_mov_playlist_parser_construct (RYGEL_MEDIATHEK_TYPE_MOV_PLAYLIST_PARSER, session);
116
 
#line 117 "rygel-mediathek-mov-playlist-parser.c"
117
110
}
118
111
 
119
112
 
142
135
        gint _tmp14__length1;
143
136
        const gchar* _tmp15_;
144
137
        GError * _inner_error_ = NULL;
145
 
#line 33 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
146
138
        self = (RygelMediathekMovPlaylistParser*) base;
147
 
#line 33 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
148
139
        g_return_val_if_fail (data != NULL, NULL);
149
 
#line 36 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
150
140
        _tmp0_ = data;
151
 
#line 36 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
152
141
        _tmp2_ = _tmp1_ = g_strsplit (_tmp0_, "\n", 0);
153
 
#line 36 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
154
142
        lines = _tmp2_;
155
 
#line 36 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
156
143
        lines_length1 = _vala_array_length (_tmp1_);
157
 
#line 36 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
158
144
        _lines_size_ = lines_length1;
159
 
#line 37 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
160
145
        _tmp3_ = lines;
161
 
#line 37 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
162
146
        _tmp3__length1 = lines_length1;
163
 
#line 37 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
164
147
        if (_tmp3__length1 < 2) {
165
 
#line 166 "rygel-mediathek-mov-playlist-parser.c"
166
148
                GError* _tmp4_;
167
 
#line 38 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
168
149
                _tmp4_ = g_error_new_literal (RYGEL_MEDIATHEK_VIDEO_ITEM_ERROR, RYGEL_MEDIATHEK_VIDEO_ITEM_ERROR_XML_PARSE_ERROR, "Not enough entries in playlist");
169
 
#line 38 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
170
150
                _inner_error_ = _tmp4_;
171
 
#line 38 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
172
151
                if (_inner_error_->domain == RYGEL_MEDIATHEK_VIDEO_ITEM_ERROR) {
173
 
#line 38 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
174
152
                        g_propagate_error (error, _inner_error_);
175
 
#line 38 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
176
153
                        lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
177
 
#line 38 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
178
154
                        return NULL;
179
 
#line 180 "rygel-mediathek-mov-playlist-parser.c"
180
155
                } else {
181
 
#line 38 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
182
156
                        lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
183
 
#line 38 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
184
157
                        g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
185
 
#line 38 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
186
158
                        g_clear_error (&_inner_error_);
187
 
#line 38 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
188
159
                        return NULL;
189
 
#line 190 "rygel-mediathek-mov-playlist-parser.c"
190
160
                }
191
161
        }
192
 
#line 42 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
193
162
        _tmp5_ = lines;
194
 
#line 42 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
195
163
        _tmp5__length1 = lines_length1;
196
 
#line 42 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
197
164
        _tmp6_ = _tmp5_[0];
198
 
#line 42 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
199
165
        if (g_strcmp0 (_tmp6_, "RTSPtext") != 0) {
200
 
#line 201 "rygel-mediathek-mov-playlist-parser.c"
201
166
                GError* _tmp7_;
202
 
#line 43 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
203
167
                _tmp7_ = g_error_new_literal (RYGEL_MEDIATHEK_VIDEO_ITEM_ERROR, RYGEL_MEDIATHEK_VIDEO_ITEM_ERROR_XML_PARSE_ERROR, "Invalid playlist format");
204
 
#line 43 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
205
168
                _inner_error_ = _tmp7_;
206
 
#line 43 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
207
169
                if (_inner_error_->domain == RYGEL_MEDIATHEK_VIDEO_ITEM_ERROR) {
208
 
#line 43 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
209
170
                        g_propagate_error (error, _inner_error_);
210
 
#line 43 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
211
171
                        lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
212
 
#line 43 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
213
172
                        return NULL;
214
 
#line 215 "rygel-mediathek-mov-playlist-parser.c"
215
173
                } else {
216
 
#line 43 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
217
174
                        lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
218
 
#line 43 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
219
175
                        g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
220
 
#line 43 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
221
176
                        g_clear_error (&_inner_error_);
222
 
#line 43 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
223
177
                        return NULL;
224
 
#line 225 "rygel-mediathek-mov-playlist-parser.c"
225
178
                }
226
179
        }
227
 
#line 46 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
228
180
        _tmp8_ = lines;
229
 
#line 46 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
230
181
        _tmp8__length1 = lines_length1;
231
 
#line 46 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
232
182
        _tmp9_ = _tmp8_[1];
233
 
#line 46 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
234
183
        _tmp10_ = g_str_has_prefix (_tmp9_, "rtsp");
235
 
#line 46 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
236
184
        if (!_tmp10_) {
237
 
#line 238 "rygel-mediathek-mov-playlist-parser.c"
238
185
                GError* _tmp11_;
239
 
#line 47 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
240
186
                _tmp11_ = g_error_new_literal (RYGEL_MEDIATHEK_VIDEO_ITEM_ERROR, RYGEL_MEDIATHEK_VIDEO_ITEM_ERROR_XML_PARSE_ERROR, "No rtsp url found in playlist");
241
 
#line 47 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
242
187
                _inner_error_ = _tmp11_;
243
 
#line 47 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
244
188
                if (_inner_error_->domain == RYGEL_MEDIATHEK_VIDEO_ITEM_ERROR) {
245
 
#line 47 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
246
189
                        g_propagate_error (error, _inner_error_);
247
 
#line 47 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
248
190
                        lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
249
 
#line 47 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
250
191
                        return NULL;
251
 
#line 252 "rygel-mediathek-mov-playlist-parser.c"
252
192
                } else {
253
 
#line 47 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
254
193
                        lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
255
 
#line 47 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
256
194
                        g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
257
 
#line 47 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
258
195
                        g_clear_error (&_inner_error_);
259
 
#line 47 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
260
196
                        return NULL;
261
 
#line 262 "rygel-mediathek-mov-playlist-parser.c"
262
197
                }
263
198
        }
264
 
#line 51 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
265
199
        _tmp12_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
266
 
#line 51 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
267
200
        list = _tmp12_;
268
 
#line 52 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
269
201
        _tmp13_ = list;
270
 
#line 52 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
271
202
        _tmp14_ = lines;
272
 
#line 52 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
273
203
        _tmp14__length1 = lines_length1;
274
 
#line 52 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
275
204
        _tmp15_ = _tmp14_[1];
276
 
#line 52 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
277
205
        gee_abstract_collection_add ((GeeAbstractCollection*) _tmp13_, _tmp15_);
278
 
#line 54 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
279
206
        result = (GeeList*) list;
280
 
#line 54 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
281
207
        lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
282
 
#line 54 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
283
208
        return result;
284
 
#line 285 "rygel-mediathek-mov-playlist-parser.c"
285
209
}
286
210
 
287
211
 
288
212
static void rygel_mediathek_mov_playlist_parser_class_init (RygelMediathekMovPlaylistParserClass * klass) {
289
 
#line 26 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
290
213
        rygel_mediathek_mov_playlist_parser_parent_class = g_type_class_peek_parent (klass);
291
 
#line 26 "/home/jens/Source/rygel/src/plugins/mediathek/rygel-mediathek-mov-playlist-parser.vala"
292
214
        RYGEL_MEDIATHEK_PLAYLIST_PARSER_CLASS (klass)->parse_playlist = rygel_mediathek_mov_playlist_parser_real_parse_playlist;
293
 
#line 294 "rygel-mediathek-mov-playlist-parser.c"
294
215
}
295
216
 
296
217