Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Changes required fix build on Windows with MSVC #23

Merged
merged 2 commits into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/gstawscredentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
*/
#include "gstawscredentials.hpp"

#include <gst/gst.h>

#include <aws/core/auth/AWSCredentialsProviderChain.h>
#include <aws/sts/model/AssumeRoleRequest.h>
#include <aws/sts/STSClient.h>
Expand Down
6 changes: 5 additions & 1 deletion src/gstawscredentials.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,22 @@
#ifndef __GST_AWS_CREDENTIALS_H__
#define __GST_AWS_CREDENTIALS_H__

#include <glib-object.h>
#include <gst/gst.h>

G_BEGIN_DECLS

typedef struct _GstAWSCredentials GstAWSCredentials;

GST_EXPORT
GstAWSCredentials * gst_aws_credentials_new_default (void);

GST_EXPORT
GstAWSCredentials * gst_aws_credentials_copy (GstAWSCredentials * credentials);

GST_EXPORT
void gst_aws_credentials_free (GstAWSCredentials * credentials);

GST_EXPORT
GType gst_aws_credentials_get_type (void);

#define GST_TYPE_AWS_CREDENTIALS \
Expand Down
2 changes: 2 additions & 0 deletions src/gstawscredentials.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@

using GstAWSCredentialsProviderFactory = std::function<std::unique_ptr<Aws::Auth::AWSCredentialsProvider>()>;

GST_EXPORT
GstAWSCredentials *
gst_aws_credentials_new (GstAWSCredentialsProviderFactory factory);

GST_EXPORT
std::unique_ptr<Aws::Auth::AWSCredentialsProvider>
gst_aws_credentials_create_provider (GstAWSCredentials * credentials);

Expand Down
2 changes: 0 additions & 2 deletions src/gsts3multipartuploader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@

#include <gst/gst.h>

GST_DEBUG_CATEGORY_EXTERN(gst_s3_sink_debug);

namespace gst
{
namespace aws
Expand Down
2 changes: 2 additions & 0 deletions src/gsts3multipartuploader.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

G_BEGIN_DECLS

GST_DEBUG_CATEGORY_EXTERN(gst_s3_sink_debug);

typedef struct _GstS3MultipartUploader GstS3MultipartUploader;

GstS3Uploader * gst_s3_multipart_uploader_new (const GstS3UploaderConfig * config);
Expand Down
1 change: 1 addition & 0 deletions src/gsts3sink.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ struct _GstS3SinkClass {
GstBaseSinkClass parent_class;
};

GST_EXPORT
GType gst_s3_sink_get_type (void);

G_END_DECLS
Expand Down
7 changes: 7 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ gst_s3_public_headers = [
'gstawscredentials.hpp'
]

# Export symbols when building, import when not. This is optional on Linux
# / macOS, but necessary on Windows otherwise .lib files will not be generated.
symbol_export_define = ['-DGST_EXPORTS']

credentials = library('gstawscredentials-@0@'.format(apiversion),
['gstawscredentials.cpp'],
dependencies : [aws_cpp_sdk_sts_dep, gst_dep],
cpp_args: symbol_export_define,
install : true
)

Expand All @@ -30,6 +35,8 @@ multipart_uploader_dep = declare_dependency(link_with : multipart_uploader,

gst_s3_elements = library('gsts3elements',
gst_s3_elements_sources,
cpp_args: symbol_export_define,
c_args: symbol_export_define,
dependencies : [gst_dep, gst_base_dep, multipart_uploader_dep, credentials_dep],
include_directories : [configinc],
install : true,
Expand Down