~phablet-team/aethercast/fix-for-microsoft-dongle

« back to all changes in this revision

Viewing changes to src/mcs/miracastsourceclient.h

Add hardware encoding and video streaming support.

The hardware encoding is currently only for Android 5.x based devices. On all others encoding will simply not work. The streaming part of aethercast (MPEGTS packetizing, RTP sending) as based on some code from Android.

Approved by PS Jenkins bot, Thomas Voß, Jim Hodapp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include <wds/source.h>
32
32
#include <wds/media_manager.h>
33
33
 
34
 
#include "non_copyable.h"
35
 
#include "scoped_gobject.h"
 
34
#include "mcs/ip_v4_address.h"
 
35
#include "mcs/non_copyable.h"
 
36
#include "mcs/scoped_gobject.h"
36
37
 
37
38
namespace mcs {
38
39
class TimerCallbackData;
45
46
        virtual void OnConnectionClosed() = 0;
46
47
    };
47
48
 
48
 
    static std::shared_ptr<MiracastSourceClient> Create(ScopedGObject<GSocket>&& socket);
 
49
    static std::shared_ptr<MiracastSourceClient> Create(ScopedGObject<GSocket>&& socket, const mcs::IpV4Address &local_address);
49
50
 
50
51
    ~MiracastSourceClient();
51
52
 
66
67
                                     gpointer user_data);
67
68
 
68
69
private:
69
 
    MiracastSourceClient(ScopedGObject<GSocket>&& socket);
 
70
    MiracastSourceClient(ScopedGObject<GSocket>&& socket, const mcs::IpV4Address &local_address);
70
71
    std::shared_ptr<MiracastSourceClient> FinalizeConstruction();
71
72
 
72
73
    void DumpRtsp(const std::string &prefix, const std::string &data);
76
77
    std::weak_ptr<Delegate> delegate_;
77
78
    ScopedGObject<GSocket> socket_;
78
79
    guint socket_source_;
79
 
    std::string local_address_;
 
80
    mcs::IpV4Address local_address_;
80
81
    std::vector<guint> timers_;
81
82
    std::unique_ptr<wds::Source> source_;
82
83
    std::shared_ptr<wds::SourceMediaManager> media_manager_;