Commit d71846d0 authored by Alfred Agrell's avatar Alfred Agrell Committed by Alexandre Julliard

winegstreamer: Delete now-meaningless wg_parser_type enum.

parent 460c28c4
......@@ -49,7 +49,7 @@ HRESULT wg_sample_queue_create(struct wg_sample_queue **out);
void wg_sample_queue_destroy(struct wg_sample_queue *queue);
void wg_sample_queue_flush(struct wg_sample_queue *queue, bool all);
wg_parser_t wg_parser_create(enum wg_parser_type type, bool output_compressed);
wg_parser_t wg_parser_create(bool output_compressed);
void wg_parser_destroy(wg_parser_t parser);
HRESULT wg_parser_connect(wg_parser_t parser, uint64_t file_size);
......
......@@ -68,17 +68,16 @@ bool array_reserve(void **elements, size_t *capacity, size_t count, size_t size)
return TRUE;
}
wg_parser_t wg_parser_create(enum wg_parser_type type, bool output_compressed)
wg_parser_t wg_parser_create(bool output_compressed)
{
struct wg_parser_create_params params =
{
.type = type,
.output_compressed = output_compressed,
.err_on = ERR_ON(quartz),
.warn_on = WARN_ON(quartz),
};
TRACE("type %#x.\n", type);
TRACE("output_compressed %d.\n", output_compressed);
if (WINE_UNIX_CALL(unix_wg_parser_create, &params))
return 0;
......
......@@ -1643,7 +1643,7 @@ static HRESULT media_source_create(struct object_context *context, IMFMediaSourc
if (FAILED(hr = MFAllocateWorkQueue(&object->async_commands_queue)))
goto fail;
if (!(parser = wg_parser_create(WG_PARSER_DECODEBIN, FALSE)))
if (!(parser = wg_parser_create(FALSE)))
{
hr = E_OUTOFMEMORY;
goto fail;
......
......@@ -1650,14 +1650,14 @@ static HRESULT decodebin_parser_source_get_media_type(struct parser_source *pin,
return VFW_S_NO_MORE_ITEMS;
}
static HRESULT parser_create(enum wg_parser_type type, BOOL output_compressed, struct parser **parser)
static HRESULT parser_create(BOOL output_compressed, struct parser **parser)
{
struct parser *object;
if (!(object = calloc(1, sizeof(*object))))
return E_OUTOFMEMORY;
if (!(object->wg_parser = wg_parser_create(type, output_compressed)))
if (!(object->wg_parser = wg_parser_create(output_compressed)))
{
free(object);
return E_OUTOFMEMORY;
......@@ -1677,7 +1677,7 @@ HRESULT decodebin_parser_create(IUnknown *outer, IUnknown **out)
struct parser *object;
HRESULT hr;
if (FAILED(hr = parser_create(WG_PARSER_DECODEBIN, FALSE, &object)))
if (FAILED(hr = parser_create(FALSE, &object)))
return hr;
strmbase_filter_init(&object->filter, outer, &CLSID_decodebin_parser, &filter_ops);
......@@ -2251,7 +2251,7 @@ HRESULT wave_parser_create(IUnknown *outer, IUnknown **out)
struct parser *object;
HRESULT hr;
if (FAILED(hr = parser_create(WG_PARSER_DECODEBIN, TRUE, &object)))
if (FAILED(hr = parser_create(TRUE, &object)))
return hr;
strmbase_filter_init(&object->filter, outer, &CLSID_WAVEParser, &filter_ops);
......@@ -2329,7 +2329,7 @@ HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out)
struct parser *object;
HRESULT hr;
if (FAILED(hr = parser_create(WG_PARSER_DECODEBIN, TRUE, &object)))
if (FAILED(hr = parser_create(TRUE, &object)))
return hr;
strmbase_filter_init(&object->filter, outer, &CLSID_AviSplitter, &filter_ops);
......@@ -2446,7 +2446,7 @@ HRESULT mpeg_splitter_create(IUnknown *outer, IUnknown **out)
struct parser *object;
HRESULT hr;
if (FAILED(hr = parser_create(WG_PARSER_DECODEBIN, TRUE, &object)))
if (FAILED(hr = parser_create(TRUE, &object)))
return hr;
strmbase_filter_init(&object->filter, outer, &CLSID_MPEG1Splitter, &mpeg_splitter_ops);
......
......@@ -197,12 +197,6 @@ struct wg_parser_buffer
};
C_ASSERT(sizeof(struct wg_parser_buffer) == 32);
typedef UINT32 wg_parser_type;
enum wg_parser_type
{
WG_PARSER_DECODEBIN,
};
typedef UINT64 wg_parser_t;
typedef UINT64 wg_parser_stream_t;
typedef UINT64 wg_transform_t;
......@@ -218,7 +212,6 @@ struct wg_init_gstreamer_params
struct wg_parser_create_params
{
wg_parser_t parser;
wg_parser_type type;
UINT8 output_compressed;
UINT8 err_on;
UINT8 warn_on;
......
......@@ -51,18 +51,16 @@ typedef enum
struct wg_parser;
typedef BOOL (*init_gst_cb)(struct wg_parser *parser);
struct input_cache_chunk
{
guint64 position;
uint8_t *data;
};
static BOOL decodebin_parser_init_gst(struct wg_parser *parser);
struct wg_parser
{
init_gst_cb init_gst;
struct wg_parser_stream **streams;
unsigned int stream_count;
......@@ -1576,7 +1574,7 @@ static NTSTATUS wg_parser_connect(void *args)
parser->next_pull_offset = 0;
parser->error = false;
if (!parser->init_gst(parser))
if (!decodebin_parser_init_gst(parser))
goto out;
gst_element_set_state(parser->container, GST_STATE_PAUSED);
......@@ -1787,11 +1785,6 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser)
static NTSTATUS wg_parser_create(void *args)
{
static const init_gst_cb init_funcs[] =
{
[WG_PARSER_DECODEBIN] = decodebin_parser_init_gst,
};
struct wg_parser_create_params *params = args;
struct wg_parser *parser;
......@@ -1802,7 +1795,6 @@ static NTSTATUS wg_parser_create(void *args)
pthread_cond_init(&parser->init_cond, NULL);
pthread_cond_init(&parser->read_cond, NULL);
pthread_cond_init(&parser->read_done_cond, NULL);
parser->init_gst = init_funcs[params->type];
parser->output_compressed = params->output_compressed;
parser->err_on = params->err_on;
parser->warn_on = params->warn_on;
......
......@@ -1452,7 +1452,7 @@ static HRESULT init_stream(struct wm_reader *reader)
HRESULT hr;
WORD i;
if (!(wg_parser = wg_parser_create(WG_PARSER_DECODEBIN, FALSE)))
if (!(wg_parser = wg_parser_create(FALSE)))
return E_OUTOFMEMORY;
reader->wg_parser = wg_parser;
......@@ -1557,7 +1557,7 @@ static HRESULT reinit_stream(struct wm_reader *reader, bool read_compressed)
wg_parser_destroy(reader->wg_parser);
reader->wg_parser = 0;
if (!(wg_parser = wg_parser_create(WG_PARSER_DECODEBIN, read_compressed)))
if (!(wg_parser = wg_parser_create(read_compressed)))
return E_OUTOFMEMORY;
reader->wg_parser = wg_parser;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment