Ocean
Loading...
Searching...
No Matches
DSLiveVideo.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_MEDIA_DS_LIVE_VIDEO_H
9#define META_OCEAN_MEDIA_DS_LIVE_VIDEO_H
10
14
16
17namespace Ocean
18{
19
20namespace Media
21{
22
23namespace DirectShow
24{
25
26/**
27 * This class implements a DirectShow live video object.
28 * @ingroup mediads
29 */
30class OCEAN_MEDIA_DS_EXPORT DSLiveVideo :
31 public virtual DSFrameMedium,
32 public virtual DSLiveMedium,
33 public virtual LiveVideo
34{
35 friend class DSLibrary;
36
37 protected:
38
39 /**
40 * Creates a new live video by a given url.
41 * @param url Url of the live video
42 */
43 explicit DSLiveVideo(const std::string& url);
44
45 /**
46 * Destructs a DSLiveVideo object.
47 */
48 ~DSLiveVideo() override;
49
50 /**
51 * @see DSGraphObject::buildGraph().
52 */
53 bool buildGraph() override;
54
55 /**
56 * @see DSGraphObject::releaseGraph().
57 */
58 void releaseGraph() override;
59
60 /**
61 * Creates the DirectShow video source filter.
62 * @return True, if succeeded
63 */
65
66 /**
67 * Collects the preferred video formats.
68 * @param sortableFrameTypes Resulting frame types sorted by their popularity
69 * @return True, if succeeded
70 */
72
73 /**
74 * Releases the DirectShow video source filter.
75 */
77
78 /**
79 * Starts a configuration possibility.
80 * @see ConfigMedium::configuration().
81 */
82 bool configuration(const std::string& name, long long data) override;
83
84 /**
85 * @see ConfigMedium::configs().
86 */
87 ConfigNames configs() const override;
88
89 protected:
90
91 /// DirectShow video source filter.
93
94 /// DirectShow stream config interface.
96};
97
98}
99
100}
101
102}
103
104#endif // META_OCEAN_MEDIA_DS_LIVE_VIDEO_H
Strings ConfigNames
Definition of a vector holding configuration names.
Definition ConfigMedium.h:44
std::vector< DSSortableFrameType > DSSortableFrameTypes
Definition of a vector holding sortable media type objects.
Definition DSFrameMedium.h:68
DSFrameMedium(const std::string &url)
Creates a new frame medium by a given url.
DSLiveMedium(const std::string &url)
Creates a new DSLiveMedium object by a given url.
~DSLiveVideo() override
Destructs a DSLiveVideo object.
DSLiveVideo(const std::string &url)
Creates a new live video by a given url.
ScopedIBaseFilter videoSourceFilter_
DirectShow video source filter.
Definition DSLiveVideo.h:92
ConfigNames configs() const override
bool createVideoSourceFilter()
Creates the DirectShow video source filter.
ScopedIAMStreamConfig videoSourceFilterStreamConfigInterface_
DirectShow stream config interface.
Definition DSLiveVideo.h:95
bool configuration(const std::string &name, long long data) override
Starts a configuration possibility.
friend class DSLibrary
Definition DSLiveVideo.h:35
void releaseVideoSourceFilter()
Releases the DirectShow video source filter.
bool collectPreferredVideoFormats(DSSortableFrameTypes &sortableFrameTypes)
Collects the preferred video formats.
LiveVideo(const std::string &url)
Creates a new live video source by a given url.
const std::string & url() const
Returns the url of the medium.
Definition Medium.h:236
ScopeDirectShowObject< IBaseFilter > ScopedIBaseFilter
Definition of a scoped object holding an IBaseFilter object.
Definition DSObject.h:62
ScopeDirectShowObject< IAMStreamConfig > ScopedIAMStreamConfig
Definition of a scoped object holding an IAMStreamConfig object.
Definition DSObject.h:48
Namespace of the Media DirectShow library.
Definition DirectShow.h:24
Namespace of the Media library.
Definition AAudio.h:26
The namespace covering the entire Ocean framework.
Definition Accessor.h:15