• Home
  • Raw
  • Download

Lines Matching refs:sample

63 _gst_sample_copy (GstSample * sample)  in _gst_sample_copy()  argument
67 copy = gst_sample_new (sample->buffer, sample->caps, &sample->segment, in _gst_sample_copy()
68 (sample->info) ? gst_structure_copy (sample->info) : NULL); in _gst_sample_copy()
70 if (sample->buffer_list) { in _gst_sample_copy()
71 copy->buffer_list = gst_buffer_list_ref (sample->buffer_list); in _gst_sample_copy()
80 _gst_sample_free (GstSample * sample) in _gst_sample_free() argument
82 GST_LOG ("free %p", sample); in _gst_sample_free()
84 if (sample->buffer) { in _gst_sample_free()
85 gst_mini_object_remove_parent (GST_MINI_OBJECT_CAST (sample->buffer), in _gst_sample_free()
86 GST_MINI_OBJECT_CAST (sample)); in _gst_sample_free()
87 gst_buffer_unref (sample->buffer); in _gst_sample_free()
90 if (sample->caps) { in _gst_sample_free()
91 gst_mini_object_remove_parent (GST_MINI_OBJECT_CAST (sample->caps), in _gst_sample_free()
92 GST_MINI_OBJECT_CAST (sample)); in _gst_sample_free()
93 gst_caps_unref (sample->caps); in _gst_sample_free()
96 if (sample->info) { in _gst_sample_free()
97 gst_structure_set_parent_refcount (sample->info, NULL); in _gst_sample_free()
98 gst_structure_free (sample->info); in _gst_sample_free()
100 if (sample->buffer_list) { in _gst_sample_free()
101 gst_mini_object_remove_parent (GST_MINI_OBJECT_CAST (sample->buffer_list), in _gst_sample_free()
102 GST_MINI_OBJECT_CAST (sample)); in _gst_sample_free()
103 gst_buffer_list_unref (sample->buffer_list); in _gst_sample_free()
106 memset (sample, 0xff, sizeof (GstSample)); in _gst_sample_free()
109 g_slice_free1 (sizeof (GstSample), sample); in _gst_sample_free()
130 GstSample *sample; in gst_sample_new() local
132 sample = g_slice_new0 (GstSample); in gst_sample_new()
134 GST_LOG ("new %p", sample); in gst_sample_new()
136 gst_mini_object_init (GST_MINI_OBJECT_CAST (sample), 0, _gst_sample_type, in gst_sample_new()
141 sample->buffer = gst_buffer_ref (buffer); in gst_sample_new()
142 gst_mini_object_add_parent (GST_MINI_OBJECT_CAST (sample->buffer), in gst_sample_new()
143 GST_MINI_OBJECT_CAST (sample)); in gst_sample_new()
147 sample->caps = gst_caps_ref (caps); in gst_sample_new()
148 gst_mini_object_add_parent (GST_MINI_OBJECT_CAST (sample->caps), in gst_sample_new()
149 GST_MINI_OBJECT_CAST (sample)); in gst_sample_new()
154 gst_segment_copy_into (segment, &sample->segment); in gst_sample_new()
156 gst_segment_init (&sample->segment, GST_FORMAT_TIME); in gst_sample_new()
160 &sample->mini_object.refcount)) in gst_sample_new()
163 sample->info = info; in gst_sample_new()
165 return sample; in gst_sample_new()
170 gst_sample_unref (sample); in gst_sample_new()
188 gst_sample_get_buffer (GstSample * sample) in gst_sample_get_buffer() argument
190 g_return_val_if_fail (GST_IS_SAMPLE (sample), NULL); in gst_sample_get_buffer()
192 return sample->buffer; in gst_sample_get_buffer()
207 gst_sample_get_caps (GstSample * sample) in gst_sample_get_caps() argument
209 g_return_val_if_fail (GST_IS_SAMPLE (sample), NULL); in gst_sample_get_caps()
211 return sample->caps; in gst_sample_get_caps()
224 gst_sample_get_segment (GstSample * sample) in gst_sample_get_segment() argument
226 g_return_val_if_fail (GST_IS_SAMPLE (sample), NULL); in gst_sample_get_segment()
228 return &sample->segment; in gst_sample_get_segment()
241 gst_sample_get_info (GstSample * sample) in gst_sample_get_info() argument
243 g_return_val_if_fail (GST_IS_SAMPLE (sample), NULL); in gst_sample_get_info()
245 return sample->info; in gst_sample_get_info()
262 gst_sample_get_buffer_list (GstSample * sample) in gst_sample_get_buffer_list() argument
264 g_return_val_if_fail (GST_IS_SAMPLE (sample), NULL); in gst_sample_get_buffer_list()
266 return sample->buffer_list; in gst_sample_get_buffer_list()
279 gst_sample_set_buffer_list (GstSample * sample, GstBufferList * buffer_list) in gst_sample_set_buffer_list() argument
282 g_return_if_fail (GST_IS_SAMPLE (sample)); in gst_sample_set_buffer_list()
283 g_return_if_fail (gst_sample_is_writable (sample)); in gst_sample_set_buffer_list()
285 old = sample->buffer_list; in gst_sample_set_buffer_list()
291 sample->buffer_list = gst_buffer_list_ref (buffer_list); in gst_sample_set_buffer_list()
292 gst_mini_object_add_parent (GST_MINI_OBJECT_CAST (sample->buffer_list), in gst_sample_set_buffer_list()
293 GST_MINI_OBJECT_CAST (sample)); in gst_sample_set_buffer_list()
295 sample->buffer_list = NULL; in gst_sample_set_buffer_list()
300 GST_MINI_OBJECT_CAST (sample)); in gst_sample_set_buffer_list()
315 gst_sample_set_buffer (GstSample * sample, GstBuffer * buffer) in gst_sample_set_buffer() argument
319 g_return_if_fail (GST_IS_SAMPLE (sample)); in gst_sample_set_buffer()
320 g_return_if_fail (gst_sample_is_writable (sample)); in gst_sample_set_buffer()
322 old = sample->buffer; in gst_sample_set_buffer()
328 sample->buffer = gst_buffer_ref (buffer); in gst_sample_set_buffer()
329 gst_mini_object_add_parent (GST_MINI_OBJECT_CAST (sample->buffer), in gst_sample_set_buffer()
330 GST_MINI_OBJECT_CAST (sample)); in gst_sample_set_buffer()
332 sample->buffer = NULL; in gst_sample_set_buffer()
337 GST_MINI_OBJECT_CAST (sample)); in gst_sample_set_buffer()
352 gst_sample_set_caps (GstSample * sample, GstCaps * caps) in gst_sample_set_caps() argument
356 g_return_if_fail (GST_IS_SAMPLE (sample)); in gst_sample_set_caps()
357 g_return_if_fail (gst_sample_is_writable (sample)); in gst_sample_set_caps()
359 old = sample->caps; in gst_sample_set_caps()
365 sample->caps = gst_caps_ref (caps); in gst_sample_set_caps()
366 gst_mini_object_add_parent (GST_MINI_OBJECT_CAST (sample->caps), in gst_sample_set_caps()
367 GST_MINI_OBJECT_CAST (sample)); in gst_sample_set_caps()
369 sample->caps = NULL; in gst_sample_set_caps()
374 GST_MINI_OBJECT_CAST (sample)); in gst_sample_set_caps()
389 gst_sample_set_segment (GstSample * sample, const GstSegment * segment) in gst_sample_set_segment() argument
391 g_return_if_fail (GST_IS_SAMPLE (sample)); in gst_sample_set_segment()
392 g_return_if_fail (gst_sample_is_writable (sample)); in gst_sample_set_segment()
396 gst_segment_copy_into (segment, &sample->segment); in gst_sample_set_segment()
398 gst_segment_init (&sample->segment, GST_FORMAT_TIME); in gst_sample_set_segment()
412 gst_sample_set_info (GstSample * sample, GstStructure * info) in gst_sample_set_info() argument
414 g_return_val_if_fail (GST_IS_SAMPLE (sample), FALSE); in gst_sample_set_info()
415 g_return_val_if_fail (gst_sample_is_writable (sample), FALSE); in gst_sample_set_info()
419 &sample->mini_object.refcount)) in gst_sample_set_info()
423 if (sample->info) { in gst_sample_set_info()
424 gst_structure_set_parent_refcount (sample->info, NULL); in gst_sample_set_info()
425 gst_structure_free (sample->info); in gst_sample_set_info()
428 sample->info = info; in gst_sample_set_info()
446 gst_sample_ref (GstSample * sample) in gst_sample_ref() argument
448 return GST_SAMPLE_CAST (gst_mini_object_ref (GST_MINI_OBJECT_CAST (sample))); in gst_sample_ref()
459 gst_sample_unref (GstSample * sample) in gst_sample_unref() argument
461 gst_mini_object_unref (GST_MINI_OBJECT_CAST (sample)); in gst_sample_unref()