| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
> |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
#pragma once |
| 30 |
|
| 31 |
#include <gst/gst.h> |
| 32 |
#include <gst/mse/mse-prelude.h> |
| 33 |
#include <gst/mse/gstmsesrc.h> |
| 34 |
|
| 35 |
#include "gstsourcebufferlist.h" |
| 36 |
|
| 37 |
G_BEGIN_DECLS |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
typedef enum |
| 55 |
{ |
| 56 |
GST_MEDIA_SOURCE_READY_STATE_CLOSED, |
| 57 |
GST_MEDIA_SOURCE_READY_STATE_OPEN, |
| 58 |
GST_MEDIA_SOURCE_READY_STATE_ENDED, |
| 59 |
} GstMediaSourceReadyState; |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
typedef enum |
| 77 |
{ |
| 78 |
GST_MEDIA_SOURCE_ERROR_INVALID_STATE, |
| 79 |
GST_MEDIA_SOURCE_ERROR_TYPE, |
| 80 |
GST_MEDIA_SOURCE_ERROR_NOT_SUPPORTED, |
| 81 |
GST_MEDIA_SOURCE_ERROR_NOT_FOUND, |
| 82 |
GST_MEDIA_SOURCE_ERROR_QUOTA_EXCEEDED, |
| 83 |
} GstMediaSourceError; |
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
typedef enum |
| 98 |
{ |
| 99 |
GST_MEDIA_SOURCE_EOS_ERROR_NONE, |
| 100 |
GST_MEDIA_SOURCE_EOS_ERROR_NETWORK, |
| 101 |
GST_MEDIA_SOURCE_EOS_ERROR_DECODE, |
| 102 |
} GstMediaSourceEOSError; |
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
typedef struct |
| 117 |
{ |
| 118 |
GstClockTime start; |
| 119 |
GstClockTime end; |
| 120 |
} GstMediaSourceRange; |
| 121 |
|
| 122 |
GST_MSE_API |
| 123 |
gboolean gst_media_source_is_type_supported (const gchar * type); |
| 124 |
|
| 125 |
#define GST_TYPE_MEDIA_SOURCE (gst_media_source_get_type()) |
| 126 |
#define GST_MEDIA_SOURCE_ERROR (gst_media_source_error_quark()) |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
GST_MSE_API |
| 136 |
GQuark gst_media_source_error_quark (void); |
| 137 |
|
| 138 |
GST_MSE_API |
| 139 |
G_DECLARE_FINAL_TYPE (GstMediaSource, gst_media_source, GST, MEDIA_SOURCE, |
| 140 |
GstObject); |
| 141 |
|
| 142 |
GST_MSE_API |
| 143 |
GstMediaSource *gst_media_source_new (void) G_GNUC_WARN_UNUSED_RESULT; |
| 144 |
|
| 145 |
GST_MSE_API |
| 146 |
void gst_media_source_attach (GstMediaSource * self, GstMseSrc * element); |
| 147 |
|
| 148 |
GST_MSE_API |
| 149 |
void gst_media_source_detach (GstMediaSource * self); |
| 150 |
|
| 151 |
GST_MSE_API |
| 152 |
GstSourceBufferList * gst_media_source_get_source_buffers ( |
| 153 |
GstMediaSource * self) G_GNUC_WARN_UNUSED_RESULT; |
| 154 |
|
| 155 |
GST_MSE_API |
| 156 |
GstSourceBufferList * gst_media_source_get_active_source_buffers ( |
| 157 |
GstMediaSource * self) G_GNUC_WARN_UNUSED_RESULT; |
| 158 |
|
| 159 |
GST_MSE_API |
| 160 |
GstMediaSourceReadyState gst_media_source_get_ready_state ( |
| 161 |
GstMediaSource * self); |
| 162 |
|
| 163 |
GST_MSE_API |
| 164 |
GstClockTime gst_media_source_get_position (GstMediaSource * self); |
| 165 |
|
| 166 |
GST_MSE_API |
| 167 |
GstClockTime gst_media_source_get_duration (GstMediaSource * self); |
| 168 |
|
| 169 |
GST_MSE_API |
| 170 |
gboolean gst_media_source_set_duration (GstMediaSource * self, |
| 171 |
GstClockTime duration, |
| 172 |
GError ** error); |
| 173 |
|
| 174 |
GST_MSE_API |
| 175 |
GstSourceBuffer * gst_media_source_add_source_buffer (GstMediaSource * self, |
| 176 |
const gchar * type, |
| 177 |
GError ** error) G_GNUC_WARN_UNUSED_RESULT; |
| 178 |
|
| 179 |
GST_MSE_API |
| 180 |
gboolean gst_media_source_remove_source_buffer (GstMediaSource * self, |
| 181 |
GstSourceBuffer * buffer, |
| 182 |
GError ** error); |
| 183 |
|
| 184 |
GST_MSE_API |
| 185 |
gboolean gst_media_source_end_of_stream (GstMediaSource * self, |
| 186 |
GstMediaSourceEOSError eos_error, |
| 187 |
GError ** error); |
| 188 |
|
| 189 |
GST_MSE_API |
| 190 |
gboolean gst_media_source_set_live_seekable_range (GstMediaSource * self, |
| 191 |
GstClockTime start, |
| 192 |
GstClockTime end, |
| 193 |
GError ** error); |
| 194 |
|
| 195 |
GST_MSE_API |
| 196 |
gboolean gst_media_source_clear_live_seekable_range (GstMediaSource * self, |
| 197 |
GError ** error); |
| 198 |
|
| 199 |
GST_MSE_API |
| 200 |
void gst_media_source_get_live_seekable_range (GstMediaSource * self, |
| 201 |
GstMediaSourceRange * range); |
| 202 |
|
| 203 |
G_END_DECLS |